Skip to content

Find the Codex CLI when only the desktop app is installed or PATH is minimal #338

Closed

Description

@runkids

Problem

Plugin commands for the default codex target run the bare name codex from PATH (internal/plugin/native.go, Service.run). Two setups break this:

  1. Codex desktop app only. A user who installed the Codex app but not the standalone CLI has no codex on PATH; the app ships its own CLI inside the bundle. Skillshare reports plugins.error.cliMissing.
  2. Background jobs. launchd / Task Scheduler start with a minimal PATH, so even an installed CLI may not be found when skillshare pull + sync plugins runs on a schedule.

The cli override added in #307 does not help here:

  • It only applies to account targets (agent + config_dir), see internal/plugin/accounts.go account(). The default codex target cannot set it.
  • cli lives in config.yaml. With git_root: root, or when config.yaml is shared through dotfiles, one absolute path (C:\...\codex.exe vs /Applications/...) cannot be valid on both Windows and macOS.

Reported in the wild: a user syncing Codex skills/plugins/MCP between Windows and macOS with Skillshare + Git had to point the Mac job at the app-bundled CLI and fix the job's PATH by hand.

Options

  • Fall back to known app-bundled CLI locations when codex is not on PATH (macOS app bundle, Windows install dir). Exact bundle paths need verification on each OS.
  • Allow cli on built-in targets, not only accounts.
  • Make cli machine-local: per-OS values, or an override outside the synced config.

Acceptance

  • Default codex target resolves the app-bundled CLI when no codex is on PATH, or the user can point to it without editing a synced file.
  • A config shared between macOS and Windows does not break the other OS.
  • cliMissing error names where Skillshare looked.
  • Existing configs unchanged.

Metadata

Metadata

Assignees

Labels

feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions