Skip to content

Pi run fails with "Provider turn failed." when a question's "Type something" option opens a follow-up input dialog #22405

Open

Description

@TheAsda

What happened

On a Pi thread, the @juicesharp/rpiv-ask-user-question extension asked a question. I typed my answer into the chat box, then picked the question's last option, "Type something." The thread errored with "Provider turn failed." Pressing Send then errored with "The provider could not start this turn: the previous turn is still running. Retry the turn; if it keeps failing, check the provider setup and server logs."

Diagnosis

  • In its RPC fallback, the extension answers "N. Type something." by opening a follow-up ui.input(...) dialog (extension_ui_request, method: "input", title = header + question + all option lines + "Type your answer:", placeholder "").
  • The Pi adapter's handleExtensionUiRequest emits runtime_request.updated, node.updated and turn_item.updated for it. The runtime request and node were saved; the user_input_request turn item never was.
  • Normalizing that event failed in ProviderEventIngestor. Then the mapError that wraps the failure in ProviderEventNormalizeError threw its own Error: Schema validation failed while building that error, because the error schema validates the full providerEvent (apps/server/src/orchestration-v2/ProviderEventIngestor.ts:43-55, :716-726). The resulting defect broke provider event ingestion, and RunExecutionService failed the run with the generic "Provider turn failed." (RunExecutionService.ts, ingestion catchCauseIf path).
  • The Pi process was still inside the same turn, waiting on the input dialog. The provider turn stayed running (it was never finalized), so the next user message hit PiAdapter.startTurn → "already has an active turn".
  • thread.stop then hit Pi RPC abort failed: timed out after 2000ms. The cancelled input request was marked not_resumable.
  • Which field failed validation is not confirmed: the logged schema issue was truncated (~3.2 MB). Two separate problems: (a) some field of the Pi input-dialog turn item does not match the contract; (b) a schema failure while building ProviderEventNormalizeError escapes as a defect instead of a typed error, so one bad event kills the run while Pi keeps going.

Steps to reproduce

  1. Install Pi with npm:@juicesharp/rpiv-ask-user-question (2.13.9) and start a Pi thread in T3 Code.
  2. Ask the agent to use ask_user_question with a single-select question.
  3. In the question card, choose the last option, "N. Type something."
  4. Observe "Provider turn failed." while Pi is still waiting on the follow-up "Type your answer:" input dialog.
  5. Send any message → "The provider could not start this turn: the previous turn is still running…"

Version

0.1.1-nightly.20261020.3411 (desktop app + local background service). The t3 triage CLI was 0.1.1-nightly.20261019.3373.

Environment

Linux x64 on WSL2 (6.18.54.1-microsoft-standard-WSL2), Node v26.8.2, pi 1.3.0, @juicesharp/rpiv-ask-user-question 2.13.9, model zai/glm-5.3-flash

Evidence

[19:46:23.998] WARN orchestration V2 provider event ingestion failed
  runId: 'run:thread:c0346d41-…:ordinal:1'
  cause: 'Error: Schema validation failed
    at Schema.make
    at new ProviderEventNormalizeError
    at RunExecutionService.startRootRun …
  [cause]: Error: {"~effect/SchemaIssue/Issue" … "_tag":"Composite" …}'… 3273349 more characters

runtime requests (thread c0346d41-…):
  16:45:12.051 user_input resolved 16:45:59.122   (question 1)
  16:45:59.129 user_input resolved 16:46:23.987   (question 2 → "3. Type something.")
  16:46:23.992 user_input cancelled 16:46:35.071  (follow-up input dialog; no turn item saved)
run 1: failed at 16:46:23.998; provider turn 1 still status=running, completedAt=null

[19:46:30.413] ERROR orchestration V2 provider turn start failed
  ProviderAdapterProtocolError: pi provider protocol error: Pi provider thread … already has an active turn.
16:46:31.632 PiRpc.request FAIL PiRpcTimeoutError: Pi RPC abort failed: timed out after 2000ms.

Related issues

#21762 (blank Pi question descriptions failing runs) is the same kind of bug and already ships in this build; this is a different field/dialog. #21208 is a different Pi stream error (after update/idle). No duplicate found.

Fix applied or workaround

None applied. Workaround: avoid the "Type something." option on extension questions. Stop and resend clears the stuck turn.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Activity

  1. mattiaz9 commented on Oct 21, 2026

    @mattiaz9

    Not sure if related, but I had the same error when selecting the '500k' context of Grok 4.7 model of Cursor. '256k' context works fine.

  2. added
    needs more infoInitial triage showed no bug. Awaiting more info
    and removed
    needs more infoInitial triage showed no bug. Awaiting more info
    on Oct 21, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions