Repository navigation
fix: agent 不再继承操作者的 Claude Code 配置; 关闭 agent stdin - #17
Conversation
…ose agent stdin claude -p now runs with --setting-sources project,local (user-level hooks and the user's global CLAUDE.md no longer apply inside agents; FSC_CLAUDE_USER_SETTINGS=1 opts back in) and with stdin ignored (an open silent stdin made claude wait ~3 s before starting). Measured: trivial prompt 22 s -> 9 s; 2-task exec phase 77 s -> 20 s. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016FSVfwwP6TVxGLUWatWM53
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
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 |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016FSVfwwP6TVxGLUWatWM53
问题
被拉起的
claude -p会继承操作者的个人 Claude Code 配置:用户级 hook 和全局CLAUDE.md。实测它能背出我的工单规则和 Stop hook;hook 可能拖慢甚至卡住无人值守的 agent。改动
claude启动参数加--setting-sources project,local:用户级设置不再生效,项目级和本地设置照常生效。FSC_CLAUDE_USER_SETTINGS=1可恢复旧行为。分析器和执行器共用同一个函数。ignore:stdin 开着但没数据时,claude -p会先等约 3 秒才启动。实测
更正(此前版本的说法是错的)
这个 PR 最初暗示“之前 16 分钟的运行可能由用户级 hook 造成”。不是。 隔离后的那次运行总耗时仍是 15 分 28 秒,但文件时间戳显示分析 20 秒、执行 27 秒,其余约 14 分钟进程在空等。真正的原因是另一个缺陷(agent 超时定时器从不清除,成功的运行要等 15 分钟超时才退出),已在后续 PR 修复。本 PR 的隔离改动仍然有价值(agent 不再背操作者的规则、更快启动),但它不是那 15 分钟的原因。
验证
tsc --noEmit退出码 0;bun test(packages/core)184 通过 / 45 跳过 / 0 失败🤖 Generated with Claude Code
https://claude.ai/code/session_016FSVfwwP6TVxGLUWatWM53