Skip to content

feat(coderd/x/chatd): add busy_behavior to message_agent - #29786

Closed
ethanndickson wants to merge 1 commit into
ethanndickson/chat-steer-apifrom
ethanndickson/chat-steer-message-agent
Closed

ethanndickson wants to merge 1 commit into
ethanndickson/chat-steer-apifrom
ethanndickson/chat-steer-message-agent

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Closes CODAGT-1140

This swaps the interrupt boolean on the message_agent tool for a busy_behavior argument (queue, steer or interrupt), so a parent agent can now steer a busy child without cancelling its current work. Leaving it out still means queue, and interrupt does what interrupt: true used to.

If a model still sends interrupt, it's ignored and we fall back to queue. That also applies to an old message_agent call that chatd reruns from history after an upgrade, but that needs the server to stop in the few milliseconds between committing the call and its result, and the message still gets delivered, just queued. I don't think that's worth a compatibility shim.

@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-steer-message-agent branch from 654faa9 to 957ff9f Compare September 23, 2026 08:25
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T07:01:36.468027Z 85bbf06 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 957ff9f35e

ℹ️ 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".

@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

CODAGT-1140

@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-steer-message-agent branch from 957ff9f to 298e10b Compare September 24, 2026 05:07
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-steer-message-agent branch from 298e10b to 2fd839a Compare September 24, 2026 05:30
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 2fd839a5c5

ℹ️ 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".

@ethanndickson
ethanndickson marked this pull request as ready for review September 24, 2026 06:53
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-steer-message-agent branch from 2fd839a to 85bbf06 Compare September 25, 2026 05:44
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85bbf06dd4

ℹ️ 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".

Comment thread coderd/x/chatd/subagent.go Resolved
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

Not fixing. This only matters if a message_agent call with interrupt: true is in flight when the server version changes: the assistant step committed the call, but the tool step did not commit its result before shutdown. message_agent is one database write, so that window is very small. If it does happen, the message is still delivered. It is queued instead of interrupting, so the child reads it after its current turn. That does not justify a compatibility shim for the old field in an experimental package.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 85bbf06dd4

ℹ️ 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".

@ThomasK33 ThomasK33 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@ethanndickson

Copy link
Copy Markdown
Member Author

Superseded by the new stack starting at #30073. The message_agent change will follow in a later PR of that stack, where it always steers instead of taking a busy behaviour.

After discussing CODAGT-1191, the design changed: steer becomes the default busy behaviour, interrupt is no longer a send option (interrupt, then send), and steer messages skip ahead of queued messages instead of pulling them into history early. That was enough change that I rebuilt the stack from main instead of rebasing this one.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants