Skip to content

fix(codex): restore native tools and guard conversation continuity - #105

Open
gui-drumond wants to merge 1 commit into
mainfrom
codex/codex-tooling-compat
Open

gui-drumond wants to merge 1 commit into
mainfrom
codex/codex-tooling-compat

Conversation

@gui-drumond

Copy link
Copy Markdown
Collaborator

Problem and behavior

Recent Codex desktop builds call /v1/alpha/search, which Loom returned as 404, and package their CLI under codex-cli/codex-package.json. Loom preferred a separately installed PATH CLI, so catalog discovery could run against an older runtime. WebSocket continuations whose cached history was evicted or lost on restart were also forwarded with only the new messages, silently dropping prior context.

  • Forward the exact native search route to the configured Codex backend, preserving caller authentication and raw JSON. Keep local authentication, JSON validation, body limits and the existing deny-by-default routing. Preserve content type, content encoding, retry and request-id headers on search, compaction and native image responses.
  • Prefer the desktop CLI over PATH while keeping CODEX_BIN authoritative and standalone fallbacks available. Recognize the current macOS package manifest and legacy app layouts, including user Applications directories. Validate relative entrypoints. Retain Windows/Linux discovery paths and verify the Windows executable before selection.
  • Reject unknown WebSocket continuation IDs with a structured previous_response_not_found error before any upstream request. Keep the connection usable for a full-history replay. This prevents silent context loss; it does not add persistent history or guarantee automatic client recovery.

The native backend URL is captured per router instance, allowing isolated HTTP integration tests without process-wide environment races. New compatibility CI jobs run the regression tests on Windows and macOS; existing Linux CI runs the full suite.

Validation

Reproduced three failures before the fixes: search returned 404, a missing-history continuation reached the upstream, and local CLI resolution chose the older PATH runtime. All targeted regressions pass after the fixes, including mocked native auth/body/header forwarding, route boundaries, manifest fixtures, and same-connection full-history recovery.

Passed locally on macOS:

  • bun run lint
  • bun run test (170 tests)
  • bun run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml

Native search forwarding is verified against a local mock, not an authenticated production search. Windows/Linux execution is delegated to PR CI. No user configuration, permission profiles, plugins, session databases or installed applications are modified by this PR.

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