promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/fork

Starts a background subagent that inherits the full conversation and continues working on the given directive, while the main session keeps running.

Starts a background subagent that inherits the full conversation and continues working on the given directive, while the main session keeps running. The result returns to the conversation once finished. To switch yourself into a copy instead: /branch. Before v2.1.161, /fork was an alias for /branch.

โœ… WHEN TO USE IT?

Handle a side task in the background while the main session keeps going

/fork research all open TODOs in the repo

Try a risky change in parallel with full context

/fork try the approach with a Redis cache

โ›” WHEN NOT TO?

Want to switch direction yourself

branch vs fork: fork starts a background subagent while you stay in the main session - for switching yourself into a new branch, /branch is meant for that.

Better: /branch

SOURCES