Skip to main content

Agent Sessions

How Treq starts coding agents inside a workspace and keeps their work separate.

An agent session connects a coding agent to one Treq workspace. The agent starts in that workspace directory, receives the task as a prompt, and runs in an integrated terminal.

Supported Agents

Treq can start any supported CLI agent (see the table below). The executable must be installed and available on your system path.

Treq resolves the default agent from the repository settings first, then the application settings. It uses Claude Code when neither setting provides a default.

AgentPlan modeEdit mode
Claude CodeUses Claude's plan permission modeUses the accept-edits permission mode
CodexNot availableRuns the task with edit access
Cursor AgentStarts with the plan flagStarts without the plan flag

Plan and Edit Modes

Plan mode asks the agent to inspect the workspace and propose an approach before it edits files. Use it when the task has unclear requirements, broad scope, or architectural tradeoffs.

Edit mode lets the agent apply changes in the workspace. Review handoff uses these same modes, so you can ask an agent to plan around review comments or fix them directly.

The selected mode sets the permission mode Treq passes when it starts the agent.

Workspace Isolation

Treq starts the agent process with the workspace as its working directory. The generated system prompt also tells the agent to read and write files only within that directory.

This boundary separates concurrent tasks at the file-system level. Repository history remains shared across workspaces, while each agent sees the working copy for its assigned workspace.

Creating Sessions

You can create a session from the task input, workspace sidebar, command palette, review handoff, or a Treq agent link. Each current entry point creates a new session record.

Models

Treq resolves the model in this order:

  1. Session: the model stored on the session record.
  2. Repository: the repository default_model setting.
  3. Application: the application default_model setting.

The terminal header exposes model selection for Claude Code sessions. Other agents use their own configuration when Treq does not pass a model.

Learn More