Skip to content

AskUserQuestion response is lost after ACP MCP timeout #3408

Closed

Description

@neox31

Summary

When AskUserQuestion is used through the Cursor ACP provider, the MCP call times out after about 60 seconds while the BB interaction remains open. If the user later submits the visible form, BB records it as resolved, but the answer never reaches the agent because the original tool call has already failed.

Environment

  • BB: 0.42.1
  • Provider: Cursor via ACP (acp-cursor)
  • Plugin: builtin [email protected]
  • Plugin SDK bundle: 0.4.47
  • Ubuntu 26.04 on WSL2

Reproduction

  1. Start a Cursor/ACP thread.
  2. Call AskUserQuestion with one or more options.
  3. Leave the form unanswered for more than 60 seconds.
  4. Observe the tool result: MCP error -32001: Request timed out.
  5. The form is still visible and the thread still has a pending interaction.
  6. A second AskUserQuestion call reports that the thread is already awaiting user interaction.
  7. Submit the original form before its BB interaction expiry.

Actual behavior

The submission closes the UI, but the selected answers never reach the agent. The user must repeat them manually in chat.

In the observed run:

  • interaction became pending at T+0
  • MCP tool call failed at approximately T+60s
  • interaction resolved with plugin_submitted at T+299.8s
  • plugin handler duration was approximately 299.9s
  • the resolved interaction had no surviving provider call to receive its result

The interaction itself had a 10-minute expiry, so the MCP timeout and BB interaction lifetime disagree.

Expected behavior

The system should have one coherent lifecycle:

  • either keep the ACP/MCP tool call alive until the interaction resolves,
  • or cancel/expire the BB interaction when the provider call times out,
  • or persist and deliver a late submitted result through a supported follow-up mechanism.

The UI must not continue accepting an answer that will be silently discarded.

Likely boundary

The builtin plugin awaits bb.ui.requestInput(...), whose default timeout is 10 minutes. The Cursor MCP caller appears to enforce roughly 60 seconds. Cancellation/timeout is not propagated across the ACP dynamic-tool bridge, leaving a live BB interaction after the provider has abandoned the request.

Suggested tests

  • ACP dynamic tool awaiting user input for more than 60 seconds still returns the selected answer.
  • Provider cancellation removes or cancels the corresponding BB interaction.
  • A timed-out provider call cannot leave a submit-capable orphan form.
  • Retrying after cancellation does not report a stale pending interaction.

Activity

  1. added theissue type on Sep 10, 2026
  2. added
    providers
    provider-acp
    ask-user-question
    on Sep 10, 2026
  3. neox31 commented on Sep 10, 2026

    @neox31
    Author

    Related: #1944 was the same symptom in OpenCode and was fixed by #1945. That fix sends heartbeats only when the MCP request includes _meta.progressToken; requests without a token explicitly retain the old behavior. The current reproduction is Cursor ACP on BB 0.42.1, where the call still expires at ~60s despite the heartbeat code being present. This issue should therefore track the uncovered Cursor/no-progress-token path rather than repeat the already-fixed OpenCode path.

  4. added
    partial-repro
    on Sep 10, 2026
  5. bb-slop-cop commented on Sep 10, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Bug · Priority: High · Effort: Medium. Applied providers, provider-acp, ask-user-question, and partial-repro.

    Reproduction and root-cause report — PARTIALLY REPRODUCED, medium root-cause confidence.

    The ACP MCP proxy drops cancellation notifications and later sends answers to request IDs the caller has abandoned. In two clean checkouts of trusted origin/main, a focused MCP SDK test timed out, left the bridge request open, and rejected the late answer as an unknown message ID. Existing progress-aware tests pass. Cursor's exact timeout and the live BB form lifecycle remain unverified.

    No PR: the full lifecycle is only partially reproduced, and an end-to-end cancellation repair may cross protocol boundaries outside this rule's simple-fix limits.

    AGENT GENERATED

  6. neox31 commented on Sep 10, 2026

    @neox31
    Author

    Reproduced again in the same Cursor ACP environment while planning follow-up work: a new two-question AskUserQuestion interaction remained open, but the MCP call returned -32001: Request timed out after ~60 seconds. The choices again had to be supplied manually as a normal user message. This confirms the issue is deterministic/repeatable on BB 0.42.1 rather than a one-off race.

  7. akshendra commented on Sep 11, 2026

    @akshendra

    Related native Codex lifecycle evidence, with an agent error that must be separated from BB's transport behavior. I am adding it here for cancellation/cleanup triage, not claiming to reproduce the Cursor/no-progress-token cause or late-answer loss in this issue.

    Environment: BB desktop 0.42.1, native Codex CLI 0.153.4, macOS 26.5 / arm64, worktree environment with BB Connect paired. This is an observed trace on the installed release; I have not repeated it in a clean environment or on a newer release/main. No BB source commit was tested or patched.

    The worker called the bundled AskUserQuestion through code mode:

    const r = await tools.AskUserQuestion({
      questions: [{
        header: "Public label",
        multiSelect: false,
        question: "Which external client’s required public label should label() return?",
        options: [
          { label: "State:", description: "Keep the current `State: <value>` string; the existing test must change." },
          { label: "Status:", description: "Change to `Status: <value>`; the current test already describes this contract." }
        ]
      }]
    });
    text(r);

    The execution returned Script running with cell ID 3 after 31 seconds. The worker called wait once with {"cell_id":"3","yield_time_ms":30000,"max_tokens":2000} and again received Script running with cell ID 3 after 31 seconds. It then ended its turn instead of continuing the wait. Its final said it was blocked on the client choice. The rollover to a final response is a worker error; the trace does not show the later HTTP timeout causing that decision.

    BB's recorded sequence for the same call:

    Event Epoch milliseconds Elapsed from tool start
    item/started, AskUserQuestion pending (seq 48) 1789102745456 0 ms
    Interaction pending (seq 49) 1789102745462 6 ms
    turn/completed (seq 74) 1789102817694 72,238 ms
    item/completed, failed, Dynamic tool call failed (seq 75) 1789102817704 72,248 ms
    Interaction interrupted, request-aborted (seq 76) 1789103046496 301,040 ms
    Matching host-daemon forwarding error 1789103046496 301,040 ms

    The failed item's separate durationMs field is 72296; the elapsed column above is computed by subtracting the start event's timestamp, not by treating that duration as the HTTP request lifetime.

    Trimmed matching daemon error (local address and stack omitted):

    {
      "component": "host-daemon",
      "tool": "AskUserQuestion",
      "threadId": "thr_d27zavx6c9",
      "turnId": "dac5ea4961-t1",
      "callId": "dac5ea4961-i7",
      "msg": "Failed to forward dynamic tool call to server",
      "err": {
        "type": "TypeError",
        "message": "terminated",
        "cause": {
          "type": "BodyTimeoutError",
          "message": "Body Timeout Error",
          "code": "UND_ERR_BODY_TIMEOUT"
        }
      }
    }

    The remaining question for BB is whether provider turn completion/tool abandonment should cancel the forwarding request and corresponding interaction immediately, rather than leaving their cleanup to the later body timeout. This suggests a cancellation-lifecycle gap, but does not establish its root cause. There was no submitted answer in this trace; I have not tested late-answer delivery or independently inspected the form after turn completion.

    Closest reenactment to verify: invoke this pending question through native Codex code mode, let exec/wait yield, then finish the provider turn with the cell still running; compare tool, interaction, and HTTP-request termination. This is a proposed regression scenario, not an independently rerun reproduction. It differs from simply waiting five minutes in a correctly waiting agent.

    Source investigation thread (owner access required): https://akshendra.getbb.app/projects/proj_d7z3rqv2fj/threads/thr_d27zavx6c9 . The relevant payload, events, and calculation are included above so this comment can be assessed without that private thread.

    AGENT GENERATED

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

    ask-user-questionpartial-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions