Skip to content

fix: improve runtime detection for Claude Code, Codex CLI, and Hermes#546

Closed
0xNyk wants to merge 1 commit intomainfrom
fix/runtime-detection
Closed

fix: improve runtime detection for Claude Code, Codex CLI, and Hermes#546
0xNyk wants to merge 1 commit intomainfrom
fix/runtime-detection

Conversation

@0xNyk
Copy link
Copy Markdown
Member

@0xNyk 0xNyk commented Apr 2, 2026

Summary

Fixes runtime detection so all 4 agent runtimes (OpenClaw, Hermes, Claude Code, Codex CLI) are properly detected when installed.

Root causes:

  • detectBinary only searched PATH — missed ~/.local/bin and ~/Library/pnpm where Claude/Codex are typically installed
  • Hermes --version exits with status 2 (not a supported flag) — detection was checking for status 0
  • Codex auth detection only checked for config files, not OPENAI_API_KEY env var
  • Codex version string included [lacp] wrapper noise

Fixes:

  • detectBinary now searches ~/.local/bin, /usr/local/bin, ~/Library/pnpm, ~/.npm-global/bin before PATH
  • Hermes detection probes with --help (exits 0), extracts version from --version banner output
  • Hermes auth checks ~/.hermes/config.yaml for configured model
  • Codex auth checks OPENAI_API_KEY env var
  • Version strings cleaned to skip wrapper/logging noise

Test plan

  • Verified detection via Node.js test script — all 4 runtimes found
  • Manual: Refresh runtimes page, verify all installed runtimes show "Detected" with correct versions

- detectBinary now searches ~/.local/bin, /usr/local/bin, ~/Library/pnpm,
  ~/.npm-global/bin before falling back to PATH lookup
- Hermes detection uses --help (exits 0) instead of --version (exits 2)
- Hermes version extracted from banner output despite non-zero exit code
- Hermes auth checks ~/.hermes/config.yaml for configured model
- Codex auth checks OPENAI_API_KEY env var in addition to config files
- Version strings cleaned to skip [lacp] wrapper noise
- resolvedBin tracked through detection for accurate auth status calls
@0xNyk
Copy link
Copy Markdown
Member Author

0xNyk commented Apr 3, 2026

Superseded by #547 which includes these detection fixes plus the onboarding redesign.

@0xNyk 0xNyk closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant