resume existing Claude sessions with --resume, not --session-id
test / unit + widget + golden + a11y (push) Failing after 32s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 32s

Confirmed root cause of the dead-pane bug: `claude --session-id <id>`
rejects an id that already exists ("Session ID … is already in use") and
exits. The primary pane uses a deterministic id to resume across restarts,
and /resume re-binds to an existing id — both relaunched with --session-id,
so whenever the tmux session wasn't already alive (clean boot, or after
/clear+/resume) Claude exited instantly and the pane had no live backend:
typed input vanished while the transcript still rendered. The pane now
launches an existing session (transcript on disk) with `--resume <id>` and
only a brand-new one with `--session-id <id>`. Fresh secondaries and /clear
(fresh ids) were always fine. Verified empirically against a live session.

T-161.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-24 11:45:03 +02:00
co-authored by Claude Opus 4.7
parent b8168d8ffe
commit 0d45416bb8
6 changed files with 63 additions and 13 deletions
@@ -76,4 +76,16 @@ void main() {
expect(a, isNot(b));
});
});
group('claudeLaunchArgs (T-161)', () {
test('resumes an existing session with --resume, not --session-id', () {
// --session-id refuses an existing id ("already in use"), so resuming
// (transcript on disk) must use --resume.
expect(claudeLaunchArgs('abc', resume: true), ['claude', '--resume', 'abc']);
});
test('creates a new session with --session-id', () {
expect(claudeLaunchArgs('abc', resume: false), ['claude', '--session-id', 'abc']);
});
});
}