fix(prompt,jobs): narrate in-band, ask via ask_user, no wake for an exit already read (ADR 0061) - #727
Merged
Merged
Conversation
…xit already read (ADR 0061) Two interactive trajectories on the same build showed one model answering every step with bare function calls and no text, then ending a blocked push turn with a lettered menu of options in prose instead of an ask_user call. Around that, every background job the model had already waited on with bash_output (or killed with bash_kill) still woke it with "unread output via bash_output; do not poll", which it answered with a bash_output snapshot that returned nothing; and an Esc during a blocking wait rendered the 10-hour deadline sentinel as "36000s elapsed". - headsup note: the heads-up text rides in the SAME response as the tool calls it introduces, and a command that can run for minutes is announced with what it waits on. - work note + ask_user description: a choice for the user is an ask_user call with the choices in options; a menu in prose renders no picker and waits for nothing. ask_user is in every root catalog and self-decides with no human attached, so the instruction is safe in -p. - job_notify.dismiss: bash_output returning a finished job's status, and bash_kill reporting a dead job, drop that job's queued notice; an id the pump has not queued yet is remembered so record() skips it once. The hosted-sink job_completed event still fires. - job_notify.printRunning: an interrupted wait reports what it waited. - prompt_snapshot_tests golden updated; the lean/unattended tests move to prompt_lean_tests.zig to stay under the 600-line ceiling.
CI on main has been red on Linux and Windows since the #721 workspace switch started calling std.c.getcwd and std.c.realpath: "dependency on libc must be explicitly specified in the build command". macOS links libc implicitly and never noticed. - build.zig: link_libc on the graff exe, the unit-test module that roots the same main.zig, and the TUI exe (the TUI tests already had it). - workspace_switch.zig: the Windows CRT has no realpath(3); on Windows realpathOs compares the path as printed. The cases it resolves (/tmp vs /private/tmp, a symlinked worktree parent) are POSIX ones. Verified with x86_64-linux-gnu and x86_64-windows-gnu cross-builds (both clean; the Linux test binary compiles) and the native macOS suite.
justrach
added a commit
that referenced
this pull request
Sep 3, 2026
…Streamdown and prompt recall Both sides rewrote the native harness after the 285 tag: origin landed follow-tail scrolling, the prompt queue, frame-rate ACP paint and the ChatBubbles/ChatEmpty split; this branch landed the Streamdown renderer and ArrowUp prompt recall. Resolution keeps origin's harness and scroll model, the Streamdown Markdown.tsx (its remark pipeline supersedes the hand parser's ordered-list and caret fixes), and threads the recall history through the composer and the empty state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
headsup_note: the heads-up text goes in the same response as the tool calls it introduces; a command that can run for minutes is announced with what it waits on.work_note+ theask_usertool description: a choice for the user is anask_usercall with the choices inoptions; a menu written in prose renders no picker and waits for nothing.job_notify.dismiss:bash_outputreturning a finished job's status, andbash_killreporting a dead job, drop that job's queued exit notice (an id the pump has not queued yet is remembered sorecordskips it once). The hosted-sinkjob_completedevent still fires.job_notify.printRunning: a blockingbash_outputwait interrupted with Esc reports the time actually waited instead of the 10-hour deadline sentinel ("36000s elapsed").prompt_lean_tests.zigto stay under the 600-line ceiling.build.ziglinks libc explicitly on the graff exe, its unit-test module, and the TUI exe;workspace_switch.zigcompares paths as printed on Windows, whose CRT has norealpath(3). Main has been red on the Linux and Windows jobs since the Workspace switch can report the wrong active worktree #721 commit with "dependency on libc must be explicitly specified in the build command".Why
On one interactive trajectory the model answered every step with bare function calls and no text, so a multi-minute hook run read as a hang, and it ended a blocked push turn with a lettered menu in prose instead of an
ask_usercall. Independently of the model, every background job it had already waited on still woke it with "unread output via bash_output", which it answered with a snapshot that returned "(no new output)".Verified:
zig build testgreen on 0.16.0 and the CI-pinned 0.17-dev (1911 pass, 1 skip); tier-1 fully green on the second push (all 18 PTY probes); x86_64-linux-gnu and x86_64-windows-gnu cross-builds clean.