Skip to content

feat(coding-agent): colocate tool prompt contributions with tool definitions - #7671

Merged
badlogic merged 1 commit into
mainfrom
feat/tool-system-prompt-contributions
Aug 6, 2026
Merged

feat(coding-agent): colocate tool prompt contributions with tool definitions#7671
badlogic merged 1 commit into
mainfrom
feat/tool-system-prompt-contributions

Conversation

@christianklotz

Copy link
Copy Markdown
Collaborator

Summary

  • colocate each built-in tool's canonical system-prompt snippet and guidelines with its implementation
  • keep legacy tool-definition prompt output unchanged while referencing the shared contribution
  • add regression coverage for all built-in tools and conditional bash guidance

Tests

  • npm run check
  • ./test.sh

@christianklotz
christianklotz requested a review from badlogic August 5, 2026 14:35
@christianklotz christianklotz changed the title feat(coding-agent): expose tool prompt contributions feat(coding-agent): colocate tool prompt contributions with tool definitions Aug 5, 2026
@badlogic

badlogic commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

why? who consumes the snippets and guidelines outside the tool itself?

@christianklotz

christianklotz commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

We have the existing tool definitions in coding-agent/src/core/tools/, e.g. createBashToolDefinition() for bash, and then new harness tools in coding-agent/src/harness/tools/ like createBashTool(). Harness tools have name and description, etc. but no prompt snippets or guidelines. Also, the CLI uses the snippets for the CLI --help usage instructions.

AgentHarness.create receives the fully built system prompt, which would include the tools' snippets and guidelines.

If the system prompt is expected to be the same in both agent session and harness mode, the thinking is to avoid drift by using the same prompt contributions.

See #7686

@christianklotz
christianklotz force-pushed the feat/tool-system-prompt-contributions branch from 49cf5c3 to e736521 Compare August 6, 2026 10:55
@badlogic
badlogic merged commit 9ab91fb into main Aug 6, 2026
1 check passed
@badlogic
badlogic deleted the feat/tool-system-prompt-contributions branch August 6, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants