Stop a loop whose backend CLI is not on PATH, and say so - #343
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What changes
When a loop's backend CLI (
claude,copilot,codex,opencode) can't be found, GraphCode now stops the loop and shows a dialog instead of leaving a dead session that reads running — or, when the pane reported the exit, succeeded.How it's detected
The daemon resolves the executable the way launches do —
/bin/zsh -i -l -c 'whence -p -- <exe>'in a PTY (ProviderPath).whence -prather thancommand -v, because the launchexecs the agent and an alias wouldn't survive that. Bounded at 15s; an undecided probe never stops a loop. Found answers are cached briefly; missing ones never are.GraphStore.ensureSessionZmxSessionLauncher)nodeCheckApproved)GhosttyTerminalView) — the exit no longer resolves the loopRemote projects are skipped — their PATH belongs to another machine.
Stop, dialog, restart
LoopNode.launchFailure, which carries the executable, backend, and time. Older apps decode snapshots unchanged. The card shows the reason, and the loop's memory records it.Gate (worktree, private DerivedData)
xcodebuild test -scheme graphcodeexit=0— 1730 tests in 183 suites passed, including 12 new inProviderNotOnPathTestsxcodebuild build -scheme graphcode-cli/graphcodedexit=0/exit=0swiftlint linterrorsswift format lint --strictexit=0scripts/cli-smoke.sh(fresh SwiftPM build)exit=0, 5/5 verbsclaudeoff the login shell's PATH, goal loop on Claude Coderunning→stopped; memory: "stopped: claude is not on your PATH — …";launchFailurepersisted