You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4cbd56
Browse filesBrowse the repository at this point in the historyBrowse files
last_thread_id searches each CLI's own store: copilot
~/.copilot/session-state (events log must record this cwd), gemini
~/.gemini/tmp/<sha256 of the directory>/chats with the full uuid read
from the file body, qwen ~/.qwen/projects/<directory>/chats. Panes
relaunch with the CLI's resume flag while the brief still arrives via
-i. Resume ids are shell-quoted, since a qwen id can be a saved-chat
tag. README also gains a separate uninstall block and drops the
main-pane-width note from Requirements.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,25 @@ A tmux session of side-by-side AI coding agent CLIs that watch and message each
6
6
7
7
## Requirements
8
8
9
-
- tmux 3.2 or newer (percentage `main-pane-width`)
9
+
- tmux 3.2 or newer
10
10
- At least one agent CLI installed (claude, codex, copilot, ...)
11
11
12
12
## Installation
13
13
14
14
```sh
15
15
./install.sh # symlink as peon-code into ~/.local/bin
16
-
peon-code uninstall [bin-dir] # remove that symlink
17
16
```
18
17
19
18
After installation, run `peon-code` from any directory.
20
19
21
20
`install.sh` seeds `~/.config/peon-code/peon-code.conf` from the example if it is missing.
22
21
22
+
To uninstall:
23
+
24
+
```sh
25
+
peon-code uninstall [bin-dir] # remove the install.sh symlink
26
+
```
27
+
23
28
## Quick start
24
29
25
30
```sh
@@ -57,9 +62,9 @@ Detaching leaves the session alive. Use `dismiss` to actually stop it.
57
62
58
63
`resume` builds the session the same way as a plain start, except each agent reopens the conversation it had in that session and directory before, so the team keeps its memory across a `dismiss` or a reboot. The team, session name, and roles resolve exactly as they do for a start.
59
64
60
-
Each brief carries the phrase `agent <name> of peon-code session <session>,` (trailing comma included, so one session name that is a prefix of another never matches the other's transcripts), and that phrase is what `resume` looks for in the CLIs' own transcripts, newest first: `~/.claude/projects/<directory>/*.jsonl` for claude, `~/.codex/sessions/**/rollout-*.jsonl` for codex, where the rollout must also record the current working directory. The marker is unique per agent, so a team of any size reopens one conversation per pane rather than every same-CLI pane landing in the newest one. Transcripts older than 30 days are not searched.
65
+
Each brief carries the phrase `agent <name> of peon-code session <session>,` (trailing comma included, so one session name that is a prefix of another never matches the other's transcripts), and that phrase is what `resume` looks for in the CLIs' own transcripts, newest first: `~/.claude/projects/<directory>/*.jsonl` for claude, `~/.codex/sessions/**/rollout-*.jsonl` for codex (the rollout must also record the current working directory), `~/.copilot/session-state/<id>/events.jsonl` for copilot (the events log must also record the current working directory), `~/.gemini/tmp/<sha256 of the directory>/chats/*.jsonl` for gemini, and `~/.qwen/projects/<directory>/chats/<id>.jsonl` for qwen. The marker is unique per agent, so a team of any size reopens one conversation per pane rather than every same-CLI pane landing in the newest one. Transcripts older than 30 days are not searched.
61
66
62
-
claude panes launch as `claude --resume <id>`, codex panes as `codex resume <id>`, both keeping the config's own arguments. Other providers have no resume handle here and start fresh. An agent with no earlier thread is named on stderr and starts fresh too.
67
+
claude panes launch as `claude --resume <id>`, codex panes as `codex resume <id>`, copilot panes as `copilot --resume=<id>`, gemini and qwen panes as `<cli> --resume <id>`, all keeping the config's own arguments; copilot, gemini, and qwen still get the brief through `-i`. Any other provider has no resume handle here and starts fresh. An agent with no earlier thread is named on stderr and starts fresh too.
63
68
64
69
Each resumed pane still gets the full brief, since pane ids change with every session.
65
70
@@ -113,8 +118,8 @@ A team without roles (agent commands on the command line, or a config of all `-`
113
118
|----------|-----------------|----------------|
114
119
| claude | launched bare, brief pasted in once its TUI is up |`--resume <id>`|
| gemini, qwen |`-i <prompt>` (unverified on this machine) |`--resume <id>`|
118
123
| anything else | passed through as-is | not supported |
119
124
120
125
Every brief is written to a file under `$TMPDIR`, and the pane launches with `<cmd> "$(cat <file>)"`, so the command line stays one line instead of thousands of escaped characters.
sleep 1 # the decoy session's transcript sorts newer than the real ones
226
+
printf'{"type":"session.start","data":{"context":{"cwd":"%s"}}}\nagent cop of peon-code session resume-test, in pane\n'"$work_dir" \
227
+
>"$copilot_dir/events.jsonl"
228
+
# One line holding a nested sessionId after the real one: the top-level id must win.
229
+
printf'{"sessionId":"55555555-5555-5555-5555-555555555555","messages":[{"text":"agent gem of peon-code session resume-test, in pane"}],"extra":{"sessionId":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}}\n' \
0 commit comments