Error Reference

Complete reference of all error messages in Broski with causes and solutions.

How to Use This Reference

  • Search the page: Use Ctrl+F (or Cmd+F on Mac) to search for the exact error text
  • Browse by category: Errors are organized by component
  • Check the quick reference: Jump to common errors at a glance

Quick Reference

Error/CodeComponentQuick Fix
UnauthorizedAuthRe-scan QR code
Port in useBridgekill <PID> or --port 0
OpenCode not foundOpenCodebun add -g opencode-ai
Claude Code auth missingClaude Codeexport ANTHROPIC_API_KEY=... or claude login
Tailscale not connectedTailscaleClick Tailscale icon and connect
Funnel not enabledTailscaleEnable in admin console
Connection timeoutNetworkCheck IP/port, firewall
Heartbeat timeoutNetworkCheck connectivity, auto-reconnects
Access deniedFilesUse paths under ~ or /tmp
Rate limited (429)APIWait 1 minute, retry
OAuth token expiredAuthclaude login or codex
Scan timeoutFile SearchInformational, cached results used

Bridge Startup Errors

"Bridge port {port} is already in use"

Source: Bridge startup

Cause: Another process (often a previous broski instance) is using the port. This commonly happens when a previous bridge was suspended with Ctrl+Z instead of Ctrl+C.

bash
# Find the process using the port
lsof -nP -iTCP:18274 -sTCP:LISTEN

# Kill it
kill <PID>

# Or use random port
broski --port 0
"Failed to start managed OpenCode server"

Source: OpenCode bootstrap

Cause: OpenCode is not installed or not in PATH.

bash
# Verify installation
which opencode && opencode --version

# Install if missing
bun add -g opencode-ai
"OpenCode started but did not become ready"

Source: OpenCode health check

Cause: OpenCode process started but HTTP server didn't respond within 10 seconds.

bash
# Try running OpenCode manually to see errors
opencode serve

# Try manual mode
broski --manual --opencode-url http://localhost:4096
"No running OpenCode servers found"

Source: Attach mode

Cause: You used --attach but no running OpenCode instances were detected.

bash
# Start OpenCode manually first
opencode serve

# Or use managed mode (default)
broski
"Manual mode requires --opencode-url"

Source: CLI validation

Cause: You specified --manual without providing the OpenCode server URL.

bash
broski --manual --opencode-url http://localhost:4096

# Or via environment variable
OPENCODE_BASE_URL=http://localhost:4096 broski --manual

Connection Errors

"Unauthorized"

Source: WebSocket authentication

Cause: Invalid or missing auth token. QR code may be outdated or token was regenerated.

Solution: Re-scan the QR code from the bridge terminal.

"WebSocket upgrade failed"

Source: WebSocket connection

Cause: HTTP-to-WebSocket upgrade was rejected. Server may be overloaded or proxy interfering.

Solution: Verify bridge is running, check no proxy is modifying WebSocket headers, restart bridge.

"Heartbeat timeout"

Source: WebSocket health monitoring

Cause: Server didn't receive a pong response within 90 seconds. Network may have dropped silently or app was backgrounded.

Solution: App will auto-reconnect. Check network connectivity on both devices.

"Connection timeout"

Source: WebSocket client

Cause: Connection attempt didn't complete within 5 seconds. Bridge may not be running, wrong IP/port, or firewall blocking.

bash
# Verify bridge is running
curl http://<ip>:18274/

# Check firewall settings
# Verify same network (for local)
"Invalid connection URI"

Source: WebSocket service

Cause: Empty or malformed connection URI received.

Solution: Re-scan the QR code from the bridge terminal.

"All connection attempts failed"

Source: Connection provider

Cause: App tried all available endpoints (local IP, Tailscale IP, MagicDNS) but none succeeded.

bash
# Verify bridge is running
broski doctor

# Check firewall settings
# For local: ensure same WiFi
# For Tailscale: ensure both devices connected

Authentication Errors

"Invalid auth token"

Source: Token validation

Cause: Provided token doesn't match bridge's expected token.

Solution: Re-scan QR code. If you regenerated the token, scan the new QR code.

"Missing auth token"

Source: Token validation

Cause: No authentication token was provided in the connection request.

text
# Token should be in URL:
wss://<ip>:18274?token=<your-token>
"Warning: Could not persist auth token"

Source: Token storage

Cause: Couldn't save token to ~/.broski/token.json. QR codes may rotate between restarts.

bash
# Check permissions
ls -la ~/.broski/

# Create directory if needed
mkdir -p ~/.broski
chmod 700 ~/.broski

OpenCode Errors

"OpenCode not found"

Source: Doctor check

Cause: OpenCode is not installed or not in your PATH.

bash
# Install OpenCode
bun add -g opencode-ai

# Reload shell
source ~/.bashrc  # or ~/.zshrc
"OpenCode not responding"

Source: Health check

Cause: OpenCode process is running but not responding to HTTP requests.

bash
# Restart bridge (it will restart OpenCode)
# Press Ctrl+C, then:
broski

# Or test OpenCode directly
opencode serve

Claude Code Errors

"Claude Code auth not configured" / "cc_auth_missing"

Source: Claude Code initialization

Cause: 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
"cc_error"

Source: Claude Code streaming

Cause: General error during Claude Code execution. Check the accompanying message for details.

  • Rate limiting: Wait and retry
  • Context too long: Start a new session
  • Network issues: Check internet connection
"User denied permission"

Source: Claude Code permission handling

Cause: User rejected a tool permission request in the app.

Note: This is intentional user action. If you want to allow the action, tap "Allow" instead of "Deny".

Tailscale Errors

"Tailscale not installed"

Source: Doctor check

Cause: Tailscale app is not found on your system.

bash
# Run the setup wizard
broski setup-tailscale

# Or install manually
brew install --cask tailscale  # macOS
"Tailscale not connected"

Source: Tailscale check

Cause: Tailscale is installed but not connected to your tailnet.

bash
# Check status
tailscale status

# Connect
tailscale up
"Tailscale Funnel is not enabled"

Source: Funnel setup

Cause: You tried to use --funnel but Funnel is not enabled in the Tailscale admin console.

  1. Go to admin.tailscale.com
  2. Navigate to Access controls
  3. Enable Funnel for your device
  4. Wait a few minutes, then retry
"Failed to enable Funnel"

Source: Funnel setup

Cause: The tailscale funnel command failed.

bash
# Verify Tailscale is connected
tailscale status

# Check Funnel is enabled in admin console
# Try without Funnel first
broski

PTY (Terminal) Errors

"PTY list failed"

Failed to list terminal sessions from OpenCode. Verify OpenCode is running and restart the bridge.

"Failed to create PTY session"

OpenCode failed to create a new terminal session. Check OpenCode logs and verify the project path exists.

"PTY session not found"

The requested PTY session ID doesn't exist (may have been deleted). Refresh the terminal list or create a new session.

File Access Errors

"Access denied"

Source: File operations

Cause: Requested file path is outside allowed directories. For security, Broski only allows access to:

  • Home directory (~)
  • /tmp
  • /var/tmp
"File not found"

The requested file doesn't exist at the specified path. Verify the path is correct and file permissions.

"File too large"

File exceeds size limit (default 10MB for binary files). Use terminal commands for large files instead.

HTTP Status Codes

Client Errors (4xx)

CodeMeaningSolution
400Bad RequestCheck request format and required parameters
401UnauthorizedRe-scan QR code to get valid token
403ForbiddenCheck permissions and path restrictions
404Not FoundVerify resource ID or path is correct
429Too Many RequestsWait for rate limit to reset (usually 1 minute)

Server Errors (5xx)

CodeMeaningSolution
500Internal Server ErrorCheck bridge logs, restart bridge
502Bad GatewayBackend (OpenCode/Claude) unavailable, restart bridge
503Service UnavailableWait and retry, or restart bridge

Plugin Errors

"Error scanning plugins directory"

Failed to read plugins from ~/.claude/plugins/. Check directory permissions or remove corrupted plugin directories.

"Failed to save plugin config"

Could not write to ~/.broski/plugins-config.json. Check disk space and directory permissions.

Custom Tools Errors

"Error executing HTTP tool"

A custom HTTP tool failed. Check that target URL is reachable, authentication headers are correct, and API endpoint is operational.

"Error executing script"

A custom script tool failed. Verify script path exists, is executable, and test manually:

bash
/path/to/your/script args
"Unknown handler type"

Custom tool has unrecognized handler type. Must be http, script, or builtin.

"Invalid tool: {errors}"

Custom tool definition failed validation. Check for required fields (name, description, command), valid parameter types, and correct JSON schema format.

File Search Errors

"Access denied or invalid path"

Path is outside allowed directories. File search only works in home directory (~), /tmp, and /var/tmp.

"Not a directory" / "Directory not found"

Project path doesn't exist or isn't a directory. Verify you're providing a directory, not a file path.

"Refusing to scan filesystem root"

Attempted to search from filesystem root (/), which is too broad. Specify a more specific project directory.

"Scan timeout after 5000ms"

Project has too many files. Partial results returned. Add patterns to .gitignore to exclude large directories.

Getting Help

If you can't find your error
  1. Run broski logs --follow while reproducing the issue
  2. Run broski doctor --profile pairing (or network/agents/daemon)
  3. Export a support bundle: broski logs --export
  4. Check the troubleshooting guide
  5. Contact support at broskiappp@gmail.com

Related