[Bug]: Pi question dialog remains stuck after restarting the provider session #33519
Send to my agentBefore submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- Use a Pi agent in T3 Code until the agent opens a user-question menu through
ask_user_question. - Leave the question unanswered.
- Press Cmd+K and restart the Pi session.
- Return to the original thread and try to continue.
Expected behavior#
Restarting the Pi session leaves the thread usable. T3 Code either cancels the old question or restores a working way to answer or dismiss it. A question belonging to a missing provider session must not permanently block the thread.
Actual behavior#
- The question dialog remains open after the session restart.
- Answer submissions fail because the original provider session does not exist.
- Stopping the thread does not clear the saved pending question.
- Settling the thread fails because T3 Code still considers it to be waiting for an answer.
Impact#
Blocks work completely
Version or commit#
0.1.7
Environment#
macOS 27.0.1, build 26A434, Apple Silicon (arm64), Provider: Pi, uestion tool: Pi extension @juicesharp/rpiv-ask-user-question 2.15.0
Logs or stack traces#
{
"environment": {
"t3Code": {
"channel": "Beta",
"installedVersion": "0.1.7",
"lastStartedVersion": "0.1.7"
},
"os": {
"name": "macOS",
"version": "27.0.1",
"build": "26A434",
"architecture": "arm64"
},
"providerInstanceId": "pi",
"model": "openai-codex-3/gpt-6.1-sol"
},
"originalThread": {
"threadId": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79",
"link": "<t3-thread://v2/a9d58232-c39f-4f1c-b599-0938ca55a5c0/30a7b747-18f3-4cf5-ba7b-ee22b40b6b79>",
"status": "failed",
"activeRunId": null,
"pendingRequestCount": 1,
"archived": true,
"latestRun": {
"runId": "run:thread:30a7b747-18f3-4cf5-ba7b-ee22b40b6b79:ordinal:26",
"ordinal": 26,
"status": "failed",
"providerInstanceId": "pi",
"model": "openai-codex-3/gpt-6.1-sol",
"requestedAt": "2026-11-09T18:56:37.185Z",
"startedAt": "2026-11-09T18:56:37.214Z",
"completedAt": "2026-11-09T19:18:05.294Z"
}
},
"fork": {
"threadId": "c02fa515-9d19-4ce4-8e2a-5f8d6bcc18b6",
"link": "<t3-thread://v2/a9d58232-c39f-4f1c-b599-0938ca55a5c0/c02fa515-9d19-4ce4-8e2a-5f8d6bcc18b6>",
"parentThreadId": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79",
"relationshipToParent": "fork",
"pendingRequestCount": 0,
"status": "completed",
"createdAt": "2026-11-09T19:23:53.352Z"
},
"questionId": "322516ca-7e60-40cf-bd16-1de14a338c83",
"timeline": [
{
"position": 1098,
"itemId": "turn-item:provider:pi:native-item:call_e9c036b061c64cb8b691d7d582b0b180%7Cfc_09048c5add158cb2016af2191c0c5087d2a61925bf614757a3",
"type": "dynamic_tool",
"title": "ask_user_question",
"status": "interrupted",
"updatedAt": "2026-11-09T19:23:11.628Z"
},
{
"position": 1099,
"itemId": "turn-item:runtime-request:runtime-request%3Aprovider%3Api%3Aprovider-turn%3Aprovider-turn%253Aprovider%253Api%253Anative-turn%253Aprovider-thread%25253Aprovider%25253Api%25253Anative-thread%25253Apending%2525253Arun%2525253Athread%2525253A30a7b747-18f3-4cf5-ba7b-ee22b40b6b79%2525253Aordinal%2525253A1%25253Aattempt%25253Arun-attempt%25253Arun%25253Arun%2525253Athread%2525253A30a7b747-18f3-4cf5-ba7b-ee22b40b6b79%2525253Aordinal%2525253A26%25253Aattempt%25253A1%3Anative-request%3A322516ca-7e60-40cf-bd16-1de14a338c83%3A16a0fa03-b579-497b-bb4f-2c62e7f3f2cf",
"type": "user_input_request",
"status": "waiting",
"updatedAt": "2026-11-09T19:03:56.359Z"
},
{
"position": 1100,
"itemId": "turn-item:provider:pi:native-item:terminal-failure%3Aprovider-turn%3Aprovider%3Api%3Anative-turn%3Afailed%253Arun-attempt%253Arun%253Arun%25253Athread%25253A30a7b747-18f3-4cf5-ba7b-ee22b40b6b79%25253Aordinal%25253A26%253Aattempt%253A1",
"type": "error",
"status": "failed",
"updatedAt": "2026-11-09T19:18:05.294Z",
"text": "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs."
},
{
"position": 1101,
"itemId": "turn-item:run:run%3Athread%3A30a7b747-18f3-4cf5-ba7b-ee22b40b6b79%3Aordinal%3A26:signal:interrupt-request",
"type": "run_interrupt_request",
"status": "completed",
"updatedAt": "2026-11-09T19:23:11.628Z",
"text": "Stopped by user"
}
],
"trace": [
{
"kind": "provider_session_detached",
"sourceFile": "server.trace.ndjson.2",
"sourceLine": 6651,
"timestampUtc": "2026-11-09T19:18:05.981278+00:00",
"span": {
"type": "effect-span",
"name": "orchestrationV2.dispatch.once",
"traceId": "a49788551885e8ea0ee7a4755f2527f2",
"spanId": "939159c28ce69232",
"parentSpanId": "63d3c1f0eeb1d33b",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794251885981278292",
"endTimeUnixNano": "1794251885982678333",
"durationMs": 1.400041,
"attributes": {
"orchestration_v2.command_id": "040ab679-6e8c-4618-995a-ec5ddca33bc3:detach:provider-session:provider-instance:pi:thread:30a7b747-18f3-4cf5-ba7b-ee22b40b6b79:ffd2e2bc-8fa0-4115-b6ed-50f96ce9538b",
"orchestration_v2.command_type": "provider-session.detach",
"orchestration_v2.thread_id": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79"
},
"events": [],
"links": [],
"exit": {
"_tag": "Success"
}
}
},
{
"kind": "response_failed_before_stop",
"sourceFile": "server.trace.ndjson.2",
"sourceLine": 14218,
"timestampUtc": "2026-11-09T19:22:27.985731+00:00",
"span": {
"type": "effect-span",
"name": "orchestrationV2.dispatch.once",
"traceId": "a49788551885e8ea0ee7a4755f2527f2",
"spanId": "7cadf099cab0db20",
"parentSpanId": "13b7f774f331686e",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794252147985730583",
"endTimeUnixNano": "1794252147987122542",
"durationMs": 1.391959,
"attributes": {
"orchestration_v2.command_id": "ee28c06a-51dd-460a-83c7-9947a5f33085",
"orchestration_v2.command_type": "runtime-request.respond",
"orchestration_v2.thread_id": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79"
},
"events": [],
"links": [],
"exit": {
"_tag": "Failure",
"cause": "OrchestratorDispatchError: Failed to dispatch orchestration command runtime-request.respond (ee28c06a-51dd-460a-83c7-9947a5f33085).\n at file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/runtimeLayer-BDHHK7u1.mjs:145337:79\n at next (<anonymous>)\n at Orchestrator.dispatchRuntimeRequestRespond (Beta)\n at Orchestrator.dispatchRuntimeRequestRespond (definition) (Beta)\n at orchestrationV2.dispatch.once (Beta)\n at orchestrationV2.dispatch.once (definition) (Beta)\n at orchestrationV2.dispatch.withReceipt (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/runtimeLayer-BDHHK7u1.mjs:148657:70)\n at orchestrationV2.dispatch.withReceipt (definition) (Beta)\n at ThreadMessageIntake.dispatchCommand (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/server-UENsecr6.mjs:24792:124)\n at ThreadMessageIntake.dispatchCommand (definition) (Beta)\n at server.runServerCommand (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/binCli-CqQmsJvg.mjs:11017:16)\n at server.runServerCommand (definition) (Beta) {\n [cause]: Error: Provider session provider-session:provider-instance:pi:thread:30a7b747-18f3-4cf5-ba7b-ee22b40b6b79:ffd2e2bc-8fa0-4115-b6ed-50f96ce9538b was not found.\n}"
}
}
},
{
"kind": "thread_stopped",
"sourceFile": "server.trace.ndjson.2",
"sourceLine": 15547,
"timestampUtc": "2026-11-09T19:23:12.300208+00:00",
"span": {
"type": "effect-span",
"name": "orchestrationV2.dispatch.once",
"traceId": "a49788551885e8ea0ee7a4755f2527f2",
"spanId": "6bfb20b3ca95f08e",
"parentSpanId": "bd282749231180b4",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794252192300207500",
"endTimeUnixNano": "1794252192333935792",
"durationMs": 33.728292,
"attributes": {
"orchestration_v2.command_id": "2c107b39-d8b2-4475-98d6-431d28a8fb55",
"orchestration_v2.command_type": "thread.stop",
"orchestration_v2.thread_id": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79"
},
"events": [],
"links": [],
"exit": {
"_tag": "Success"
}
}
},
{
"kind": "response_failed_after_stop",
"sourceFile": "server.trace.ndjson.2",
"sourceLine": 16042,
"timestampUtc": "2026-11-09T19:23:17.220890+00:00",
"span": {
"type": "effect-span",
"name": "orchestrationV2.dispatch.once",
"traceId": "a49788551885e8ea0ee7a4755f2527f2",
"spanId": "4ee0ce7f5eb1a8bd",
"parentSpanId": "2ecd1ff56d301f87",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794252197220889875",
"endTimeUnixNano": "1794252197221787042",
"durationMs": 0.897167,
"attributes": {
"orchestration_v2.command_id": "4916b956-e87f-4462-8ecd-4af7e031907d",
"orchestration_v2.command_type": "runtime-request.respond",
"orchestration_v2.thread_id": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79"
},
"events": [],
"links": [],
"exit": {
"_tag": "Failure",
"cause": "OrchestratorDispatchError: Failed to dispatch orchestration command runtime-request.respond (4916b956-e87f-4462-8ecd-4af7e031907d).\n at file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/runtimeLayer-BDHHK7u1.mjs:145337:79\n at next (<anonymous>)\n at Orchestrator.dispatchRuntimeRequestRespond (Beta)\n at Orchestrator.dispatchRuntimeRequestRespond (definition) (Beta)\n at orchestrationV2.dispatch.once (Beta)\n at orchestrationV2.dispatch.once (definition) (Beta)\n at orchestrationV2.dispatch.withReceipt (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/runtimeLayer-BDHHK7u1.mjs:148657:70)\n at orchestrationV2.dispatch.withReceipt (definition) (Beta)\n at ThreadMessageIntake.dispatchCommand (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/server-UENsecr6.mjs:24792:124)\n at ThreadMessageIntake.dispatchCommand (definition) (Beta)\n at server.runServerCommand (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/binCli-CqQmsJvg.mjs:11017:16)\n at server.runServerCommand (definition) (Beta) {\n [cause]: Error: Provider session provider-session:provider-instance:pi:thread:30a7b747-18f3-4cf5-ba7b-ee22b40b6b79:ffd2e2bc-8fa0-4115-b6ed-50f96ce9538b was not found.\n}"
}
}
},
{
"kind": "thread_forked",
"sourceFile": "server.trace.ndjson.2",
"sourceLine": 17669,
"timestampUtc": "2026-11-09T19:23:54.036810+00:00",
"span": {
"type": "effect-span",
"name": "orchestrationV2.dispatch.threadFork",
"traceId": "a49788551885e8ea0ee7a4755f2527f2",
"spanId": "9c8a09aded5d5b14",
"parentSpanId": "b48cf49d02b960c6",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794252234036810208",
"endTimeUnixNano": "1794252234045152625",
"durationMs": 8.342417,
"attributes": {
"orchestration_v2.command_id": "75bfd49e-1b75-49ed-848c-3b556cc7c49d",
"orchestration_v2.command_type": "thread.fork",
"orchestration_v2.source_thread_id": "30a7b747-18f3-4cf5-ba7b-ee22b40b6b79",
"orchestration_v2.target_thread_id": "c02fa515-9d19-4ce4-8e2a-5f8d6bcc18b6",
"orchestration_v2.source_point_type": "run"
},
"events": [],
"links": [],
"exit": {
"_tag": "Success"
}
}
},
{
"kind": "settle_blocked",
"sourceFile": "server.trace.ndjson.1",
"sourceLine": 894,
"timestampUtc": "2026-11-09T19:24:20.988100+00:00",
"span": {
"type": "otlp-span",
"name": "EnvironmentRpc.request",
"traceId": "7680469ace6ad50a84d934c83ae40cdd",
"spanId": "dca6010006d914fe",
"parentSpanId": "644562be27302564",
"sampled": true,
"kind": "internal",
"startTimeUnixNano": "1794252260988100000",
"endTimeUnixNano": "1794252260993300000",
"durationMs": 5.2,
"attributes": {
"environment.id": "a9d58232-c39f-4f1c-b599-0938ca55a5c0",
"rpc.method": "orchestration.dispatchCommand"
},
"resourceAttributes": {
"telemetry.sdk.name": "effect",
"telemetry.sdk.language": "webjs",
"telemetry.sdk.version": "4.1.2",
"service.namespace": "t3code",
"service.instance.id": "c8761d6d-6102-4e87-a7bd-899fc7e92c23",
"t3code.release.channel": "stable",
"deployment.environment.name": "production",
"service.runtime": "t3-web",
"t3code.client.surface": "desktop",
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) T3CodeBeta/0.1.7 Chrome/152.0.7977.169 Electron/44.10.1 Safari/537.36",
"browser.language": "en-US",
"browser.platform": "macOS",
"browser.mobile": false,
"browser.brands": [
"Not?A_Brand 24",
"Chromium 152"
],
"service.name": "t3code-web",
"service.version": "0.1.7"
},
"scope": {
"name": "effect",
"version": "4.1.2",
"attributes": {}
},
"events": [
{
"name": "exception",
"timeUnixNano": "1794252260993300000",
"attributes": {
"exception.type": "OrchestrationV2DispatchCommandError",
"exception.message": "Thread 30a7b747-18f3-4cf5-ba7b-ee22b40b6b79 is waiting on an approval or question. Answer it before settling.",
"exception.stacktrace": "OrchestrationV2DispatchCommandError: Thread 30a7b747-18f3-4cf5-ba7b-ee22b40b6b79 is waiting on an approval or question. Answer it before settling.\n at Vv (t3code://app/assets/utils-BL51zcsk.js:14:66754)\n at Object.transform (t3code://app/assets/utils-BL51zcsk.js:14:66831)\n at e (t3code://app/assets/utils-BL51zcsk.js:14:36314)\n at t3code://app/assets/utils-BL51zcsk.js:13:10875\n at t3code://app/assets/utils-BL51zcsk.js:1:2110\n at Pg (t3code://app/assets/utils-BL51zcsk.js:14:35991…[truncated]"
}
}
],
"links": [],
"status": {
"code": "2",
"message": "Thread 30a7b747-18f3-4cf5-ba7b-ee22b40b6b79 is waiting on an approval or question. Answer it before settling."
}
}
}
],
"privacy": "Question wording, answer options, business conversation, project paths and full log files are omitted. Thread/request/session IDs and T3 application stack traces are retained.",
"limitation": "Existing-state investigation only. The reporter supplied the Cmd+K restart action; no independent reproduction or exact restart-command timestamp was established."
}
Screenshots, recordings, or supporting files#
No response
Workaround#
- Forking the thread allowed work to continue; the fork has no pending requests.
kshurukhin(GitHub profile, opens in a new tab) added labelsbug
kshurukhin(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge closed this
Sign in to join this conversation.
Thanks for the detailed trace. This is the same defect as pingdotgg/t3code#33517, so I'm closing this one as a duplicate. Please follow that issue.
Checked on main at
206a8e6937:stopThreadSession, which dispatchesprovider-session.detachwithreason: "client-requested". That is the same command https://git.cafe/pingdotgg/t3code/issues/33517 triggers from the branch picker or "Disconnect agent session", and your trace's…:detach:provider-session:…command ID has the same form.supportsMultipleProviderThreadsPerSession: false. Detaching its only thread therefore takes thereleaseEntrypath described in https://git.cafe/pingdotgg/t3code/issues/33517:attachedThreadIdsis already empty whenwriteReleasedRuntimeRequestEventsruns, so the pendingask_user_questionrequest is never cancelled. After that,runtime-request.respondfails with "Provider session … was not found",thread.stopleaves the request as it is, andthread.settleis refused. These are the four symptoms you listed.The fix for https://git.cafe/pingdotgg/t3code/issues/33517 covers the Pi question card as well. Until it ships, forking the thread (as you did) or archiving it gets you unstuck.