Repository navigation
pane-idle: stop an unanswered Codex approval dialog reading as busy - #14
Merged
Merged
Conversation
check_idle matched the bare substring "esc to cancel" anywhere in a capture
as a Gemini busy marker. Codex's approval dialog ends "Press enter to confirm
or esc to cancel" -- captured live -- so a pane sitting on an UNANSWERED
confirmation dialog answered BUSY. That pane is stuck waiting on a human, and
every caller that asks "is this busy?" before escalating skipped it in
silence: one agent sat that way for over two hours before somebody noticed.
The phrase now has to LEAD ITS CLAUSE: it counts only when it opens its own
line (a footer, indented or not) or sits directly after "(" as an inline hint.
Positional and structural, like the end-of-line counter rule above it, rather
than a list of the wordings that collide today -- this file has gone blind
three times already by enumerating a symbol set that later moved.
Strictly narrower than the substring it replaces: every string the new rule
matches, the old one matched too. That subset property bounds the change to
BUSY -> IDLE transitions and prevents new false-busy classifications. It does
not, on its own, establish that what it moves was a false busy rather than a
true one, because containment is agnostic to which of the old matches were
correct. The live Gemini footer-only control plus the separate counter and
"Generating" markers are the evidence that known true-busy shapes remain
covered. The containment is pinned by a test, and that test pins the DIRECTION
of the change, not the correctness of every removed classification.
Inline inside check_idle, no new function and no version bump: the surface the
lib-version gate guards is unchanged.
Tests, in inbox-push.test.sh rather than a pane-idle.test.sh that would collide
with work in flight: 70 -> 80 cases, 0 failures. The real Gemini footer still
reads busy, and so does the same footer with its phase word swapped, which is
what proves the narrowed branch carries that verdict rather than riding on the
separate "Generating" match. Reverting the library to the bare substring turns
the dialog and the prose-quoting case red, so the fixtures are regression tests
rather than vacuous ones.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied rig
2D5C
ht now. Please check back later.
Summary
check_idle()'s Gemini busy marker matched the bare substringesc to cancelanywhere in a captured pane. Codex's own confirmation-dialog footer contains the same substring (Press enter to confirm or esc to cancel), so an unanswered Codex approval dialog read as busy instead of stuck, and got silently skipped by every downstream tier that depends on this shared detection function.Fix: anchor the match to where a hint marker actually renders (line start, or immediately after an open paren) rather than matching the phrase anywhere:
instead of
This is a structural rule rather than an enumerated wording list, matching this file's own established design discipline (several past incidents came from enumerating a symbol set or wording that later changed underneath it). The new rule is strictly narrower than the old one: everything it matches, the old rule also matched, which bounds this change to BUSY -> IDLE transitions only and rules out any new false-busy classification. That containment property doesn't by itself prove every removed match was a false positive rather than a true one, though, which is a distinction this PR's review caught and the commit is explicit about: the actual evidence that known Gemini busy shapes remain covered is empirical (the real captured footer fixture, with redundant independent markers backing it up), not the subset property alone.
Review
Two rounds from a different model family before opening. First pass: implementation correct, no real Gemini shape lost to the anchor, but held on exactly the reasoning distinction above, the commit and comments originally overclaimed what the containment property proves. Second pass, after a text-only correction (no regex/fixture/assertion changes): approved.
Verification
Independently re-run: typecheck clean, all three leak-gate scopes clean (including the commit-message scope, relevant here since the message was amended), licence gate clean, boundaries clean, full suite green (
packages/deckunaffected,packages/base41/41,inbox-push.test.sh80/80 including 10 new cases for this fix). Reproduced the revert-to-red myself: swapping the old bare-substring rule back in gives 78 passed / 2 failed, the exact two cases pinning the narrowing (the Codex dialog case, and a case where the phrase is quoted mid-sentence in prose). Confirmed clean merges against the other two in-flight branches viagit merge-tree.