fix(sessions): read the composer from a styled capture so a prompt suggestion is not a draft

Claude Code draws its prompt suggestion in an empty composer, the first letter in the reverse-video cursor cell and the rest faint, so a plain capture read it as typed text and keep-warm never nudged those sessions. The keep-warm pane read now uses capture-pane -e and drops the suggestion before checking the composer.

Also from review: an off status carries no window, automation and an unreadable composer retry instead of stopping, a failed evaluation re-arms a retry, a trigger during an evaluation queues one follow-up that remove() cancels, and the cap's clock is seeded from lastSubmitAt for pre-upgrade state.
This commit is contained in:
JD committed 2026-10-19 19:58:14 -04:00
1 parent 5db6c633d3
commit 83d80578e4
13 files changed
+292 -37

No files matched your search

+2 -1
View File
@@ -117,7 +117,8 @@ describe('the pane read behind the last two guards', () => {
const at = port.indexOf('readPane: (view) => {');
expect(at).toBeGreaterThan(-1);
const body = port.slice(at, port.indexOf('publish: (id, status) => {', at));
expect(body).toContain('const limit = detectUsageLimitPause(text);');
expect(body).toContain('this.mux.capturePaneText?.(muxName, undefined, { styles: true })');
expect(body).toContain('const limit = detectUsageLimitPause(plainFrame(text));');
expect(body).toContain('limitShown: limit !== null && limit.resetAt > Date.now(),');
expect(body).toContain('composerEmpty: composerIsEmpty(text,');
});