@
TabGre @
Danswerme 其实我目前的用法还算不上交流, 只能算单方面的指挥.
因为我主要用 Codex, ClaudeCode 算是打杂的哈哈
有几个 tmux 命令很好用, 你们可以弄成自定义命令, 方便在新的 session 来教它们怎么对话.
0. tmux new -s SESSION 名 (新建一个 SESSION, 你自己来执行)
1. tmux ls (列出所有 SESSION)
2. tmux send-keys -t SESSION 名 指令 (发送指令)
3. tmux send-keys -t SESSION 名 C-m (相当于发送回车)
4. tmux capture-pane -p -t SESSION 名 (获取制定 SESSION 显示中的内容)
5. tmux capture-pane -p -S -1000 -t SESSION 名 (获取制定 SESSION 最近 1000 行的内容)
6. tmux capture-pane -p -S - -t SESSION 名 (获取制定 SESSION 里所有的内容, 有上限)
我就给 Codex 加了个自定义指令:
cat ~/.codex/prompts/
claude.md ```
# claude
Forward implementation tasks to Claude (via tmux), with design-only behavior.
Codex performs design and review only; all implementation is delegated to
Claude running inside tmux. The target tmux session is detected only on
the first run or when an error occurs.
## Special rules
- Codex never implements code; Claude does.
- tmux ls is executed only on first invocation or upon errors.
- Claude is instructed (once) on how tmux send-keys works, especially
that C-m must be sent alone to trigger execution.
- After all instructions have been delivered:
`tmux send-keys -t <target> C-m` is sent to start execution.
- Codex does not observe tmux output; Claude will notify on completion.
```