Claude Code に /fork コマンドが入ってた
@oikon4820K followers
84,012 views
16 Comments
Comments from the original post on X (Twitter)

@Heppoko750151
私も/forkの考え方が好きすぎて自分でターミナル作ってしまいました。 UIで履歴表示検索してどの会話途中からでもforkできます!
16 likes

@oikon48
検索機能内蔵のforkできるターミナル作るのすごいですね!
4 likes

@Heppoko750151
ありがとうございます! これもclaudeとcodexと一緒に作りました。 ここで公開してるのでよかったら触ってみて下さいmm
13 likes

@oikon48
/fork がいつClaude Codeに入ったか、ちゃんと調べてみるとv2.1.8からだった (v2.1.7時点まで無かったので) CHANGELOGは v2.1.7 -> v2.1.9 だったので、番号を飛ばしているせいでリリースノートから省かれたのだろうか🤔
15 likes

@KentaroxKondo
初歩質問なのですが、IDE拡張機能のClaude Codeって基本使わない方が推奨されるのですか? /fork も試してみたかったのですが、拡張機能の方ですと使えないようでして・・・アップデートが降りてくるタイミングが遅いのか、そもそもターミナル限定の機能になるのかよくわからず
1 like

@oikon48
基本的にはCLI -> IDE拡張の順番で新機能が下りてきます。逆はほぼありません。 IDE側でもforkはそのうち使えるようになると思いますが、もう少しかかると思います。
1 like

@KentaroxKondo
ありがとうございます。手練れの方々はターミナル版を使用している割合が多いと思うのですが、いち早くアップデートを吸収できる利点が主な動機でしょうか?他にもターミナル版を選ぶ大きなメリットがあればご教示いただきたいです🙇♂️

@oikon48
Claude Code CLIを使用するメリットはいくつかありますが、ワークフローへの組み込みのしやすさと並列実行の容易性が主な理由です
1 like

@ryoshin0830
codexにもいつの間にか実装されてました。便利な機能
1 like

@da_i_chi_dev
大事なことなのでここでも書く (CHANGELOGに書いてください)
1 like

@YuminAI
Which terminal are you using? It’s beautiful
1 like

@oikon48
Thanks. It's Ghostty. My settings are attached to the post reply.
1 like

@anothergemino
double check the attached pic in Claude docs the bottom should be claude --resume xyz789 ? cc @bcherny @trq212 and `claude --continue --fork-session` only appended to latest /fork <session> ? I'm not sure

@oikon48
@bcherny @trq212 its not. xyz789 is forked from abc123 xyz789 is not created util you run claude --resume abc123 --fork-session after you run above command and xyz789 is created, you can resume session with claude --resume xyz789. --fork-session is just branching base session (abc123)
1 like

@anothergemino
@bcherny @trq212 it's confused. check doc attached pic notice it have (new ID) rather than xyz789! `claude --resume abc123 --fork-session` could be used when new fork seesion-xyz789 already created ? If not , should /rename then quit then `claude --continue/resume xyz789` ?

@oikon48
session-ID and session-name are different. This is confusing point using --resume. --resume can take both session-ID and session-name, but --fork-session creates new session-ID. If you run , cluade --resume abc123 --fork-session it will create new session-id, e.g.) xyz789 (session-id) If you run, cluade --resume abc123 --fork-session again, it will create another new session-id, e.g.) vvv999 (session-id) xyz789 and vv999 are both forked from the head of abc123. FYI: /fork command is also doing same, but if you run /fork [name], this is equivalent to /fork + /rename.
1 like
