File: troubleshooting-agent-customization.md | Updated: 11/18/2025
Quick fixes for common agent customization issues.
cat your-agent-file.json | jq"override": true is set for overridestext
Error: Agent 'my-custom-agent' not found
Fix: Check agent ID spelling, file location (.agents/templates/), JSON syntax (cat file.json | jq)
text
Validation error: spawnableAgents contains invalid agent 'researcher-typo'
Fix: Check spelling against built-in agents list , use exact IDs
text
Error: Cannot resolve prompt file './my-prompt.md'
Causes:
Solutions:
.agents/templates/my-prompt.mdls -la .agents/templates/my-prompt.mdjson
{
"systemPrompt": {
"type": "add", // ā Invalid
"content": "..."
}
}
Fix: Use valid override types:
json
{
"systemPrompt": {
"type": "append", // ā
Valid: append, prepend, replace
"content": "..."
}
}
json
{
"id": "my-agent",
"override": false,
"displayName": "My Agent"
// ā Missing required fields for new agents
}
Fix: Include all required fields for new agents:
json
{
"id": "my-agent",
"version": "1.0.0",
"override": false,
"displayName": "My Agent",
"purpose": "Brief description of the agent's purpose",
"model": "anthropic/claude-4-sonnet-20250522",
"systemPrompt": "You are a helpful assistant...",
"instructionsPrompt": "Process the user's request...",
"stepPrompt": "Continue working on the task..."
}
Fix: Use project root relative paths: .agents/templates/my-prompt.md, verify file exists
Symptoms:
Debug Steps:
bash
# Restart Codebuff to reload templates
codebuff
json
{
"id": "CodebuffAI/reviewer", // ā Exact match required
"override": true, // ā Must be true for overrides
"systemPrompt": {
"type": "append", // ā
Valid override type
"content": "Custom instructions..."
}
}
Symptoms:
Solutions:
spawnableAgents configuration:json
{
"spawnableAgents": {
"type": "replace", // Use "replace" to override completely
"content": \["researcher", "thinker"\]
}
}
Causes:
Solutions:
toolNames to only required toolsincludeMessageHistory: false for stateless agentsjson
{
"model": "anthropic/claude-3-5-haiku-20241022" // Faster model
}
Causes:
Solutions:
json
{
"model": "google/gemini-2.5-flash" // More economical
}
json
{
"spawnableAgents": [] // Prevent sub-agent spawning
}
Symptoms:
Debug Steps:
markdown
your-project/
āāā .agents/
ā āāā my-agent.json
ā āāā my-prompts.md
bash
ls -la .agents/templates/
bash
file .agents/templates/*.json
Begin with minimal overrides and add complexity gradually:
json
{
"id": "CodebuffAI/reviewer",
"override": true,
"model": "anthropic/claude-4-sonnet-20250522"
}
cat file.json | jqls -la .agents/templates/Restart Codebuff to see validation errors:
bash
codebuff # Look for error messages on startup
Add one override at a time to isolate issues:
Track your agent templates in git to easily revert problematic changes:
bash
git add .agents/
git commit -m "Add custom reviewer agent"
If you're still experiencing issues:
"append" - Add to existing content"prepend" - Add before existing content"replace" - Replace entire contentid, version, override: falsedisplayName, purpose, modelsystemPrompt, instructionsPrompt, stepPrompt.agents/templates/*.json.agents/templates/*.md./ (for absolute paths)Toggle menu