Repository navigation
feat(coderd/x/chatd): allow attach_file in root plan-mode chats - #25388
Merged
Merged
Conversation
ethanndickson
marked this pull request as ready for review
May 15, 2026 12:16
attach_file lets agents store a workspace file as a durable chat attachment. It was registered for plan turns but excluded from the per-turn ActiveTools allowlist because builtinPlanToolAllowed did not list it, so calls failed with 'Tool not active in this turn: attach_file'. The tool only reads from the workspace and writes to chat storage, so it preserves plan mode's 'no workspace implementation changes' invariant. Group it with the other artifact-producing tools (propose_plan, write_file, edit_files) under the isRootChat case so root plan chats can attach files while subagents stay restricted to the minimal read-only surface.
ethanndickson
force-pushed
the
planning-tools-e6v2
branch
from
May 18, 2026 04:07
f093b13 to
889748a
Compare
ThomasK33
approved these changes
May 19, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
attach_filewas registered for plan-mode turns but never added tobuiltinPlanToolAllowed, so the per-turnActiveToolsallowlist filtered it out and calls failed withTool not active in this turn: attach_file. This was an omission rather than a deliberate block — the tool (#24280) landed shortly after plan mode (#24236) and no subsequent edit to the allowlist picked it up.Add
attach_fileunder theisRootChatcase, matching how other artifact-producing tools (propose_plan,write_file,edit_files) are gated. The tool only reads from the workspace and writes to chat-attachment storage, so it preserves plan mode's invariant of not making implementation changes to the workspace. Subagents in plan mode remain restricted to the minimal read-only surface.