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.
You need 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. Install Claude Code and log 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 and that Claude is logged in, then names the connection by Claude's config folder (Claude Code (~/.claude)).
From a terminal:
stage harness claude run connectIf 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.
Let Claude trust the folder
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.
Stage discovers workspaces from folders Claude knows and groups them using repository and directory evidence. Projects
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.
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.jsonin 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".
An agent calling Stage can answer another session's prompt, never its own. Sessions you track and 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 also offers Copy resume command on task detail, task rows and notifications. Run it in a terminal:
claude attach 1a2b3c4dOnce Claude no longer lists the background session, the command resumes it in its folder instead: cd <folder> && claude --resume <session id>.
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, or remove the 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.
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.
Track a session you started
A Claude session you started yourself can become a Stage task. Use Track session, pick Claude Code and paste one of:
- the session UUID,
- the 8-character ID
claude agentsshows, - a
claude attachorclaude --resumecommand.
Preview it, then confirm. Stage never starts the session; it follows it and copies its resume command like any other.
A Claude session that T3 started belongs to T3. Stage refuses it: "This Claude Code session was started by T3. Track it through T3."
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 you track, or hooks your Claude settings block (allowedHttpHookUrls, disableAllHooks), still update, a little later.
stage harness claudeprints the same, with the next step when something is wrong. Details: Connections reference.
Images on the prompt reach Claude Code as files it opens: Stage writes them under its data dir (claude/images, kept 30 days), never into your repository, and lets Claude read that folder without asking.
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
- Sessions and references: what Stage keeps from a session.
- Connections: connections, machines and the status button.
- Agents that queue work: let Claude add tasks and notes to Stage from inside its sessions.