Repository navigation
refactor(run): register managed runs per agent - #138
Merged
Merged
Conversation
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. |
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 13:24
fd8b9b2 to
e53e7b3
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/register-managed-run
branch
from
October 6, 2026 13:24
40a95f7 to
f264028
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Oct 6, 2026
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 14:04
e53e7b3 to
cb15fd5
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/register-managed-run
branch
from
October 6, 2026 14:04
f264028 to
cd40bdb
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 14:44
cb15fd5 to
a85a5e8
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/register-managed-run
branch
from
October 6, 2026 14:48
cd40bdb to
2e38e1a
Compare
run_traced matched on RunSource throughout. It checked Codex and Cursor arguments, chose executables, created Cursor's plugin directory and discovery hooks, and set OpenCode's inline config. Those branches now live in `ManagedRun` impls on the Codex, Claude Code, Cursor, OpenCode and Pi agent types, which register them alongside setup. run_traced looks up the agent and runs the shared launch, flush and cleanup steps with the arguments, environment and cleanup guards the agent injects. Agent-specific argument checks now run before the destination check, so a Codex run with both problems reports the hook-trust flag first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Stephen Belanger (Qard)
force-pushed
the
refactor/register-managed-run
branch
from
October 6, 2026 15:03
2e38e1a to
f20a120
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on
mainnow that #137 has merged.run_tracedmatched onRunSourcethroughout:--dangerously-bypass-hook-trustand non-interactive Cursor runsThose branches now live in
ManagedRunimpls inmanaged_run/<agent>.rs. The Codex, Claude Code, Cursor, OpenCode and Pi agent types register them next to their setup adapters. Grok and Antigravity don't support managed runs, so they don't register one.run_tracedlooks up the agent, then runs the shared steps itself:It holds the agent's guards until the agent exits. A new test checks that every
RunSourcevariant resolves to a registered managed run.Behaviour
Unchanged, apart from two orderings:
--dangerously-bypass-hook-trustnow reports the flag first. Cursor's terminal check already ran first.inject, which is slightly earlier than before (before the isolated daemon directory is created, rather than just before spawn). They are still removed when the run exits.Testing
cargo clippy --all-features --all-targets -D warningsis clean.cargo test --all-features --no-fail-fast: everything passes excepttrace_runtime::tests::doctor_reports_a_daemon_that_{cannot_authenticate_the_route,resolves_other_credentials}, which fail the same way onmainin my local environment.injectdirectly. One new registry test.🤖 Generated with Claude Code