Skip to content

bug: apm run start picks wrong runtime — system PATH stub takes priority over APM-managed binary, codex v0.116+ incompatible with GitHub Models #605

@edenfunf

Description

@edenfunf

Description

apm run start selects the wrong runtime in two separate but related scenarios:

Scenario A — System PATH stub wins over APM-managed binary

When a broken runtime stub exists in the system PATH (e.g. a GitHub CLI extension registers a copilot shim), _detect_installed_runtime finds it via shutil.which() before checking ~/.apm/runtimes/. The selected binary may be non-functional.

Scenario B — codex v0.116+ is incompatible with GitHub Models

codex removed wire_api = "chat" support in v0.116 and now requires wire_api = "responses" (OpenAI Responses API). GitHub Models only exposes the Chat Completions endpoint — the /responses endpoint returns 404. There is no configuration workaround; the two are fundamentally incompatible at the API level.

apm runtime setup codex installs the latest release (currently v0.117), which cannot work with GitHub Models regardless of config.

Steps to Reproduce

Scenario A:

  1. Install codex via apm runtime setup codex
  2. Have any other tool registered as copilot in PATH (e.g. gh extension install github/gh-copilot)
  3. apm run start — copilot stub is selected, codex is ignored

Scenario B:

  1. apm runtime setup codex (installs v0.116+)
  2. $env:GITHUB_TOKEN = "..."; apm run start
  3. Observe:
Error loading config.toml: `wire_api = "chat"` is no longer supported.

Changing to wire_api = "responses":

ERROR: unexpected status 404 Not Found, url: https://models.github.ai/inference/responses

Expected Behaviour

  • APM-installed binaries in ~/.apm/runtimes/ take priority over anything in PATH.
  • apm runtime setup codex either installs a version that works with GitHub Models, or clearly documents the incompatibility and suggests an alternative.

Environment

  • OS: Windows 11
  • apm version: v0.8.11
  • codex version: 0.117.0 (rust-based CLI)

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.area/cliCLI command surface, flags, help text (cross-cutting).area/docs-sitedocs/src/content (Starlight), README, doc generation.bugDeprecated: use type/bug. Kept for issue history; will be removed in milestone 0.10.0.priority/highShips in current or next milestonestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions