Repository navigation
ask_user posts the question and ends the turn; delete the message_response delta (CL-7443) - #641
Merged
Merged
Conversation
TheGreatAxios
force-pushed
the
cl-7443-ask-user-ends-turn
branch
2 times, most recently
from
September 5, 2026 01:28
d61ee4d to
c5d03dd
Compare
ask_user's beforeToolExtension-based suspend/gate mechanism is retired in favor of posting the question and returning an end-turn instruction from run(); update its tests accordingly, retire the message_response-specific reactor suspend/resume regression harness (CL-7190), and add coverage that SignalKind now accepts only approval.
…ponse delta A Workbench agent is an unbounded interactive step: every inbound mail is its own next turn. The native "ask a person" is therefore to post the question and end the turn, not to structurally park it on a gate — the person's reply already arrives as the agent's next turn. ask_user no longer contributes a beforeToolExtension: it posts the question card from a plain run() and returns immediately with a tool result instructing the model to end its turn, since the answer is not this call's result but the agent's next inbound message. This retires CL-7190/CL-7191's message_response vendored delta: the signal kind is gone from vendor/intx/types/src/signals.ts (back to upstream's approval-only shape), its resume branch is gone from vendor/intx/inference/src/reactor.ts, and the correlationId plumbing that only existed to resolve it is gone from vendor/intx/hub-sessions' sendUserMessage and every hop above it (folded-runs' sendFoldedMail, chat's WorkbenchMail.sendMail/platform-adapter/workbench-service/ turn-queue). A block response is simply a new message that replies to the question card; the chat block-response route already sent it as a plain message with no gate resolution to remove. Bumps @corbits/interaction-tools to 0.0.7 and its pin in workflows/assistant.
docs/CHAT.md now describes ask_user's post-and-end-turn shape (CL-7443) instead of the retired message_response gate/correlation-id mechanism.
…443) A checkpoint fixture with a retired message_response pending operation alongside a valid approval one should restore with only the approval op surviving, not throw.
A warm agent's persisted checkpoint/WAL can still carry a pending operation with a signal kind this build no longer classifies (e.g. a message_response op written before CL-7443 retired that kind). Left alone, the reactor's rehydrateGates throws "Unclassified signal kind" on every respawn, permanently wedging the agent. Parse metadata.pendingOperations on restore and drop any op whose kind is not a current SignalKind, reporting each drop through reportError (operation: pending_op_dropped_unknown_kind) instead of letting it reach the reactor.
reactor.ts still carried the retired message_response resume branch (resumePendingOperation/timeoutMessageFor) and its own SignalKind import, even though CL-7443's docs/ledger already claimed the package was back to zero local delta. Replace it byte-for-byte with upstream a8bc06ae's packages/inference/src/reactor.ts and update the recorded kill-dates tree hash to match.
Asserts the tool result text explicitly tells the model to stop (end this turn now / do not wait for a reply here), and exercises the existing no-own-channel failure path that the next commit routes through reportError.
Replace the report-error-ignore on the postQuestion catch with a real
reportError(err, { operation: "ask_user_post_question", agentId }) call
before returning the error result to the model, so a failed post is a
visible incident with a refId, not just a swallowed retry signal. Adds
@corbits/error-sink as a dependency and regenerates the tsconfig
project references.
…ng ops (CL-7443) Note that the tool result's "end this turn" instruction is plain text in the model's context, not something the runtime enforces, and that a warm agent's in-flight question at deploy time is silently dropped on restore rather than resolved -- the person's eventual answer just becomes an ordinary next turn.
TheGreatAxios
force-pushed
the
cl-7443-ask-user-ends-turn
branch
from
September 5, 2026 01:38
d9a7b32 to
5cc8036
Compare
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.
Fixes CL-7443
ask_userposts its question and ends the turn instead of parking on amessage_responsegate/signal. CL-7190's local delta is retired from@intx/inferenceand@intx/types.Critique follow-ups (this update)
carried the retired
message_responseresume branch(
resumePendingOperation/timeoutMessageFor) even though the ledgeralready claimed zero local delta. Replaced byte-for-byte with upstream
a8bc06ae'spackages/inference/src/reactor.ts; recomputed thescripts/checks/kill-dates.txttree hash.test file at an upstream-owned path with content that diverges from
upstream's own
signals.test.ts— not something Workbench vendors.Deleted;
signals.tsitself was already byte-identical to upstream.persisted checkpoint/WAL can still carry a
message_responsependingop from before this change. Left alone, the reactor's
rehydrateGatesthrowsUnclassified signal kindon every respawn.conversation-state.ts's restore path now drops any pending op whosekindisn't a currentSignalKind, reporting each drop throughreportError(operation: pending_op_dropped_unknown_kind). Coveredby a checkpoint fixture test. Documented in
docs/CHAT.md: anin-flight question at deploy time is simply lost, the person's answer
becomes an ordinary next turn.
ask_user's postQuestion failure now reports. Replaced thereport-error-ignoreonpackages/interaction-tools/src/tool.ts'scatch with a real
reportError(err, { operation: "ask_user_post_question", agentId })before returning the errorresult.
asserting the tool result text tells the model to end its turn, and
a
docs/CHAT.mdnote that this is plain instruction text, notsomething the runtime enforces.
All fixed as separate tests-first/implementation commits.
bun run check:structural,typecheck, and targeted tests pass locally; CI isauthoritative.