fix: integrate bounded Claude startup and ambient-root denial into #707 - #732
Conversation
|
|
Published from Codex worktree |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d99714dbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let delivered = tokio::time::timeout( | ||
| CLAUDE_SUBAGENT_OUTPUT_BUDGET, | ||
| super::write_hook_output( |
There was a problem hiding this comment.
Move blocking delivery work outside the Tokio timeout
When the receipt spool or stdout is on a slow or stalled filesystem/pipe, this timeout cannot enforce the advertised 250 ms output budget: write_hook_output resolves the layout, opens the spool, writes and flushes stdout, and durably appends the receipt synchronously before reaching its first .await. A single poll therefore blocks the runtime thread past the timer deadline, potentially leaving Claude waiting until the manifest's five-second outer timeout; isolate the blocking delivery operations instead of wrapping the existing future.
Useful? React with 👍 / 👎.
| if let Some(root) = super::nearest_project_like_root(&cwd) { | ||
| return Some(root); |
There was a problem hiding this comment.
Reject ambient roots before returning marker-based roots
When $HOME is a dotfiles repository or contains a marker such as package.json, and Claude starts in a non-project descendant, nearest_project_like_root returns the entire home directory here before the ambient-root check below can run. The hook then unnecessarily scopes analytics, daemon status, and output delivery to a root that the newly added daemon routing guard rejects, potentially consuming the full status budget on every subagent start; apply the canonical is_ambient_project_root authority to this path as well.
AGENTS.md reference: AGENTS.md:L82-L89
Useful? React with 👍 / 👎.
|
Focused behavioral filters are green on clean
Did not rebase onto fork #728 |
8d99714 to
bd2d2f9
Compare
f191a79
into
codex/tracedecay-total-redesign-plan-reopened
Summary
SubagentStartstays local and fail-open, ambient user-profile roots cannot become implicit projects/watchers, and unscoped CLI tools stay projectless.crates/tracedecay,tracedecay-agent-hosts,tracedecay-cli) instead of resurrecting deleted root modules.This is the #707 integration of the still-open master-targeted #728. Merge this into
codex/tracedecay-total-redesign-plan-reopenedfirst; the concurrent post-#721 catch-up PR should re-fetch afterward.Test plan
cargo check --locked --all-targets --all-featureson the four touched packages (Codex, green)--all-features --lib user_profile_root, 3/3)claude_bundle_hooks_wire_the_expected_lifecycle_events, 1/1)