Skip to content

chore(coderd): store busy behavior on queued chat messages - #29783

Closed
ethanndickson wants to merge 2 commits into
mainfrom
ethanndickson/chat-steer-store
Closed

ethanndickson wants to merge 2 commits into
mainfrom
ethanndickson/chat-steer-store

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Queued chat messages now record their busy behavior. The next PR in this stack adds steer, and the generation loop then needs the behavior of each queued row to decide which rows are due before the next model call.

The migration adds the Postgres enum chat_busy_behavior (queue, steer, interrupt) and the column chat_queued_messages.busy_behavior. The column is NOT NULL DEFAULT 'queue', so existing rows get queue. InsertChatQueuedMessageWithCreator stores the behavior of each new row.

chatd now uses the generated database.ChatBusyBehavior in SendMessageInput and SendMessageOptions. This PR removes chatd.SendMessageBusyBehavior, chatstate.BusyBehavior, and the busyBehaviorToChatState bridge, so Go keeps only two busy behavior enums: database.ChatBusyBehavior and codersdk.ChatBusyBehavior.

This PR does not change behavior. SendMessage still rejects steer.

Part of CODAGT-1140

@ethanndickson ethanndickson changed the title ethanndickson/chat steer store refactor(coderd): store busy behavior on queued chat messages Sep 23, 2026
@ethanndickson ethanndickson changed the title refactor(coderd): store busy behavior on queued chat messages chore(coderd): store busy behavior on queued chat messages Sep 23, 2026
@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-23T10:55:32.795640Z 84a5783 Draft marked ready
ℹ️ 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 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: fb5f533f61

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

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: 84a578335c

ℹ️ 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/ARCHITECTURE.md Resolved
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

re: Replace the architecture prose with TODOs

This misreads the guardrail. It stops agents from writing architecture updates on their own and has them leave TODOs so the human author writes the update instead. The author owns the text either way. I asked for this change and picked the wording, so this is the author's update, which is what the rule is for. Swapping it for TODOs would leave the spec stale, which is the problem your previous comment raised. I'll make the AGENTS.md wording clearer in a separate PR so author-approved prose isn't flagged again.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 84a578335c

ℹ️ 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 23, 2026 10:51
@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

CODAGT-1140

@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-steer-store branch from 84a5783 to c82131e Compare September 24, 2026 05:07
@ethanndickson

Copy link
Copy Markdown
Member Author

Superseded by #30073.

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