Repository navigation
feat: add the todo_write and todo_read chat tools - #34
Conversation
Behind the fork-chat-todos experiment, appendForkTools adds todo_write and todo_read, every write publishes a ChatTodosEvent, and list_agents shows each child's todo list, read as the owner of the parent chat.
todo_read takes no arguments, so TestBuiltinToolSchemasDescribeTheirInputs must list it with the other input-less builtin tools. Also drop the unused codersdk.ChatTodoList type until an endpoint returns it.
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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: 041d50f010
ℹ️ 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".
With fork-chat-todos on, Coder Agents has a durable todo list, so the adapter points skills at todo_write instead of the reply.
|
Codex Review: Didn't find any major issues. Breezy! 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". |
todo_write enforces four bounds that no test reached: the item count, the empty id, and the id and content length limits. A removed bound would store an oversized list without an error, so add one case per bound to the rejected-write table. Each case fails when its check is deleted from validateChatTodos, and a rejected write still leaves the stored list unchanged.
Added test-only coverage for the todo_write bounds (empty id, id and content length, item count) from the test audit. @codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
Merged as d06f8af after checking the exact head 27ecac7: fork-ci green, Codex clean on 27ecac7, 0 unresolved threads, and UAT passed on 680bdf9, which differs from the head only in tests and docs. Deployed after #32 (d7d3cf3) was healthy. Open owner item for @ibetitsmike: the TODO(fork-chat-todos) notes in |
Part of #10. Stacked on #32 (merged).
Adds the chat todo tools behind the new experiment
fork-chat-todos(PRD 6.6, R6.4). With the experiment off, the tool list and thelist_agentsoutput are exactly upstream's.todo_writereplaces the chat's whole list (at most 50 items; ids unique, at most 64 bytes; content at most 500 bytes; statuspending,in_progress,doneorcancelled) and returns the stored list and its version.todo_readreturns the list and its version, 0 when the chat has none. Invalid input comes back as a tool error, so the model can retry.ChatTodosEvent{chat_id, version}onchat_todos:<chat id>. The payload carries only the version because NOTIFY caps at 8000 bytes; the UI PR of this stack subscribes and re-reads.list_agents(R6.4): each listed child carries itstodos, read as the parent chat's owner (dbauthz.As), never as chatd. Upstreamsubagent.gogets one hook line that passes its result throughforkListAgentsinfork_list_agents.go. Workstreams W1 and W2 extend that same function with their fields instead of editinglist_agents.codersdk.ChatTodoand its status constants, withtypesGenerated.tsregenerated.ARCHITECTURE.md: one TODO for the owner to document the tools; no prose.Plan mode and explore subagents do not get the todo tools: their allowlists (
builtinPlanToolAllowed,exploreToolAllowed) are left unchanged.Validation: the whole
coderd/x/chatdpackage passes against Postgres 17, including the new tool tests (write, read, validation errors, version bumps, the pubsub event,list_agentswith and without the experiment).codersdkexperiment tests pass.