Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

This chapter covers common issues organized by category, along with environment variable reference.


API & Provider Issues

API Key Not Set

Error: ANTHROPIC_API_KEY environment variable not set

Fix: Export the key in your shell or verify with octos status:

export ANTHROPIC_API_KEY="your-key"

If running as a service, ensure the environment variable is set in the service environment (launchd plist or systemd unit), not just your interactive shell.

Rate Limited (429)

The retry mechanism handles this automatically (3 attempts with exponential backoff). If the error persists:

  • Try switching to a different provider via /queue or in-chat model switching.
  • Wait for the rate limit window to reset.

Debug Logging

Enable detailed logs to diagnose issues:

RUST_LOG=debug octos chat
RUST_LOG=octos_agent=trace octos chat --message "task"

Build Issues

ProblemSolution
Build fails on LinuxInstall build dependencies: sudo apt install build-essential pkg-config libssl-dev
macOS codesign warningSign the binary: codesign -s - ~/.cargo/bin/octos
octos: command not foundAdd cargo bin to PATH: export PATH="$HOME/.cargo/bin:$PATH"

Channel-Specific Issues

Lark / Feishu

IssueSolution
404 on WebSocket endpointLarksuite international does not support WebSocket mode. Use "mode": "webhook" in your config
Challenge verification failsEnsure your tunnel (e.g., ngrok) is running and the URL matches the one configured in the Lark console
No events receivedPublish the app version after adding events. Check Event Log Retrieval in the console
Bot does not replyCheck that the im:message:send_as_bot permission is granted
Markdown not renderingMessages are sent as interactive cards; Lark supports a subset of markdown
Tunnel URL changedFree tunnel URLs change on restart. Update the request URL in the Lark console

WeCom / WeChat

“Environment variable WECOM_BOT_SECRET not set”

Set the secret before starting the gateway:

export WECOM_BOT_SECRET="your_secret"

Connection drops or fails to subscribe

  • Verify bot_id and secret are correct.
  • Check network connectivity to wss://openws.work.weixin.qq.com.
  • The channel auto-reconnects up to 100 times with exponential backoff. Check logs for error details.

Messages not arriving

  • Confirm the upstream relay service is running and linked to your account.
  • Check that the WeCom group robot is the same one configured in octos.
  • If using allowed_senders, verify the sender’s WeCom user ID is in the list.
  • Check for duplicate message filtering – the channel deduplicates the last 1000 message IDs.

Long messages are truncated

Messages over 4096 characters are automatically split into multiple chunks by octos. If further truncation occurs, check the relay service’s own message length settings.


Platform-Specific Issues

ProblemSolution
Dashboard not accessibleCheck port: octos serve --port 8080, open http://localhost:8080/admin/
WSL2 port not forwardedRestart WSL: wsl --shutdown then reopen terminal
Service will not startCheck logs: tail -f ~/.octos/serve.log (macOS) or journalctl --user -u octos-serve (Linux)
Windows: octos not foundEnsure %USERPROFILE%\.cargo\bin is in your PATH
Windows: shell commands failCommands run via cmd /C; use Windows-compatible syntax

Environment Variables Reference

VariableDescription
ANTHROPIC_API_KEYAnthropic API key
OPENAI_API_KEYOpenAI API key
GEMINI_API_KEYGemini API key
OPENROUTER_API_KEYOpenRouter API key
DEEPSEEK_API_KEYDeepSeek API key
GROQ_API_KEYGroq API key
MOONSHOT_API_KEYMoonshot API key
DASHSCOPE_API_KEYDashScope API key
MINIMAX_API_KEYMiniMax API key
ZHIPU_API_KEYZhipu API key
ZAI_API_KEYZ.AI API key
NVIDIA_API_KEYNvidia NIM API key
OMINIX_API_URLLocal ASR/TTS API URL
RUST_LOGLog level (error / warn / info / debug / trace)
TELEGRAM_BOT_TOKENTelegram bot token
DISCORD_BOT_TOKENDiscord bot token
SLACK_BOT_TOKENSlack bot token
SLACK_APP_TOKENSlack app-level token
FEISHU_APP_IDFeishu app ID
FEISHU_APP_SECRETFeishu app secret
EMAIL_USERNAMEEmail account username
EMAIL_PASSWORDEmail account password
WECOM_CORP_IDWeCom corp ID
WECOM_AGENT_SECRETWeCom agent secret