Repository navigation
v0.5.1
What's Changed
Bug Fixes
- Shell-independent API key resolution: Fixed "Missing Authentication header" errors when running sidecar in non-interactive shells (Claude Code, CI/CD, cron jobs). Sidecar now automatically loads credentials from multiple sources in priority order: existing environment variables,
~/.config/sidecar/.env, then~/.local/share/opencode/auth.json. This resolves the issue where API keys exported in~/.zshrcweren't available in non-interactive contexts.
Improvements
- Unified credential loading: Consolidated scattered credential loading logic into a new
env-loader.jsmodule that runs at CLI startup, ensuring all available API keys are projected intoprocess.envbefore any validation occurs. - Better error messages: Updated validation errors to provide clear troubleshooting steps for missing credentials, explaining why non-interactive shells don't inherit
~/.zshrcexports and offering three resolution paths. - Legacy key migration: Automatically migrates deprecated
GEMINI_API_KEYtoGOOGLE_GENERATIVE_AI_API_KEYduring credential loading.
Documentation
- Shell profile guidance: Added note in skill documentation warning zsh users that
~/.zshrcexports only work in interactive shells, with recommendations to use~/.zshenvorsidecar setupinstead. - Troubleshooting section: Added new troubleshooting entry covering the "Missing Authentication header" error in Claude Code and CI environments.
- Design specification: Added detailed technical specification documenting the shell-independent key resolution design, including priority order, multi-model review feedback, and testing approach.
Full Changelog: v0.5.0...v0.5.1