Session forking — branch a conversation into parallel sessions with shared context
- 主要語言
- Shell
- 星號
- 11.2k
- 分支
- 1.9k
- 平均合併
- 14 小時 16 分鐘
- 30 天內合併 PR
- 6
描述
### Describe the feature or problem you'd like to solve
When working on a multi-step task, I often hit a natural junction where two independent problems emerge. Today I have to choose: finish one before starting the other, or lose my current context by switching sessions.
### Proposed solution
A `/fork` command (or similar) that creates a new parallel session initialized with the current session's conversation history and context. Both the original and forked session remain independently interactive — I can switch between them with `/resume` or work in
separate terminals.
### Example prompts or workflows
Mid‑refactor in an app, I discover a bug in a shared library.
/fork → fix the library in the new session, continue the refactor in the original.
While investigating a test failure, I realize the fix requires both a code change and an infra change.
/fork → one session handles code, the other handles infra, both with full context of the investigation.
Planning a feature, I want to prototype two different approaches simultaneously.
/fork twice → three sessions exploring different designs, all starting from the same analysis.
Working in a tenant repo, I identify a needed change to an upstream template repo.
/fork → plan/implement the upstream PR in the new session while continuing tenant work in the original.
Debugging a frontend issue, I realize the backend API also needs changes.
/fork → one session for frontend, one for backend, both understanding the full problem.
### Additional context
_No response_
貢獻指南
研究方向
Start by tracing the existing session and /resume entry points, then compare them with the proposed /fork workflow in this issue. Define how a fork copies conversation context while remaining independently interactive, and verify that the original, forked, and multiply forked sessions can be resumed or used from separate terminals.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- shell
- 領域
- cli, developer-experience
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100