feat(coding-agent): add --fork session flag closes #2290

This commit is contained in:
Mario Zechner
2026-03-18 01:09:23 +01:00
parent fa877de1fb
commit 1a9185d3cb
4 changed files with 58 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ pi -c # Continue most recent session
pi -r # Browse and select from past sessions
pi --no-session # Ephemeral mode (don't save)
pi --session <path> # Use specific session file or ID
pi --fork <path> # Fork specific session file or ID into a new session
```
### Branching
@@ -219,6 +220,8 @@ pi --session <path> # Use specific session file or ID
**`/fork`** - Create a new session file from the current branch. Opens a selector, copies history up to the selected point, and places that message in the editor for modification.
**`--fork <path|id>`** - Fork an existing session file or partial session UUID directly from the CLI. This copies the full source session into a new session file in the current project.
### Compaction
Long sessions can exhaust context windows. Compaction summarizes older messages while keeping recent ones.
@@ -475,6 +478,7 @@ cat README.md | pi -p "Summarize this text"
| `-c`, `--continue` | Continue most recent session |
| `-r`, `--resume` | Browse and select session |
| `--session <path>` | Use specific session file or partial UUID |
| `--fork <path>` | Fork specific session file or partial UUID into a new session |
| `--session-dir <dir>` | Custom session storage directory |
| `--no-session` | Ephemeral mode (don't save) |