Repository navigation
fix(orchestration): re-press Enter when dsh's launchpad refuses a worker's first dispatch - #33499
Conversation
…ker's first dispatch A fresh dsh worker's readiness settles on dsh-tui 0.17's boot `OSC 7501 idle` (0.14-0.16: its composer glyph), which dsh paints before its session opens. The dispatch preamble's one Enter then got "still starting" and the task sat in the launchpad while worker-start reported it accepted. Apply dsh's screen-gated held-prompt resubmit budget (#33316) to every send, not only a launch with `composerReady`. Fixes #30778 Co-authored-by: Jinwoo-H <[email protected]>
|
No actionable comments were generated in the recent review.
|
ELI5
When an Orca orchestration starts a DeepSeek Harness (dsh) worker, Orca waits for dsh to look ready, pastes the task, and presses Enter once. dsh draws its input box (the "launchpad") before its session has opened. Until the session opens it ignores Enter, shows "still starting — press Enter to send once it is ready", and leaves the text in the box. Orca still reported the dispatch as accepted, so the worker just sat there holding its task.
#33316 fixed this for
agent.launchprompts: Orca presses Enter again while the launchpad still shows this prompt. Worker dispatches didn't get that retry. This PR gives it to them too.Root cause (upstream refs)
@deepseek-harness-tui/dsh-tui0.17.0 (and 0.16.1, npm tarballs):lib/types/ink/hooks/use-program-status.js:67: dsh reportsOSC 7501 state=idlewhen it mounts, before any session is bound. It reports it again when a session is adopted (:52). Orca'stui-idlesettles on the first report.lib/types/screens/Chat.js:2510refusedAtStartup(0.16.1::2419): whilechannel.ready === false, a plain-text submit gets thestartup-not-readynotice and is refused. The draft stays in the launchpad.dsh-composer-promptmarker, which is also drawn before the session opens.Orca side:
getAgentPromptHeldSubmitBudgetMsgave dsh'ssubmitRetryBudgetMsonly to sends withcomposerReady(the launch path).dispatchPreambleSendOptions(inputKind: 'orchestration') doesn't setcomposerReady, so a dispatch got one Enter and no retry.What changed
getAgentPromptHeldSubmitBudgetMsno longer requirescomposerReadybefore it appliessubmitRetryBudgetMs. That budget is dsh-only, and fix(agent-launch): re-press Enter while dsh's launchpad still holds the prompt #33316 already gates its retries on the screen: Orca presses Enter only while the boxed launchpad draft still equals this prompt and no turn or permission prompt has appeared. It stops at once when the draft is gone, for example because the first-run guide covers it or dsh took the text.How verified
Live, real dsh through
OrcaRuntimeService:waitForWorkerAgentReady(fresh worker), thensendTerminalAgentPrompt(…, dispatchPreambleSendOptions(…)). The PTY ran realdsh-tui .on@deepseek-ai/dsh0.2.1-rc.2, macOS arm64, with an isolated HOME and a fake API key, so no model spend.OSC 7501 idle, 1 Enter,still starting,accepted:true, no turn (nostate=workingin 8 s)OSC 7501 state=working→ turn ran (auth error from the fake key)still starting; the final screen is the launchpad still holding❯ say hi in one word❯ say hi in one wordand the turn's auth errordsh-launch-prompt-resubmit.test.ts: the new case fails on main (enters: 1) and passes here (enters: 3, pastes: 1). The first-run-guide and empty-launchpad cases still press no extra Enter.pnpm tc,check:code-quality:changed, the prompt/input test files (19 files, 285 tests), and every test that references'dsh'(12 files, 396 tests) pass.Risk
Chat.jslaunchpad submit path), so the retry ends on its first check. The worst case is about 1 s of extra wait before the receipt.OSC 7501 idlesettles readiness under the guide. That is [Bug]: dsh-tui 0.15 onboarding receives supervised task input before chat readiness; same-terminal reuse times out #29131's remaining half; this PR adds no Enter there.terminal wait --for tui-idleon a dsh 0.14–0.16 pane that has never had a turn still doesn't settle: no OSC 7501, and the whale keeps repainting. 0.17 settles via OSC 7501. Not addressed here (see fix(runtime): settle a cold-started DSH pane on its idle composer #26691 note below).Related
Fixes #30778. Related: #33316, #29131, #26691.
#26691 (@Jinwoo-H) adds screen rules so
tui-idlesettles on a cold dsh pane. On current main, dsh 0.17 already settles from its ownOSC 7501 idle. Those rules match only the 0.12/0.13 layouts: replayed against a timed dsh-tui 0.16.1 cold-start capture with them applied,tui-idlestill never settled, because the 0.16/0.17 model row has four fields and a space. Its cold-start readiness analysis led to this fix, hence the co-author credit.Co-authored-by: Jinwoo-H [email protected]