From 7520141a55e8876824dcb4e2cf5e8e3027efa59d Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Fri, 23 Oct 2026 15:08:53 +0300 Subject: restore Claude Code agents in their own sessions `dingger install claude` adds a SessionStart hook to Claude's settings (every other key and hook kept, in order; the original backed up; written through a symlink; installing again changes nothing). The hook is `dingger hook claude`: it reports the session's transcript for its tmux pane, prints nothing (Claude adds SessionStart output to the conversation) and always exits 0. Claude's state still comes from its screen. restore types `claude --resume ` in the directory the session ran in (elsewhere, Claude moves the conversation there). it resumes an agent only when its session file exists: a Claude session that never got a message has no transcript, and `--resume` fails ("No conversation found"). the snapshot now keeps an agent's command line too, so such a pane gets it retyped instead of nothing. - the hook receiver takes a report without a state: only the session. - a report that arrives after the watcher listed the panes is not dropped as "agent gone": Claude reports once, as it starts. - serde_json preserve_order (indexmap is already a dependency, via toml). e2e step 18: install against a settings file like a real one, a fake claude running the exact installed hook command, resume by id, retype without a transcript, the resumed agent reporting again. a server that restore starts now gets the test's plain shells: it got the user's login shell, whose profile put the real claude first, which started (stuck at its trust dialog) during development. every test restore now checks that no real pi or claude runs in a test pane. --- ROADMAP.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index 4aa76df..72efca8 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,9 +2,9 @@ In priority order. -1. ~~**Restore after a crash or shutdown.**~~ Done for pi (see the README). - Next: other agents' session references (claude's session id through its - hooks, `claude --resume `; codex, ...). +1. ~~**Restore after a crash or shutdown.**~~ Done for pi and Claude Code + (see the README). Next, when used: other agents' session references + (codex, ...). 2. **Raise the right window.** Jumping to an agent activates the terminal app; with several windows (several Ghostty windows, say) it should raise the exact window that holds the tmux client, not whichever was last used. -- cgit v1.2.3