Repository navigation
chat --once: a steered watched run says its answer once - #2999
Merged
Merged
Conversation
Agent.Steer hands back a live view of the turn it steers, and runChatV3Once is already draining that turn into the reply. The steer goroutine drained the view into the same reply, so a watched run that took one --steer note printed every word twice, and `--json` returned "the answer.the answer." as its answer. The steer's stream now passes nothing on until EventSteerFellThrough; from there the same channel carries the turn the note starts by itself, which nothing else reads. A note sent with no turn in flight still goes through Submit, whose stream is its own turn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AbirAbbas
added a commit
that referenced
this pull request
Nov 27, 2026
…ld run starts (hotfix of #2478's live flags) The AgentField Go SDK starts a watched run as `codeaf chat --once TEXT --json --yolo --no-host --model M --max-hours H --events E --steer S --session P`. v0.8.2 and v0.8.3 refused `--json` ("codeaf chat has no --json flag") and exited at once, so every watched run failed before it began and WorkAF showed no live transcript. This carries the three live flags from dev (#2478, with #2609's per-run accounting in the envelope) onto the v0.8.3 line, without the factory engine around them: dev relays a question the model asks to the watcher over --events, and that needs internal/factory, which this line does not have. A question here takes its own default, as any headless run does. It also fixes a defect dev has too (#2999): Agent.Steer returns a live view of the turn it steers, which the run is already printing, so a steered run printed its answer twice. The steer's stream now passes nothing on until the steer falls through. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AbirAbbas
added a commit
that referenced
this pull request
Nov 27, 2026
Staging already has dev's --events/--steer/--json, so it keeps its own bytes for those files and takes two things from the hotfix: the v0.8.4 changelog block and the steered-answer-once fix (#2999). This merge exists so the release guard finds main's commit on staging. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AbirAbbas
added a commit
that referenced
this pull request
Nov 27, 2026
History only: dev already has the live flags and, with #2999, the steered-answer-once fix. The only bytes this brings are the v0.8.4 changelog block. It exists so the next promotion from dev to staging to main moves forward over the hotfix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
A watched
codeaf chat --once ... --steer PATH --jsonrun that took one steer note printed the answer twice ("answer":"the answer.the answer.").Agent.Steerreturns a live view of the turn it steers, whichrunChatV3Onceis already draining; the steer goroutine drained that view into the same reply.The steer's stream now passes nothing on until
EventSteerFellThrough. After that, the same channel carries the turn the note starts by itself, which nothing else reads. A note sent when no turn is running still goes throughSubmitand prints as before.The same fix goes to main in the v0.8.4 hotfix, together with the
--events/--steer/--jsonflags the AgentField Go SDK's watched path needs.Validation contract
--oncerun's reply holds the answer exactly once.TestChatOnceTakesAMidRunNoteAndStreamsItsRecordnow counts it: red without the fix ("printed 2 times"), green with it.TestChatOnceReadsANoteThatLandsAsTheRunEnds)."answer":"steered: I read your note.steered: I read your note.", after"answer":"steered: I read your note.".--eventsstays byte-identical to the session record.🤖 Generated with Claude Code