Skip to content
stage

Claude Code

Stage can run tasks as Claude Code background sessions (claude --bg) on the computer Stage runs on. Claude keeps what it owns: the sessions, their worktrees, the models and your login. Stage keeps the task, its journal, its final reply and what comes next.

Requirements

  • Stage on the computer where you use Claude Code: the desktop app, stage serve --local-harnesses, or a worker running the worker service or stage worker run --local-harnesses. Claude Code is not available when Stage runs in Docker.
  • Claude Code installed and logged in with claude auth login. Stage uses that login and stores no Claude credentials.

Connect

Open Settings > Connections, choose Add connection > Claude Code, and click Connect. Stage checks the claude command (claude --version) and that Claude is logged in (claude auth status), then names the connection by Claude's config folder (Claude Code (~/.claude)).

From a terminal:

stage harness claude run connect

If Stage cannot find claude, set Claude command in the card (or stage harness claude set binary=/path/to/claude). If Claude is logged out, run claude auth login, then connect again. Statuses and settings: Connections reference.

Workspaces

Stage discovers workspaces from folders Claude knows and groups them using repository and directory evidence; Git checkouts import as Stage projects. Projects

Claude runs only in folders it trusts. Run claude once in each project folder and accept the prompt, or use Trust in Claude Code: on the folder's row in project detail, or as a workspace source (stage workspaces add). Stage sets only that folder's trust flag in Claude's state file, after you confirm that the folder's .claude settings, hooks and MCP servers will run in Claude sessions. A task in a folder Claude does not trust returns to backlog saying so. Folder browsing is unavailable: type the path.

Start a task

Select the Claude Code connection and the exact workspace for your task. Choose its launch options:

  • Claude Code worktree: off runs in the project folder; on, Claude makes and names a new worktree from origin's default branch.
  • Model: Claude's default, or opus, sonnet, haiku or fable.
  • Effort: low to max.
  • Permission: Ask before acting, Accept edits, Auto, Plan only, Don't ask or Bypass permissions.

Stage starts one background session per task and follows its state: running, needs input, done, failed or interrupted. Stop ends a background session.

Images on the prompt reach Claude Code as files it opens: Stage writes them under its data dir (claude/images; a worker's own), never into your repository, and lists them in the prompt. The launch's settings let Claude read that folder without asking, and a launch with images removes those older than 30 days. Stage removes the .claude/stage-images folders earlier versions wrote in projects.

When the session finishes, task detail shows its final reply, read from the end of Claude's transcript (best effort, up to 4000 characters). Complete the task in Stage to start what depends on it.

See what a session used

Task detail has a Usage panel, read from the transcript: turns, input tokens (with cache read and cache write), output tokens and working time, counting the session's subagents too. It reads "so far" while the session is still working. There is no cost: Claude records none for a background session, and Stage does not estimate one. stage task show prints the same on one line.

Answer and message

Answer in Stage

When a session Stage started stops for a permission prompt or a question, the task turns to needs input and the Session tab shows it under Requests:

  • A permission prompt: what Claude wants to do (the command, file or URL), then Allow, an Always allow choice for each rule Claude suggests (the button names the rule and where Claude saves it, such as .claude/settings.local.json in the project), and Deny, which asks for an optional reason Claude reads.
  • A question: Claude's options, or Other with your own answer, then Send.

A task row or inbox row with one permission prompt shows it on one line with Allow and Deny; anything else offers Answer, which opens Requests on the Session tab. Claude keeps its own prompt open the whole time: whichever answer comes first wins, and an answer Claude already got shows "Already answered in Claude Code or expired".

Only you answer a prompt; an agent calling Stage can read it but not answer. Sessions started before this version have no requests in Stage; answer them in Claude.

Message Claude in Stage

Open the current Session tab. Send starts a new turn in the same background session once its turn ends, including when Claude ends a turn asking for a reply. A pending permission prompt or structured question must be answered first.

Sessions launched with Stage's delivery hooks offer Steer and Queue while Claude works. Claude receives a steer at a tool boundary or when it would stop. Queue delivers when Claude would stop. Undelivered messages are cleared when Stage restarts, or when the session ends or is removed. Earlier sessions show the resume command when they cannot take a message.

Ctrl or Cmd + Enter uses the first available action. The task timeline records delivery without the message text. Recent activity shows a bounded view of the transcript read on Claude's machine.

Answer in Claude

Claude Code has no link to open, so Stage offers Copy resume command on task detail, task rows and notifications. Run it in a terminal:

claude attach 1a2b3c4d

Once Claude no longer lists the background session, the command resumes it in its folder instead: cd <folder> && claude --resume <session id>. For a session on a worker the button reads Copy resume command for the machine: run it there.

Local Claude Code sessions waiting for input that Stage does not track appear in the inbox as silent rows and never notify; a row offers Copy resume command or "Answer in Claude Code".

Continue in Claude Desktop

On a Mac or an x64 Windows computer signed in to Claude with a claude.ai subscription (Claude Code 2.1.285 or later), a task's Harness options add Continue in: Claude Code CLI, the default, or Claude Desktop. Pin Claude Desktop as the connection's default to use it for every task. Stage starts the session in the background as usual and moves it to Claude Desktop when its first turn ends. If that fails, for example when Claude Desktop isn't installed, the session stays in the CLI and task detail shows why.

Task detail also offers Open in Claude Desktop for any Claude session once its turn ends. A session in Claude Desktop is answered there: Stage keeps following its progress and reply, and its resume command (claude --desktop --resume <session id>) opens it in Claude Desktop again. The session opens on the computer that runs Claude Code.

Auto-complete

Remove a finished session with claude rm: with Complete tasks when removed in Claude Code on (the default), Stage completes a successful task when its finished session is removed. Claude ending an idle session after about an hour does not, and neither does removing one mid-turn or one waiting for you. Auto-complete

Disconnect

stage harness claude disconnect, or Disconnect in Settings. Stage stops using Claude Code; sessions keep running in Claude, tasks and history stay, and connecting again resumes the same connection.

Check the connection

The status button at the bottom of the sidebar includes Claude Code. In Settings > Connections its row shows the config folder and version (~/.claude · 2.1.332), or why it is not connected. Manage opens the card: the command Stage runs, the version, the config folder, the login, whether sessions keep running when Stage restarts, how updates arrive, and where approvals are answered. Check connection runs the checks again.

Sessions Stage starts tell it right away when a turn ends, a permission prompt opens or the session stops: each launch passes Claude a hook settings file (--settings), and the card's Updates line reads "instant". Stage still checks every few seconds, so sessions whose hooks your Claude settings block (allowedHttpHookUrls, disableAllHooks) still update, a little later.

stage harness claude

prints the same, with the next step when something is wrong. Statuses and CLI output: Connections reference.

Limits

  • A worktree starts from origin's default branch: no other base, and Claude names the branch. A task in a tree does not start from a needed task's branch; the handoff names that branch.
  • Follow-ups from Stage are text only, and go to background sessions Stage can see: a session you run in a terminal takes them there.
  • If Stage restarts while a prompt waits, answer that prompt in Claude.
  • Not in Docker. On a worker, only with the worker service or stage worker run --local-harnesses; the resume command names the machine to run it on.

Next steps