Skip to content

fix(coderd/x/chatd): add ACP subagent prompt guidance - #31498

Merged
hugodutka merged 1 commit into
mainfrom
codex/acp-subagent-prompt-guidance
Oct 29, 2026
Merged

hugodutka merged 1 commit into
mainfrom
codex/acp-subagent-prompt-guidance

Conversation

@hugodutka

@hugodutka hugodutka commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

ACP tools are exposed without system-prompt guidance for discovering configured harnesses and managing their sessions. Add conditional guidance that points to the spawn schema and explains the spawn, wait, message, and interrupt flow.

Build root tools before assembling the prompt so guidance is included only when ACP spawning is available. Extend schema/gating and turn-tool-policy coverage to keep prompt guidance aligned with exposed tools.

https://linear.app/codercom/issue/CODAGT-1488/add-system-prompt-guidance-for-available-acp-tools

@hugodutka
hugodutka force-pushed the codex/acp-subagent-prompt-guidance branch from dd94da6 to d9cfc1a Compare October 29, 2026 16:08
_, ok := tool.(acpSpawnTool)
return ok
})
prompt = buildSystemPrompt(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This block is moved because we need access to tools to check if ACP subagents are available. Previously the system prompt was constructed before the tools were.

@hugodutka
hugodutka marked this pull request as ready for review October 29, 2026 16:09
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

CODAGT-1488

@ibetitsmike

Copy link
Copy Markdown
Collaborator

Adding the tools already bursts anthropic cache so changing the system prompt at the same time doesn't have any more negative impact.

@hugodutka
hugodutka merged commit 846daa8 into main Oct 29, 2026
35 checks passed
@hugodutka
hugodutka deleted the codex/acp-subagent-prompt-guidance branch October 29, 2026 16:30
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 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