← Back to Pull requests

fix(resume): Claude's Resume session picker waits for a person, and sends refuse there #2040

Closed
unknown closed this pull request without merging on Oct 25, 2026 19:02 UTC
View on GitHub
unknown unknown commented on Oct 25, 2026 17:12 UTC
Author

What changes

When claude --resume has no exact session to open, Claude Code 2.1.309 draws its Resume session picker. That happens for a bare --resume, and for a name that matches no session title or more than one.

OpenRig read that screen as resumed and ready:

  • checkReady() returned ready: true, and the native resume probe returned resumed / active_runtime.

  • The cause: the probe knew only the numbered and two-choice choosers, then fell through to "claude is the foreground process".

  • What follows from it: a send or startup input lands in the picker's search, and Enter resumes the focused card, which may be the wrong conversation.
  • Now:

  • The probe recognizes the picker and reads it as attention_required / claude_resume_selection_prompt, so checkReady isn't ready.

  • A plain rig send to that screen refuses with target_needs_input and types nothing.

  • Startup reports attention_required at once, instead of waiting out its readiness timeout and reporting failed. This now also applies to the numbered and two-choice choosers, whose code was missing from the attention list.
  • How the picker is recognized

  • The anchor: the Resume session heading, with an optional detail after it such as (2 of 9), followed directly by the search box: ╭─…─╮, a │ ⌕ row, any rows a long query wraps to, then ╰─…─╯.

  • Not required: the cards, the query and the hint row. They change with the mode: a list, a search with no match, a prefilled name, a project with no conversations.

  • Only while it's the last thing drawn: if Claude's input frame, its version header or a reply follows the box, the picker is history above a session that resumed. That's the same rule the numbered choosers follow. A reply that quotes the picker above a live composer reads as resumed.

  • One detector serves the probe and the send guard.
  • Proof

  • The fixture is a native capture of Claude Code 2.1.309's picker after a bare claude --resume in a 100×80 pane (test/fixtures/claude-resume-picker-2.1.309.json, two frames). Variants are built from its rows:

  • - a 100×24 replay;
    - a no-match search;
    - a wrapped query;
    - a heading count;
    - no conversations;
    - an old picker above a resumed session, with a plain and a labelled frame;
    - a quoting reply;
    - a heading with no box.
  • RED: with these tests on the base's source, 15 fail: the probe shapes, the send refusals, checkReady and startup. The history and quote controls pass on both.

  • GREEN, on Linux: the 32 daemon test files that touch the picker's literals, the chooser code, the attention codes or the pane classifier pass: 2,492 tests, 0 failed. The base run had 2,472, and the difference is the 20 new tests. Daemon tsc passes.
  • Not covered

  • Rename mode: this assumes the picker keeps its search box while renaming a session. That's how its renderer reads, but no rename-mode capture was taken.

  • An unknown id doesn't open the picker: Claude prints No conversation found with session ID and exits, which already reads as failed / no_conversation_found.

  • Before the picker is drawn: an input sent then still isn't caught, since nothing on screen shows the picker yet.
  • Round 1

  • A card's title no longer retires the picker. A title can say "Claude Code v2.1.309". Before, any row below the box holding that text read as Claude's header, so a live picker read as resumed and a send typed into its search.

  • - What retires it now: only Claude's framed input box, or a reply row (● or ⏺ at column 0), after the box. A resumed session draws its input box, so an old picker above a session, and a reply quoting the picker, still read as resumed.
    - The numbered and two-choice choosers keep their check. It reads only rows after their last option.
  • The send guard skips the picker shape in Codex and Pi panes, where it can only be printed output.

  • Proof:

  • - RED: with the old head's source, 6 new cases fail: two card titles in the probe, a header-titled card through the real transport with null and claude-code runtimes, and a picker printed in Codex and Pi panes.
    - GREEN, on Linux at 923885a2: the 32 affected daemon test files pass, 2,498 tests with 0 failed. tsc passes.

    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    Claude’s current “Resume session” picker is now recognized as requiring your attention. Sessions waiting for you to choose a conversation remain in that state until you make a selection.
    Sending a prompt while the picker is visible is blocked, including in compact terminal layouts. A picker shown earlier in the conversation does not prevent sending once an active composer is available. *

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 624 lines (+468 / -156) across 7 files Reviewer: openrig-review Review duration: 109m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 624 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.385
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #2040"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.3% (MEDIUM) · Higher = larger blast radius
    55.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.8% · Safe to merge
    21.8%