fix(cli): disable Claude background sessions in transparent runs - #1028
Draft
afourniernv wants to merge 1 commit into
Draft
fix(cli): disable Claude background sessions in transparent runs#1028afourniernv wants to merge 1 commit into
afourniernv wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
afourniernv
force-pushed
the
codex/claude-background-launch-safety
branch
from
September 10, 2026 18:22
ea1caea to
893aeec
Compare
Signed-off-by: Alex Fournier <afournier@nvidia.com>
afourniernv
force-pushed
the
codex/claude-background-launch-safety
branch
from
September 10, 2026 23:06
893aeec to
22e8baa
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.
Overview
Transparent Claude runs own an ephemeral gateway, plugin, hook configuration,
and settings overlay. Claude Code Agent View can hand a background session to
its persistent supervisor and let the foreground dispatcher exit. Relay then
correctly cleans up its temporary resources while the detached Claude worker
still references them.
This change fails closed instead of silently leaving that worker outside the
transparent run's lifecycle. It uses Claude's documented Agent View controls
at both startup and settings-load time.
Details
CLAUDE_CODE_DISABLE_AGENT_VIEW=1in the transparent child environmentso direct
--bg/--backgrounddispatch is rejected before settings load.disableAgentView=trueandenv.CLAUDE_CODE_DISABLE_AGENT_VIEW=1in Relay's existing private settingsoverlay so interactive/background entry points stay disabled after settings
are applied and child processes inherit the gate.
2.1.121-2.1.168 clients can select an earlier repeated
--settingssourceand ignore Relay's final overlay. Persistent and managed integrations keep
the existing 2.1.121 minimum.
descriptor field; the shared process layer remains host-agnostic.
overlay, compatibility-policy, and architecture-boundary coverage; update
the Claude guide and support matrix.
Compatibility: this intentionally rejects transparent Claude 2.1.121-2.1.168
and disables Agent View/background session management within accepted
transparent runs. Users needing those sessions should use the persistent
plugin or an administrator-managed Relay deployment. There is no public Rust
API, CLI syntax, config schema, wire/protocol, middleware, cache, daemon,
plugin ABI, worker protocol, async, or cross-crate change. Configured command
wrappers must preserve Relay's injected environment and settings arguments.
Validation:
uv run pre-commit runpassed all staged hooks.cargo fmt --all -- --checkpassed.cargo clippy -p nemo-relay-cli --all-targets -- -D warningspassed.CARGO_INCREMENTAL=0 cargo build -p nemo-relay-cli --bin nemo-relaypassed.just docspassed all checks.sole failure was the unrelated macOS bootstrap process-termination timing
test, which also reproduced in isolation; no changed file participates in
that path.
2.1.168 was rejected by Relay before spawn, while 2.1.169 reached Claude's
native disabled gate; neither created job or daemon state.
Relay and the live Anthropic provider after the dual-phase settings change.
OpenAI was not used because this path has no OpenAI request surface.
Where should the reviewer start?
Start with
crates/cli/src/agents/claude/launch.rs, then review themode-specific policy in
crates/cli/src/agents/mod.rsand its boundary test incrates/cli/tests/coverage/agents/launcher_tests.rs.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)