promptgarten ๐ŸŒฑ

Command reference ยท Claude Code

/fork

Copies the conversation into an independent background session, doesn't report back.

/fork [prompt] copies the current conversation into a new, independent background session and lets you keep working in the main session. The copy contains the entire conversation history so far, runs as its own row in the agent view (claude agents), and is fully independent from the moment of copying - its result doesn't automatically return to the original conversation. With a prompt, the copy starts working immediately; without one, it waits in the agent view for the first instruction. This behavior applies from version 2.1.212 onward. On 2.1.161 through 2.1.211, /fork instead started a forked subagent whose result returned to the conversation; before that, /fork was merely an alias for /branch. For a side task whose result should return to the running conversation, /subtask is now responsible. To switch into a copy yourself, instead of starting an independent session, /branch serves that purpose.

โœ… WHEN TO USE IT?

Let the conversation continue independently while you keep working

/fork open a draft pull request with the work so far โ€” the copy keeps working in the background while you continue with the next step.

Try a risky approach in parallel in a separate session

/fork try the approach with a Redis cache โ€” a failure there doesn't affect the main session.

โ›” WHEN NOT TO?

Side task whose result should return to the conversation

Since version 2.1.212, the /fork copy is an independent session that no longer reports back on its own.

Better: Use /subtask, which starts a background subagent and returns its result as a message into the running conversation.

You want to switch into a different direction yourself

/fork starts a separate background session while you stay in the main session yourself - /branch is meant for switching into a copy.

Better: Use /branch.

SOURCES

MORE COMMANDS ยท Claude Code

/goal/heapdump/help/hooks/ide/init/insights/install-github-app/install-slack-app/keybindings/login/logout

All commands ยท Claude Code โ†’

Share:๐•in๐Ÿ’ฌ