Summary
Make repository integration and E2E tests deterministic when the parent process is running inside Claude Code and exports CLAUDECODE / CLAUDE_CODE_ENTRYPOINT.
Observed behavior
During the v1.7.3 standard cc review, Fable launched repository unit and E2E tests from its Claude-driven process. The test environments spread the complete parent environment (tests/integration/claude-companion.test.mjs:294-301 and tests/e2e/codex-skills-e2e.test.mjs:180-187), so Claude host-origin markers reached child Codex/companion processes. A cancellation-oriented E2E path then failed to terminate in its normal time window and the review had to be cancelled.
The normal Codex-run local suite is green, so this is environment-dependent rather than a general test failure.
Risk
- Claude-driven reviews can look stuck even though the
cc worker and process cleanup are healthy.
- Ambient host markers can change loop-prevention and routing behavior in tests that did not opt into that scenario.
- CI does not cover this parent environment.
Acceptance criteria
- Scrub external-host routing markers from the default test environment, while preserving tests that explicitly set them.
- Add a bounded regression that runs the relevant integration/E2E entrypoint with
CLAUDECODE=1 and CLAUDE_CODE_ENTRYPOINT=cli and proves it terminates.
- Keep the explicit loop-prevention tests green.
- Verify cancellation fixtures leave no child Codex, Claude, or companion process behind.
Origin
Observed during a real Fable 5.1 review through cc on v1.7.3; reproduced by process-tree inspection and cleared by cancelling the foreground review.
Summary
Make repository integration and E2E tests deterministic when the parent process is running inside Claude Code and exports
CLAUDECODE/CLAUDE_CODE_ENTRYPOINT.Observed behavior
During the v1.7.3 standard
ccreview, Fable launched repository unit and E2E tests from its Claude-driven process. The test environments spread the complete parent environment (tests/integration/claude-companion.test.mjs:294-301andtests/e2e/codex-skills-e2e.test.mjs:180-187), so Claude host-origin markers reached child Codex/companion processes. A cancellation-oriented E2E path then failed to terminate in its normal time window and the review had to be cancelled.The normal Codex-run local suite is green, so this is environment-dependent rather than a general test failure.
Risk
ccworker and process cleanup are healthy.Acceptance criteria
CLAUDECODE=1andCLAUDE_CODE_ENTRYPOINT=cliand proves it terminates.Origin
Observed during a real Fable 5.1 review through
ccon v1.7.3; reproduced by process-tree inspection and cleared by cancelling the foreground review.