feat: add envExclude option to filter environment variables for agents#190
feat: add envExclude option to filter environment variables for agents#190
Conversation
Adds a new `envExclude` configuration option that allows filtering out specific environment variables before they are passed to agent subprocesses. This addresses issue #150 where ANTHROPIC_API_KEY from .env files was being inherited by the Claude CLI, causing API credits to be used instead of Max subscription auth. Features: - Support for exact match and glob patterns (e.g., "*_API_KEY", "*_SECRET") - Available as top-level shorthand or per-agent in [[agents]] config - Configurable in TOML config files Example usage: ```toml agent = "claude" envExclude = ["ANTHROPIC_API_KEY"] ``` Fixes #150
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe pull request introduces an environment variable exclusion feature that allows users to specify which environment variables should be filtered out when spawning agent processes. This involves adding Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #190 +/- ##
==========================================
+ Coverage 44.83% 44.90% +0.06%
==========================================
Files 76 76
Lines 22029 22075 +46
==========================================
+ Hits 9877 9913 +36
- Misses 12152 12162 +10
🚀 New features to boost your workflow:
|
…GAlhn feat: add envExclude option to filter environment variables for agents
Summary
envExcludeconfiguration option to filter environment variables before spawning agent processes*_API_KEY,*_SECRET)Test plan
bun run typecheck- passesbun run build- passesbun test src/plugins/agents/base.test.ts- 28 tests passUsage