Repository navigation
feat(coderd/x/chatd): deliver steer and interrupt messages before the next model call - #29784
ethanndickson wants to merge 3 commits into
Conversation
029cc37 to
1194531
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1194531623
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
736e1c9 to
398168d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfaa2884dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfaa2884dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review re: Promote due rows before compaction model calls Intended. Steer rows target the next assistant call, and compaction does not answer the user. Promoting before compaction would not change what the model sees: compaction keeps the trailing unanswered user rows out of the summary input and repeats them after the summary. Here, the first action after compaction is |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…pt starts The generation loop read the queue when it chose its next action, before it prepared the step. A steer row that arrived during preparation missed the next model call. The worker now promotes due rows in the same transaction that records the model call attempt. SendMessage locks the same chat row, so a steer or interrupt row that commits before the attempt starts reaches that call. PromoteQueuedBeforeStep now reads the queue before it checks for outstanding tool calls, so a call with no due rows writes nothing.
dfaa288 to
017ea0e
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Superseded by #30074. After discussing CODAGT-1191, the design changed: |
Part of CODAGT-1140
This PR delivers
steerandinterruptmessages that are waiting in a busy chat's queue. Right before each assistant model call, chatd checks the queue, and if there's asteerorinterruptrow in there, we promote everything from the head up to and including the last one. So with a queue ofQ1 S1 Q2, the model seesQ1 S1on its next call andQ2waits for turn end. History order always matches send order, which is how "Send after step" works in mux.A
steernever cancels anything; it just waits for the in-flight call and that step's tool calls to finish. Aninterruptstill cancels the request, then waits for the same point.The check lives in
generateAssistant, where a newPromoteQueuedBeforeSteptransition runs in the same transaction asRecordGenerationAttempt.SendMessagelocks the same chat row, so asteerthat commits before the call starts always makes it into that call. Compaction and tool execution don't promote, as neither of them answers the user.Only Go callers can send
steerfor now. The next PR adds it to the API.This does change existing behaviour in a few places, so I'd like sign-off from the chatd owners:
requires_actionnow reaches the model straight after the cancelled tool results, instead of waiting for the next turn end.queuerow ahead of asteerorinterruptrow now goes out with it, mid-turn.The web UI doesn't send
busy_behavior, so none of this affects it.A few smaller things I've accepted: promoted rows reset the per-turn step count and can switch the model (promoted queue rows already do both), a Stop hook can nudge once more in the same turn, and a
steerstill waits for long tool calls likeexecuteorwait_agentto finish. Returning early from those is a follow-up.