AI Backend Issues
Troubleshoot issues specific to the Claude Code and Pi backends.
Claude Code Issues
"Claude Code auth not configured" / "cc_auth_missing"
No valid Anthropic authentication found.
bash
# Option 1: Set API Key
export ANTHROPIC_API_KEY=sk-ant-...
broski
# Option 2: Login via Claude CLI
claude login
# Follow the prompts
# Check existing auth
cat ~/.claude/settings.jsonRate Limiting / "Rate limit exceeded"
Too many requests to the Anthropic API.
- Wait for rate limit to reset (usually 1 minute)
- Check your plan limits on the Anthropic dashboard
- Session shows "retry" status and auto-retries
- Reduce request frequency if persistent
Context Length Exceeded
Session refuses new messages, "Context too long" error.
- Use
/compactcommand to summarize and reduce context - Start a new session (context is preserved in history)
- Fork the session to create a branch with less history
Permission Issues / "User denied permission"
Tools won't execute, permission prompts timing out.
- Check for pending permission prompts in the app
- Permission prompt may be waiting on desktop - check there too
- Configure permission mode in settings (default, plan, auto-edit)
- Use "Allow Always" for trusted tools
"Claude OAuth token expired"
Your Claude login session has expired.
bash
# Re-authenticate
claude loginCommon Mistakes - Claude Code
| Mistake | Fix |
|---|---|
| Using wrong API key format | Must start with sk-ant- |
| API key not exported | Add to shell config or pass via env |
| Claude CLI not installed | curl -fsSL https://claude.ai/install.sh | bash |
| Expired OAuth token | Run claude login again |
| Denying all permissions | Allow some tools or use auto-edit mode |
Pi Issues
Pi is an open-source multi-provider agent
Pi connects to any AI provider. Most issues relate to provider API key configuration.
"Pi not found"
Bridge can't find the Pi binary.
bash
# Check if Pi is installed
which pi
# If not found, install it
npm i -g @earendil-works/pi-coding-agent
# Then reload your shell
source ~/.bashrc # or ~/.zshrcNo Models Available
Pi needs at least one AI provider API key to discover models.
bash
# Check your API keys
echo $ANTHROPIC_API_KEY
echo $OPENAI_API_KEY
echo $GEMINI_API_KEY
# Set an API key (add to ~/.bashrc or ~/.zshrc)
export ANTHROPIC_API_KEY=sk-ant-...Context Limit / Auto-Compaction Issues
Session context exceeds model limit.
- Use the compact command from the chat overflow menu
- Enable auto-compaction in Pi settings
- Fork the session to start fresh with a summary
- Switch to a model with a larger context window
Extension Errors
A Pi extension is failing or not loading.
- Check extension paths in Pi settings
- Verify the extension package is installed
- Check bridge logs for extension error messages
Common Mistakes - Pi
| Mistake | Fix |
|---|---|
| No API key set | Set ANTHROPIC_API_KEY, OPENAI_API_KEY, or another provider key |
| Pi not found on PATH | Run npm i -g @earendil-works/pi-coding-agent |
| Wrong model name | Use the model picker in Broski — Pi auto-discovers available models |
| Context too long | Use compact command or enable auto-compaction |
| Extension not loading | Check extension paths and npm package installation |
Environment Variables Reference
| Variable | Backend | Purpose |
|---|---|---|
ANTHROPIC_API_KEY | Claude Code, Pi | Anthropic API key |
OPENAI_API_KEY | Pi | OpenAI API key |
GROQ_API_KEY | Pi | Groq API key |
Setting Environment Variables Permanently
bash
# Add to ~/.bashrc or ~/.zshrc
echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ~/.zshrc
echo 'export OPENAI_API_KEY=sk-...' >> ~/.zshrc
# Reload shell config
source ~/.zshrcSwitching Between Backends
You can switch backends in the Broski app:
- Go to Settings → AI Backend
- Select Claude Code or Pi
- The bridge will reconnect with the selected backend
Sessions are backend-specific
Sessions created with one backend cannot be opened with another. Each backend maintains its own session history.
General Debugging
bash
# Backend-focused diagnostics
broski doctor --profile agents
# Follow bridge logs
broski logs --follow
# Export diagnostics bundle for support/AI
broski logs --export
# Check backend directly
# For Claude Code (check if authenticated):
claude --version
cat ~/.claude/settings.json | head -5
# For Pi:
which pi
pi --version
# Check what processes are running
ps aux | grep -E "(claude|pi|broski)"