Harden agent CLI startup in fragile user environments#424
Merged
Conversation
Use non-interactive login shell capture for Codex app-server startup and resolve Codex/startup probe commands from PATH before shell fallback. Make optional Codex memory-mode disable best effort with bounded foreground attempts and a background retry so it cannot hold startup readiness. Add regression coverage for PATH-first resolver mode and memory-mode retry behavior.
This was referenced Jul 8, 2026
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.
Context
This started as an investigation into slow/stuck Codex connection startup, but the root theme is broader: agent CLIs can fail or stall when RepoPrompt is launched from a macOS app environment that does not match the user's terminal PATH, shell aliases, Homebrew/Fish setup, or legacy MCP/CLI symlink state.
This PR hardens that startup boundary without abandoning the legacy path behavior users may already depend on.
Summary
~/RepoPromptpath for newly generated configs/installs~/.claude/local/claudeWhy this shape
~/RepoPromptpath improves generated config robustness going forward.Validation
make dev-test FILTER=OpenCodeACPLaunchResolverTestsmake dev-test FILTER=CursorACPLaunchResolverTestsmake dev-test FILTER=CECLINamingAndRoutingTestsmake dev-test FILTER=CLIPathInstallerTestsmake dev-test FILTER=DebugCLIInstallerScriptTestsmake dev-formatmake dev-lintpython3 Scripts/test_suite_optimizer.py verify-ledger --ledger Scripts/Fixtures/test-suite-contract-ledger.tsv.agents/skills/rpce-contribution-check/scripts/preflight.sh commit.agents/skills/rpce-contribution-check/scripts/preflight.sh pushNotes