-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: add tool prompt override support in .continuerc.json #9314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add tool prompt override support in .continuerc.json #9314
Conversation
Adds a `tools` array to config that allows users to override tool
descriptions at the repo level, following the existing pattern for
models, contextProviders, and slashCommands.
This enables teams to customize tool prompts (e.g., standardizing
path format instructions) without forking the codebase.
Example .continuerc.json:
```json
{
"tools": [
{
"name": "read_file",
"description": "Custom description here"
}
]
}
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fixes continuedev#9312, Fixes continuedev#9313 Two bugs were preventing workspace .continuerc.json files from working: 1. loadRcConfigs.ts: `rcFiles.map(ide.readFile)` lost `this` binding, causing silent failures when reading .continuerc.json files. Fixed by using `rcFiles.map((uri) => ide.readFile(uri))`. 2. doLoadConfig.ts: YAML config path never loaded workspace configs. Added conditional loading of workspace .continuerc.json files for tool overrides when using config.yaml. Debugging notes: - Added file-based tracing to /tmp/continue_debug.txt in installed extension to trace config loading path - Discovered JSON path was taken but getWorkspaceRcConfigs returned [] - Found listDir found the file but readFile failed silently - Wrapping readFile in try-catch revealed the this binding issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 7 files
|
📚 Documentation PR created: #9315 I've created a documentation PR that adds usage examples and explains the new tool prompt override feature. The docs include accordion components showing how to:
The documentation follows the existing structure in |
Add defensive .catch(() => []) to ide.listDir() call to gracefully handle non-existent directories (e.g., in test environments). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace hardcoded 100ms timeout with waitForCondition polling for the edit selector close test. Windows CI runners are slower and need polling instead of fixed timeouts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
macOS CI runners are slower and need longer timeouts for UI polling in the file search test. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The test was writing to stdin immediately before the component was ready to receive input. Add 100ms delay to match other tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
@sestinj Just to personalize this a bit... I've been trying to love Every model is a little different, so making the tool prompts completely override-able is to me just a necessity. I tried to stick to your established patterns and touch as little as possible, and I think there is minimal drift. I hope you'll consider this a nice xmas gift! { |
|
Before & after for reference (with PR #9325 fix) (gpt-oss-20b)
|


Summary
Adds the ability to customize tool prompts via
.continuerc.jsonat the workspace level, plus fixes two bugs that were preventing this feature from working.ToolOverrideinterface for customizing tool descriptions, disabling tools, or modifying system message prompts.continuerc.jsonfiles (Bug: .continuerc.json files fail to load due to 'this' binding issue #9312).continuerc.jsonfiles (Bug: YAML config path does not load workspace .continuerc.json files #9313)Motivation
Local models (via LM Studio, Ollama, etc.) often struggle with Continue's default tool prompts, which include legacy syntax examples that confuse models into outputting raw
[TOOL_CALLS]BEGIN_ARG...text instead of using proper tool calling.This feature allows per-repo customization of tool prompts to work better with specific models.
Before (broken tool syntax output):
After (clean tool usage with custom prompts):
Example
.continuerc.json{ "mergeBehavior": "merge", "tools": [ { "name": "view_diff", "disabled": true }, { "name": "read_file", "description": "Read file contents. Use relative paths from workspace root.", "systemMessageDescription": { "prefix": "To read a file, use read_file with a relative path:" } } ] }Bug Fixes Included
Fix #9312:
.continuerc.jsonfiles fail to loadrcFiles.map(ide.readFile)lostthisbinding, causing silent failures. Fixed by usingrcFiles.map((uri) => ide.readFile(uri)).Fix #9313: YAML config path ignores
.continuerc.jsonloadContinueConfigFromYamlnever calledgetWorkspaceRcConfigs. Added conditional loading indoLoadConfig.tsso tool overrides work regardless of config format.Test plan
.continuerc.jsonloads with JSON config.continuerc.jsonloads with YAML configdisabled: trueremoves tool from listFixes #9312, Fixes #9313
🤖 Generated with Claude Code
Summary by cubic
Add workspace-level tool prompt overrides via .continuerc.json and fix config loading so these overrides work with both JSON and YAML configs.
New Features
Bug Fixes
Written for commit 3f26b0d. Summary will update automatically on new commits.