Sessions
Sessions control whether an agent starts fresh or continues from a previous conversation. This affects the agent’s context window — a resumed session retains memory of previous work.Session modes
fresh (default)
The agent starts a new session with no memory of previous steps.session for the same behavior. Use fresh sessions for reviewers (to avoid confirmation bias from the implementation) and for steps that should be independent.
reuse
Resume the session from the last step by the same agent in the same group.reuse-on-retry
Fresh on the first attempt, resumes its own session on retry.reuse: step-name
Resume the session from a specific named step. Explicit control over which context to continue from.Sessions and retries
On retry (attempt > 1), sessions are always fresh by default. The agent gets a clean start with error context injected via{error} and {diff}. This prevents the agent from getting stuck in the same reasoning loop.
Exception: reuse-on-retry explicitly opts into continuing the session across retries.
On escalation (different agent), sessions are always fresh. Session IDs are provider-specific and incompatible across agents.
Sessions and providers
Each agent provider has its own session mechanism:| Agent | Session ID format | Resume flag |
|---|---|---|
| Claude Code | UUID | --resume <uuid> |
| Codex | Thread ID | resume <thread-id> |
| Gemini | Implicit (per-directory) | --resume |
| Qwen | UUID | --resume <uuid> |
| OpenCode | ses_ prefix | --session <ses_id> |
| Cursor | UUID | --resume <uuid> |