Repository navigation
Let a Planner reply the check still flags after its repair end the turn, instead of failing it - #1051
Merged
Merged
Conversation
…rn, instead of failing it
A remote Planner finished a seven-minute turn that saved the plan and its build
graph, and ended its Chat reply with an offer ("Want me to walk you through why
...?"). The reply check read that as a request for input, the one repair step
still read as one, no decision card was added, and publishPlannerReplies threw.
The turn ended as "Couldn't finish the reply." with no detail: the work was
saved, but the member saw a failure, and Retry would take the reply away.
The throw dates from when replies were withheld until checked. Since replies
stream as they are written, both attempts' words are already in Chat before the
check runs, so failing the turn hid nothing and only misreported finished work.
A repair the check still flags, with no decision card added or kept, now stands
as the Planner's answer, the turn ends normally, and the server logs a warning
with the reason.
Everything else stays: a reply that asks still gets its one repair step, cards
the turn added or kept still get their fixed count summary, a bogus count still
claims none, and a stream error, a tool boundary stop or a Stop end the turn as
before. No flagged reply is blocked outright any more; the only failures left
are the turn's own.
docs/hosted-agent.md described the withholding era, so its reply-check
paragraph now says what happens, and docs/agent-connection.md no longer calls
the repaired reply withheld.
Assistant-model: Claude Opus 5.5
Assistant-verification: red before fix: the new reply-policy test reproducing the production sequence (first reply flagged, repair flagged, no card) threw "could not move its questions into inline decisions" at reply-policy.ts:240; with the fix reverted, 19 tests across reply-policy, invoke and threads fail
Assistant-verification: bun test apps/server/src/chat apps/server/src/agent (1590 pass, 0 fail)
Assistant-verification: bun run fix, ci and types
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 happened
A remote Planner finished a seven-minute turn (plan saved, build graph saved) and ended its Chat reply with an offer: "Want me to walk you through why …?". The reply check read that as a request for input. The one repair step still read as one, no decision card was added, and
publishPlannerRepliesthrew (apps/server/src/chat/reply-policy.ts).turnFailureOfturned that into "Couldn't finish the reply." with no detail. The work was saved, but the member saw a failure, and Retry would take the reply away.Change
docs/hosted-agent.mdstill described replies being withheld until checked. Its reply-check paragraph now describes the current behavior.docs/agent-connection.mdno longer calls the repaired reply withheld.Tests
reply-policytest reproducing the production sequence: the first reply is flagged after a saved edit, the repair is still flagged, and no card is added or kept. It fails onmainwith "could not move its questions into inline decisions" and passes with the fix.bun test apps/server/src/chat apps/server/src/agentgives 1590 passed and 0 failed.bun run fix,bun run ciandbun run typesare clean.