mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-10-04 08:01:59 +00:00
* feat(agents): add Qoder CN CLI integration * fix(agents): spell Qoder CN's config override QODERCN_CONFIG_DIR The China build of Qoder resolves its configuration through QODERCN_CONFIG_DIR. The first pass invented QODER_CN_CONFIG_DIR instead, so an install that set the real one was treated as unrelocated: hooks went to ~/.qoder-cn and history was scanned from a directory the CLI never writes to. The test that should have caught it set the same invented name, so it only proved the name agreed with itself. Picks up the rest of the review as well — detect the `qoder-cn` dispatcher beside the other two binaries, call it the mainland-China build rather than a different vendor, and drop the QODER_CN_HOOK_EVENTS alias for the table it only pointed at. The serialized enums keep their variants appended; only the independent ALL arrays moved QoderCLICn next to QoderCLI.
65 lines
2.3 KiB
Plaintext
65 lines
2.3 KiB
Plaintext
---
|
|
title: "Agent sessions"
|
|
description: "Resuming a conversation after a reboot, forking a live one, and getting at the session id."
|
|
---
|
|
|
|
Coding agents keep their own conversation history, addressed by a session id.
|
|
Because tty7's hooks learn that id, it can do three things with it.
|
|
|
|
## Resume after a restart
|
|
|
|
When the server goes away — a reboot, a crash, a deliberate restart — the shells
|
|
go with it. Panes that were running an agent relaunch the conversation on
|
|
restore instead of coming back to a bare prompt:
|
|
|
|
```bash
|
|
claude --dangerously-skip-permissions --resume 8f3c…
|
|
```
|
|
|
|
The original launch flags are replayed, so the pane comes back the way you
|
|
started it, not the way the defaults would.
|
|
|
|
Supported for every recognised agent except Aider. Turn it off with
|
|
`restore_agent_sessions: false`.
|
|
|
|
<Note>
|
|
Resume needs the agent's hooks installed, since the session id comes from
|
|
them. [Installing hooks →](/agents/status)
|
|
</Note>
|
|
|
|
## Fork a live session
|
|
|
|
Forking branches a running conversation into a second, independent one. The
|
|
original keeps going untouched; both continue separately from the same history.
|
|
|
|
Right-click a **pane** to fork into a split — the menu offers a placement —
|
|
or right-click the **tab or sidebar row** to open the fork in a new tab.
|
|
|
|
| Agent | What tty7 runs |
|
|
|---|---|
|
|
| Claude Code | `claude --resume <id> --fork-session` |
|
|
| Codex | `codex fork <id>` |
|
|
| TraeCode | `traecli fork <id>` |
|
|
| Grok | `grok --resume <id> --fork-session` |
|
|
| Qoder CLI | `qodercli --resume <id> --fork-session` |
|
|
| Qoder CN CLI | `qodercn --resume <id> --fork-session` |
|
|
| OpenCode | `opencode --session <id> --fork` |
|
|
| Oh My Pi | `omp --fork <id>` |
|
|
| Prime Agent | `prime-agent --fork <id>` |
|
|
|
|
It is the agent's own fork command, run in a new pane — nothing is copied by
|
|
tty7 itself.
|
|
|
|
<Warning>
|
|
A fork duplicates the whole transcript in the agent's session store, so
|
|
forking repeatedly costs real disk. A pane on a
|
|
[remote machine](/remote/workspaces) cannot fork, because the command would
|
|
run against the local agent.
|
|
</Warning>
|
|
|
|
## Copy the session id
|
|
|
|
**Copy Session ID** — in the tab's right-click menu, beside *Copy Working
|
|
Directory*, and in Search Everywhere — puts the agent's native id on the
|
|
clipboard. Paste it into `codex resume`, a bug report, or another tool.
|