Claude/Code/Tutorial/Fork a btw side question into a background subagent
Properties
- tags
- Claude/Code, Diataxis/Tutorial
Tutorial: Ask a side question with
/btw, fork it, and switch back with the arrow keysSummary
/btwlets you ask a question about the current session without adding it to the conversation history. If the answer needs real tool access (reading a file, running a command), pressfin the answer overlay to spin the question into a forked subagent that inherits the whole conversation. The fork runs in a panel below your prompt while you keep working in the main session, and↑/↓moves the panel's selection between the main session's row and the fork's row.- Source: Interactive mode — Side questions with /btw and Sub-agents — Observe and steer running forks.
Before You Start
- Claude Code CLI installed and authenticated (
claude --versionworks). See Claude/Code/How To/Install. /btwwithout a question requires v2.1.212 or later (earlier versions require a question every time) — commands reference.- The
f-to-fork key in the/btwoverlay requires v2.1.187 or later; the newerShift+Left/Shift+Righthistory-stepping keys require v2.1.257 or later — Side questions with /btw. - Forking is a local-session-only feature: it isn't available over Remote Control or in the VS Code extension's chat panel, where
/btwopens a panel instead of the terminal overlay — same source.
- Claude Code CLI installed and authenticated (
Steps
1. Start (or resume) a session and do some work
- Have a normal conversation with Claude — read some code, make an edit, whatever the actual task is.
/btwanswers only from what's already in this conversation (your messages, Claude's replies, and gathered tool results), so ask your side question after Claude has seen the thing you're curious about.
- Have a normal conversation with Claude — read some code, make an edit, whatever the actual task is.
2. Ask a side question with
/btw/btw what was the name of that config file again?- The question and its answer appear in a dismissible overlay and never enter the conversation history. Run
/btwagain with no question to reopen the overlay on your most recent exchange. - You can run
/btweven while Claude is still generating its main response — the side question runs independently and doesn't interrupt that turn. - Docs: Side questions with /btw.
3. Fork the question if it needs real tool access
- Side questions have no tool access — Claude can't read files, run commands, or search to answer one. If the answer actually requires that, press
fin the overlay: - This is distinct from the standalone
/forkcommand, which copies the whole session into a new background session in agent view rather than opening a row in the in-terminal fork panel. See Fork the current conversation for how a conversation fork differs from other subagents.
- Side questions have no tool access — Claude can't read files, run commands, or search to answer one. If the answer actually requires that, press
4. Switch between the fork and your main session with the arrow keys
- Once forked, a panel opens below the prompt input with one row for the main session and one row per running fork. Use these keys (Observe and steer running forks):
- So the "down key to switch" workflow is: press
↓to move the panel's selection onto the fork's row,Enterto open its transcript, work there, thenEsc(or select the main-session row with↑) to get back to your original conversation. Built-in commands like/modelstill act on your main conversation even while a fork's transcript is open. - Claude Code removes a fork's row automatically when it finishes successfully; a failed or stopped fork's row stays for 30 seconds so you have time to inspect it.
Verification
- After pressing
f, a new row appears in the panel below the prompt — that's the fork, running in the background. - Pressing
↓moves the highlighted row from the main session down to the fork;Enteropens its transcript inline. - When the fork finishes, its result arrives as a message in your main conversation and its row disappears from the panel.
- After pressing
What You Learned
/btwanswers side questions from context already in the session, without touching conversation history or using tools.- Pressing
fin the/btwoverlay escalates a side question into a forked subagent with full tool access, tracked in a panel below the prompt. ↑/↓moves between the main session and fork rows in that panel;Enterattaches to a row's transcript andEscreturns you to the prompt.
Next Steps
- For side tasks that don't need the whole conversation's history, look at plain subagents instead of a fork.
- To copy an entire session into its own background session (rather than forking one
/btwanswer), use/forkand manage it from agent view.
Related