fix(desktop): pass ZDOTDIR and BASH_ENV through env filter for agent hooks#795
fix(desktop): pass ZDOTDIR and BASH_ENV through env filter for agent hooks#795
Conversation
…hooks The terminal daemon's buildSafeEnv() was filtering out ZDOTDIR and BASH_ENV, preventing the shell wrapper from being sourced. Without these variables, ~/.superset/bin wasn't prepended to PATH, so the real agent binaries were used instead of the wrappers that fire hook notifications.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR removes debug logging statements from two files and extends the terminal environment variable allowlist by adding ZDOTDIR and BASH_ENV to support shell wrapper PATH injection. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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. 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
ZDOTDIRandBASH_ENVto the environment variable allowlist inbuildSafeEnv()~/.superset/binfrom being prepended to PATHRoot Cause
The persistent terminal daemon calls
buildSafeEnv()to filter environment variables before spawning shells. This was strippingZDOTDIR(used by zsh) andBASH_ENV(used by bash), which meant the shell wrappers in~/.superset/zsh/.zshrcweren't being sourced. As a result,~/.superset/binwasn't in PATH, so the realclaude/opencodebinaries were used instead of the wrappers that fire hook notifications.Test plan
which claudereturns~/.superset/bin/claude(wrapper) instead of~/.local/bin/claude(real binary)~/.superset/binSummary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.