DeepSeek Harness TUI: ask_user_question ASK_ABORTED (DSH)
When DeepSeek Harness (DSH) runs with the desktop TUI as its only host, a model call to ask_user_question renders no questionnaire at all: there is only a spinner, and after 8–20 seconds it fails with Error: ask_user_question was aborted before the user answered (code: ASK_ABORTED). That message blames the user, while the actual chain is the reverse — @deepseek-ai/dsh-api-remotes unconditionally places the request on its waterfall forwarding table, forwarding it to a remote surface that has no answerer; the gateway cancels it on timeout; and dsh-user-questions then wraps the gateway's real cause as "the user did not answer". So do not waste time on the model, permissions, or question shape. First prove whether the request ever reached the local question store (#11721).
This error message is lying to you: ASK_ABORTED does not mean the user cancelled
In one sentence: ASK_ABORTED is only the outermost wrapper, and the cause it carries is the real error — but that cause never enters the log. Three facts:
- The error is built by
abortedQuestion()(dsh-user-questions/lib/index.js:435–437): a fixed message,code: ASK_ABORTED, and the originalerrorhung oncause. - The
catchbranch tries to recover a user-question error first, and if it is not aUserQuestionErrorwhilesignalis alreadyaborted, it throws this wrapper (aroundlib/index.js:688). causenever lands in a log line or a tool result, so from outside all you can see is "the user did not answer" — which is exactly why this bug took several rounds to pin down.
Put differently, when you see ASK_ABORTED, "the user cancelled" is one possibility, not the only explanation. On the same machine, pressing Esc yields ASK_CANCELLED; that is the genuine user-side cancel, and the two codes must be read separately.
Three pieces of evidence: prove the request never reached the local panel
The decisive signal is that the TUI's QuestionStore never receives the request while the error stack points at the gateway's cancel path. In order:
-
Confirm the setup: TUI is the only host and no web client is connected. The reproduction in the thread is a desktop
dsh-tuihost with no web client attached. Expected: under that combination, callingask_user_questionputs no panel in the composer slot, only a spinner. -
Temporarily instrument the
catchindsh-user-questions. The reporter used threeappendFileSynccalls to record entry / noAnswerer / catch-with-stack, and the log looked like this on a rerun:
04:07:27.883Z ASK-in agentId=3871cf73-… nq=1 fields=["questions","agent","signal"]
04:07:35.845Z CATCH name=Error code=undefined msg=typert gateway: Remote event was cancelled aborted=true
stack=Error: typert gateway: Remote event was cancelled
at AbortSignal.abort (…/dsh-api-gateway/lib/index.js:1084:72)
Expected: you see both "the request did enter the service" and "it died on a gateway cancellation", with no log at all from the local answer path in between. This is the core evidence of the whole investigation.
-
Confirm the TUI side's
QuestionStorehas no snapshot. Expected: the panel never mounts and the store holds no pending question. That means the problem is not "panel rendering is broken" but that the request never arrived at the local listener. -
Rule out "did I press Esc?" Touch no keys at all and just wait. Expected:
ASK_ABORTEDstill arrives after 8–20 seconds, while the Esc scenario producesASK_CANCELLED.
After these four steps, the "the local panel is broken" hypothesis is fully eliminated.
The mechanism: claim, timeout-cancel, then mask the cause
In one sentence: one request is mishandled at three consecutive stages; fixing any single stage alleviates it, but the root cause is that the forwarding layer has no capability check. Stage by stage:
-
The forwarding layer claims unconditionally.
dsh-api-remoteshardcodesuser-questions/requestintoAPI_REMOTE_FORWARDED_EVENTS(lib/types/remote-events.js:44, andlib/index.js:133–137inside the bundle) inwaterfallmode. It never checks whether any connected peer can render or answer a questionnaire. -
The local answerer is skipped. Because the forwarding layer claims the event first, the TUI's own
questions-answerer(dsh-tui/lib/types/dsh-adapter/questions-answerer.js:39–42) never receives the request, soAskUserQuestionPanelnever mounts. The panel itself is fine — as soon as the request reaches the store it renders correctly. -
The gateway cancels after a timeout. After 8–20 seconds the
AbortSignalis aborted and the pending remote event is rejected (cancelRemoteEventatdsh-api-gateway/lib/index.js:1084; the agent-context release path is at:1072). -
The error is re-wrapped. In its
catch,dsh-user-questionsseessignal.abortedand throwsabortedQuestion(error), hiding the gateway'stypert gateway: Remote event was cancelledinsidecauseso that only "the user did not answer" remains outside. -
Why only the TUI is hit. The only questionnaire UI in the codebase is the web client (
dsh-client-ui-user-questions/lib/client.js:1932registers theuser-questions/requestlistener). The desktop TUI combination has no such peer, so the forwarded request has nobody to answer it and can only wait for the timeout.
Minimal patch: delete one forwarding entry and it recovers immediately
In one sentence: remove the user-questions/request entry from the bundle's forwarding list and restart the host; TUI questionnaires then render normally, and this is the temporary fix the reporter verified. Steps:
-
Back up the built file you will edit. The target is
@deepseek-ai/dsh-api-remotes/lib/index.js; copy it outside the workspace. -
Delete the entry around lines
133–137of the bundle.
{
event: "user-questions/request",
mode: "waterfall"
}
Expected: the forwarding list no longer contains the question request, while every other entry (including approval/request) stays untouched.
-
Restart the host and call
ask_user_questionagain. Expected: the questionnaire appears immediately, with single choice, multiple choice, Tab custom text and left/right question switching all working. -
Reinstall
ds-harness-remoteand verify once more. The reporter's conclusion: after reinstalling and restarting it still works, so this regression concerns only question forwarding and has nothing to do with the remote plugin. -
Remember its boundary. The patch edits a build artifact inside
node_modules, so reinstalling DSH or upgrading dependencies overwrites it; it is also not an officially supported configuration option, so it is only usable as a temporary fix in a personal environment.
Variables already ruled out: do not spend time in these directions
In one sentence: the remote plugin, version mismatches, question length, and provider claim were all eliminated by experiment, leaving the core forwarding layer as the only explanation. Four controls:
- The remote plugin. Turning off the phone side (remote log shows
remote_conns: 7 → 4) still aborts; uninstallingds-harness-remotefromdsh.profile.bundlesand restarting still aborts (after 17 seconds). So forwarding is a core capability, not something the plugin provides. - A version mismatch. The peer allowlist for
dsh-tui@0.17.0explicitly lists0.2.1-rc.3, and the machine holds exactly one copy ofdsh-user-questions. - Question length or shape. A 16-character question with 3 options aborts just the same. One aside:
optionsmust be objects{label, description?}; string options fail earlier with"questions[0].options[0]" must be an object, which is unrelated to this issue. - A provider claiming the request. Across all 35 bundles, no plugin registers a question provider; there are only consumers (for example
@michengai/dsh-code-reviewcallingctx.userQuestions.ask(...)) and RPC allowlist strings.
With those four eliminated, the only remaining line in the investigation record is "the core forwarding layer claims it".
Where the real fix belongs: capability gating, local-first, stop masking
In one sentence: the fix is not a patch for the TUI but for the forwarding layer to ask "can anyone answer this?" before claiming it. Four suggestions from the thread, ranked by value:
- Capability-gated forwarding. Claim
user-questions/requestonly when at least one connected peer has registered a handler for that event; otherwise callnext()and hand it to the local surface. - Local UI first. If a
QuestionStoreis already mounted in the current combination (getQuestionStore(ctx) !== undefined, seedsh-tui/lib/types/dsh-adapter/questions.js), do not forward question requests at all. - Make the forwarding list configurable. Let pure-TUI or headless profiles opt out of forwarding instead of editing artifacts under
node_modules. - Stop masking the cause. When re-throwing
abortedQuestion(error), at least writeerror.message/stackinto the log or attach them to the tool result, so the original gateway cancellation is visible from outside.
This shares roots with two larger proposals: #5178 proposes multi-surface question routing (fan-out with first-answer-wins), and #11178 points out the waterfall queue semantics by which one surface can starve or swallow a request another surface could have answered.
Debugging notes
For this "the error attributes blame wrongly" family, the rule is: verify where the request flows before debating whose fault it is. Six points:
ASK_ABORTEDis not a user cancel; the real user cancel isASK_CANCELLED.- Check first whether the request reached the local store; if it did not, this is not a rendering problem.
- Instrument the
catch, otherwise you only ever see the wrapped message. causeis the most valuable information, yet it never reaches the log, so print it yourself.- Editing
node_modulesis temporary only — an upgrade erases it, so do not write it into team docs as a long-term solution. approval/requestsits in the same table as question requests, and the same class of stealing risk remains; keep it in mind when debugging approval issues.
Source: Discussion #11721.
FAQ
Neither, and DeepSeek Harness is not blaming your answer. The wording blames the user, but the actual chain is that api-remotes' forwarding layer claims the request first and sends it to a remote surface that has no answerer; the gateway cancels it after a timeout, and dsh-user-questions then wraps the real cause as ASK_ABORTED. It hits hardest when the TUI is the only host and no web client is connected.
In the DeepSeek Harness TUI, two pieces of evidence: the TUI's QuestionStore never receives the request, so there is no snapshot and no panel; and with instrumentation in dsh-user-questions' catch block, the stack points at cancelRemoteEvent in dsh-api-gateway (lib/index.js:1084). The request never entered the local listener, which means some upstream consumer settled it first.
Yes, this fixes the missing questionnaire in DeepSeek Harness. The minimal local patch in the thread is to remove the event: "user-questions/request", mode: "waterfall" entry from @deepseek-ai/dsh-api-remotes/lib/index.js and restart the host; the panel then renders immediately, with single choice, multiple choice, Tab custom text and left/right navigation all verified. But it edits a file under node_modules, so a reinstall overwrites it.
Yes, DeepSeek Harness approval/request has the same problem. approval/request and user-questions/request are two entries in the same table, both using waterfall mode, and neither checks whether an answerer exists. The reporter left the approval entry untouched, but noted it is the same waterfall queue semantics that causes starvation and swallowed requests.
Related Terms
- ask_user_question
- ask_user_question is a tool DeepSeek Harness gives the model to ask the user structured questions mid-run and wait for an answer, supporting single choice, multiple choice and custom text. It depends on a host having an answerer that can render the questionnaire; otherwise the request hangs or gets cancelled.— https://github.com/deepseek-ai/deepseek-harness/discussions/11721
- waterfall event
- waterfall is one mode of event dispatch in DeepSeek Harness: an event passes through several handlers in turn, and each handler may handle and terminate it or call next() to hand it on. The problem here is there is no capability check for 'does an answerer exist', so any handler can swallow a request that some other surface could have answered.— https://github.com/deepseek-ai/deepseek-harness/discussions/11721
- ASK_ABORTED
- ASK_ABORTED is the error code the question tool returns when a request is aborted, with the companion message 'ask_user_question was aborted before the user answered'. abortedQuestion() attaches the cause when constructing it, but the cause never reaches the log, so from the outside it looks like the user refused to answer.— https://github.com/deepseek-ai/deepseek-harness/discussions/11721