Skip to content

Question cards are erased by machine-delivered turns (grok/kimi hit it every time) #687

Closed

Description

@currentbits

Symptom: under grok, question cards ("modal popups") sometimes never appear, or appear and then vanish before they can be answered.

Root cause (provider-asymmetric, not grok-specific code): claude asks over the blocking permission channel, so the thread stays active while a question is open. grok and kimi cannot block — headless grok -p answers its own ask_user_question with "No user is available…" and the turn ends (#647). The card is persisted on the thread and the thread goes idle.

An idle thread is fair game for a machine-delivered turn:

  • flushOrchNotices (worker-finished notice, peer_send) → startRun({fromNotice:true})
  • orchServer.thread_send → startRun({fromInbound:true}) or setQueued({inbound:true})

startRun cleared pendingQuestion: null + awaitingInput: false unconditionally ("any user turn supersedes an open question card"), and setQueued did the same at queue time. A worker notice is not a user turn, so the card was deleted with nobody having seen it. flushOrchNotices bails on active.has(threadId), which is exactly why claude never showed this.

Measured on the live store (coder-store.json, 2026-08-23): 82 agent asks; in 4 of them the very next user-role message was a [orchestration] notice rather than an answer — the card was wiped. Shortest gap: 2 s after the question went up. Every one is a thread whose CLI ended its turn after asking, which is 100% of grok's questions.

Fix

  • electron/runner.js startRun: fromNotice/fromInbound turns preserve pendingQuestion and keep awaitingInput true. A human turn still supersedes the card.
  • electron/services.js setQueued: an inbound: true queue no longer clears the card.
  • electron/test/grok.test.js: grok asks → notice turn runs → card survives → the user's answer clears it. Fails without the fix.

npm run test:electron 2069 pass / 0 fail, npm run typecheck clean.

Not fixed (by design, separate concern): permission and plan-approval modals never appear under grok at all. Non-interactive grok -p has no control-protocol channel, so Solenta maps asking modes to bypassPermissions + --always-approve (#578) and grok gates tools with its own internal "Auto mode blocked this action" instead. That is structural, not a regression.

Activity

  1. added
    plan:doing
    plan:done
    and removed
    plan:done
    plan:doing
    on Oct 3, 2026
  2. currentbits commented on Oct 3, 2026

    @currentbits
    OwnerAuthor

    Verified on main (2026-10-03 board cleanup). startRun keeps pendingQuestion / pendingPlan / awaitingInput for machine turns (fromNotice / fromInbound): electron/runner.js:8490-8507. Inbound setQueued no longer clears the card: electron/services.js:1818-1820. Grok regression test: electron/test/grok.test.js:860-874.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions