Troubleshooting¶
Common issues, solutions, and debugging strategies for rp1.
Quick Reference¶
| Issue | Common Cause | Quick Fix |
|---|---|---|
| Agent not following patterns | Stale or incomplete KB | Run /knowledge-build |
| Agent hallucinating paths | Missing codebase context | Verify KB has modules.md |
| Agent stuck in loop | Anti-loop directive missing | Check agent spec for exit conditions |
| KB generation fails | Large codebase or timeout | Use incremental build |
| KB content stale | Code changed after build | Rebuild KB |
| Commands not found | Plugins not installed | Run rp1 init |
| Slow operations | Large context window | Break into smaller operations |
Agent Behavior Issues¶
Agent Not Following Patterns¶
Agent ignores codebase patterns and conventions
Symptoms:
- Generated code doesn't match your codebase style
- Agent uses different naming conventions
- Error handling patterns inconsistent with existing code
Causes:
- Knowledge base is stale or incomplete
patterns.mdmissing or poorly populated- Agent not loading KB context
Solutions:
-
Rebuild the knowledge base:
-
Verify patterns.md exists and has content:
If empty or minimal, the KB build may have failed or your codebase lacks clear patterns.
-
Check agent loaded KB context:
Look for "Loading KB files" in the agent output. If missing, the agent may not be KB-aware.
-
Manually provide patterns:
If patterns.md is sparse, add explicit patterns to your CLAUDE.md or AGENTS.md instruction file.
Agent uses wrong framework or library versions
Symptoms:
- Agent suggests deprecated APIs
- Code incompatible with your installed versions
- Import statements don't match your setup
Solutions:
-
Ensure KB includes dependency information:
The
architecture.mdfile should document your tech stack. If it doesn't: -
Check your package.json/requirements.txt is in scope:
KB generation analyzes package files. Ensure they're not gitignored or excluded.
-
Add explicit version constraints to CLAUDE.md:
Agent Hallucinating File Paths¶
Agent references files that don't exist
Symptoms:
- Agent suggests editing
/src/utils/helpers.tsbut file doesn't exist - Import paths point to nonexistent modules
- References to directories that were renamed or moved
Causes:
- Stale KB from before refactoring
- Agent inferring paths from patterns rather than actual structure
- Missing
modules.mdin KB
Solutions:
-
Verify KB is current:
If the date is old, rebuild:
-
Check modules.md exists:
This file maps your codebase structure. If missing, KB generation failed.
-
Provide explicit file references:
When giving tasks, include actual file paths:
Agent creates files in wrong directories
Symptoms:
- New files created at project root instead of proper location
- Test files not in test directory
- Components created outside component folder
Solutions:
-
Verify patterns.md documents directory structure:
-
Be explicit in task descriptions:
Instead of: "Create a new user service"
Use: "Create a new user service at
src/services/user.service.tsfollowing the existing service pattern insrc/services/auth.service.ts" -
Add directory conventions to CLAUDE.md:
Agent Stuck in Loops¶
Agent keeps repeating the same actions
Symptoms:
- Agent tries the same fix multiple times
- Conversation becomes circular
- No progress despite multiple attempts
Causes:
- Agent spec missing anti-loop directive
- Blocking issue without clear resolution path
- Conflicting instructions
Solutions:
-
Start a new conversation:
Sometimes the cleanest fix is to start fresh with a clearer task description.
-
Break the task into smaller steps:
Instead of: "Fix all the tests"
Use:
-
Provide explicit exit conditions:
-
Check for conflicting instructions:
Review CLAUDE.md/AGENTS.md for contradictory guidance that might confuse the agent.
Agent makes changes then reverts them
Symptoms:
- Agent edits a file, then edits it back
- Same error keeps reappearing
- Oscillating between two states
Solutions:
-
Identify the root cause:
The agent may be fixing symptoms rather than the underlying issue. Ask:
-
Provide clearer success criteria:
-
Checkpoint progress:
After each meaningful change, commit:
Knowledge Base Issues¶
KB Generation Fails¶
knowledge-build command fails or times out
Symptoms:
- Command exits with error
- Build hangs for extended period
- Partial KB files generated
Causes:
- Very large codebase exceeding context limits
- Network timeout during API calls
- Malformed files in codebase
- Insufficient permissions
Solutions:
-
Check for very large files:
Files over 5000 lines may cause issues. Consider excluding them.
-
Use incremental builds:
If available, run incremental KB updates instead of full rebuilds.
-
Check for binary files in source:
Large binary files accidentally committed can cause issues:
-
Verify API connectivity:
Ensure your AI tool has network access and valid API keys.
-
Review error output:
Look for specific error messages in the command output for targeted fixes.
KB files are empty or minimal
Symptoms:
- Generated files have only headers
patterns.mdcontains no patternsmodules.mdis missing components
Causes:
- Codebase too small to extract patterns
- Non-standard file structure
- Build interrupted before completion
Solutions:
-
Verify codebase has sufficient code:
KB generation works best with established codebases. Very small projects may generate sparse KBs.
-
Check build completed:
Look for completion message:
If not present, rebuild.
-
Manually seed KB content:
For small projects, add content directly to KB files to bootstrap agent understanding.
KB Content Stale¶
KB doesn't reflect recent code changes
Symptoms:
- Agent references old API signatures
- Deleted files still mentioned
- New modules unknown to agent
Solutions:
-
Rebuild the KB:
-
Set up automatic KB rebuilds:
Add KB rebuild to your CI/CD on merge to main:
-
Check KB generation date:
Compare with your most recent significant code changes.
KB missing concepts or terminology
Symptoms:
- Domain-specific terms not understood
- Business logic patterns not captured
- Agent asks basic questions about your domain
Solutions:
-
Add concepts to CLAUDE.md:
Create a terminology section:
-
Rebuild KB with more context:
Ensure documentation files (README, docs/) are included in KB generation scope.
-
Add a glossary file:
Create
GLOSSARY.mdat project root with domain definitions. KB generation will incorporate it.
Performance Issues¶
Slow KB Generation¶
KB build takes too long (>30 minutes)
Symptoms:
- Build runs for extended periods
- Progress appears stuck
- Timeouts in CI environments
Causes:
- Very large codebase (>100k lines)
- Many small files requiring individual analysis
- Network latency to AI provider
Solutions:
-
Use incremental builds when available:
Incremental builds only analyze changed files.
-
Exclude non-essential directories:
In CLAUDE.md, specify exclusions:
-
Schedule KB builds:
Run full builds during off-hours rather than on-demand:
-
Consider splitting monorepos:
For very large monorepos, consider per-package KB generation.
Slow Command Execution¶
Commands take too long to complete
Symptoms:
- Simple operations take minutes
- Responses feel sluggish
- Timeouts during complex operations
Solutions:
-
Break large tasks into smaller units:
Instead of: "Review all 50 files in this PR"
Use: "Review the auth changes in this PR" (then separate reviews for other areas)
-
Use targeted commands:
Instead of broad commands, use specific ones:
/code-checkfor quick hygiene checks/pr-reviewfor full PR analysis
-
Check your network connection:
AI operations require stable network. High latency or packet loss impacts performance.
-
Consider time of day:
AI provider capacity varies. If consistently slow, try off-peak hours.
High Memory Usage¶
AI tool using excessive memory
Symptoms:
- System slowdown during operations
- Out of memory errors
- Application crashes
Solutions:
-
Close unused conversations:
Long conversations accumulate context. Start fresh for new tasks.
-
Reduce KB size:
Exclude large generated files and vendored code from KB.
-
Process files sequentially:
Instead of batch operations, process files one at a time:
Platform-Specific Issues¶
Claude Code¶
Plugins not appearing in Claude Code
Symptoms:
/rp1-*commands not available- Plugin installation reported success but commands missing
- "Unknown command" errors
Solutions:
-
Restart Claude Code:
Plugins load at startup. Restart required after installation.
-
Verify plugin installation:
Should show
rp1-baseandrp1-dev. -
Check plugin directory permissions:
Ensure read permissions on plugin directories.
-
Reinstall plugins:
Claude Code crashes during rp1 operations
Symptoms:
- Application closes unexpectedly
- Operations interrupted mid-task
- "Connection lost" messages
Solutions:
-
Update Claude Code:
Ensure you're on the latest version.
-
Check system resources:
Close other memory-intensive applications.
-
Simplify the task:
Complex operations may exceed limits. Break into smaller steps.
-
Report the issue:
If reproducible, report to rp1 GitHub issues with steps to reproduce.
Commands work differently in Claude Code vs terminal
Symptoms:
- Same command produces different results
- Features work in one context but not another
Solutions:
-
Verify same plugin versions:
-
Check working directory:
Ensure you're in the same project directory in both contexts.
-
Compare instruction files:
Terminal commands don't use CLAUDE.md context. Ensure necessary instructions are in the command/agent prompts.
OpenCode¶
rp1 commands not working in OpenCode
Symptoms:
- Commands not recognized
- Different syntax required
- Missing functionality
Solutions:
-
Use correct command syntax:
OpenCode uses namespaced commands:
vs Claude Code:
-
Verify plugin installation:
OpenCode requires manual plugin setup. Check OpenCode documentation for prompt configuration.
-
Check AGENTS.md exists:
OpenCode reads
AGENTS.mdinstead ofCLAUDE.md:
OpenCode prompts behave differently than Claude Code
Symptoms:
- Same workflow produces different results
- Missing features in OpenCode
- Unexpected agent behavior
Causes:
OpenCode and Claude Code have different capabilities and constraints. Some rp1 features may behave differently.
Solutions:
-
Check platform-specific documentation:
Some commands have platform-specific notes in their reference pages.
-
Use core commands:
Stick to well-tested commands like:
/knowledge-build/build(orchestrates feature workflow)/build-fast(quick tasks)
-
Report discrepancies:
File issues for significant behavioral differences between platforms.
Getting Help¶
Self-Service Resources¶
| Resource | Best For |
|---|---|
| Documentation | Command reference, guides, concepts |
| GitHub Issues | Bug reports, feature requests |
| GitHub Discussions | Questions, community help |
Reporting Issues¶
When reporting issues, include:
-
Environment:
- rp1 version:
rp1 --version - AI tool: Claude Code / OpenCode + version
- OS: macOS / Linux / Windows
- rp1 version:
-
Steps to reproduce:
- Exact commands run
- Project context (language, framework)
- Expected vs actual behavior
-
Relevant files:
- KB files if KB-related
- Error messages
- Screenshots if visual issue
Example issue template:
## Environment
- rp1 version: 0.2.7
- Claude Code version: 2.0.75
- OS: macOS 14.1
## Problem
Agent not following TypeScript patterns from KB.
## Steps to Reproduce
1. Run `/knowledge-build`
2. Run `/build-fast "Add a new service"`
3. Generated code uses `any` instead of proper types
## Expected
Generated code should use typed interfaces per patterns.md
## Actual
Generated code uses `any` type throughout
## KB Content
Related¶
- Installation - Setup and installation guide
- CI/CD Integration - Automated workflow setup
- Knowledge-Aware Agents - How agents use KB
- init Reference - Initialization troubleshooting