Skip to content

One agent is down: keep working in the same worktree.

Agents have outages and limits. The work they started is in the worktree, as files and commits, and any other agent can pick it up from there.

Applies to Claude Code, Codex, OpenCode, Cursor Agent, Gemini CLI and any CLI agent4 min read

Where the work lives

Each agent keeps its own conversation history, but its work lives in the worktree: the files it changed, the commits it made and the branch they are on. A second agent can read all of that. What it lacks is the conversation, so give it the task again in a few lines.

By hand

  1. Stop the first agent.Quit its CLI, so it cannot come back and edit the same files.
  2. Commit or keep what is there.Leave the uncommitted changes in place; the next agent sees them.
  3. Start another agent in the same folder, here Codex; opencode, gemini, cursor-agent or claude work the same.
    Terminal
    cd ~/code/payments-api-refund-retries
    codex
  4. Tell it where things stand.
    Your first message
    Read git status --short, git diff HEAD and git diff main...HEAD: the
    uncommitted edits and the commits on this branch. Read each new file marked ??. You are continuing work on
    retrying failed refunds with backoff. The last pnpm test failed in
    refunds/retry.test.ts. Finish the tests and run pnpm test.

If the problem is a usage limit rather than an outage, the same agent on another account is often the shorter path. See accounts and limits.

With Dockazor

  • The New Chat menu opens another chat in the same worktree, on the agent you pick; it works on the same files and branch. ⌘N starts the default preset, which may be the agent that is down.
  • The brief and your comments are kept in the worktree’s .dockazor/context/ folder, where the next agent can read them.
  • Chats on agents that resume pick up their conversation again after you quit, the Mac sleeps or you install a new version.
Every agent, one worktree

Claude Code, Codex, OpenCode, Cursor Agent, Gemini CLI and any agent you add can all work in the same worktree. See what Dockazor supports for each.