Skip to content

fix(relay): read Codex conversation transcripts - #104

Merged
dcolinmorgan merged 2 commits into
dcolinmorgan:mainfrom
M1racleShih:fix/codex-transcript-history
Oct 23, 2026
Merged

dcolinmorgan merged 2 commits into
dcolinmorgan:mainfrom
M1racleShih:fix/codex-transcript-history

Conversation

@M1racleShih

Copy link
Copy Markdown
Contributor

Summary

Fixes #103.

Codex panes already provide a valid session UUID, but get_history returns unavailable: "unsupported" because the transcript harness registry has no Codex reader. This adds the missing reader without changing the client protocol or requiring a web-client change.

Changes

  • Locate Codex rollouts by session UUID in dated YYYY/MM/DD and legacy flat session directories. Honor local CODEX_HOME and optional HERDR_CODEX_ROOTS; keep local lookups contained within configured roots, including symlink resolution.
  • Parse canonical response_item user/assistant messages, function calls, custom tool calls, and their results. Ignore duplicate event_msg mirrors, reasoning, images, and system/developer context.
  • Reuse the existing text limits, tool filtering, pagination, and parsed-transcript cache. Use stable row hashes when older rollouts lack item IDs.
  • Add Codex-specific SSH lookup roots (HERDR_REMOTE_CODEX_ROOTS) and isolate remote caches by harness. Refuse SSH transcript probes for harnesses without a remote locator rather than using Claude's path shape.
  • Add 24 Codex regression tests plus a relay get_history integration test exercising both local and SSH paths; document the configuration and security boundaries.

Scope

This is one focused commit touching six files: the transcript reader, its tests, and the related README/security/developer documentation.

No voice-input functionality, unrelated session-chaining changes, deployment/service configuration, dependencies, credentials, or private transcripts are included.

Validation

  • sh tests/run.sh: 23 passed, 0 failed, including 237 Chromium browser tests. The runner's initial unittest pass discovers 660 tests; browser-dependent tests skipped there are exercised separately by its browser pass.
  • Targeted Ruff checks, Python compilation, and git diff --check pass.
  • Pyright passes for the new regression-test file. Comparing the transcript module against upstream finds no new type diagnostics; the existing six Pi/Kimi diagnostics are unchanged.
  • Reproduced unsupported against a running Codex pane before the fix. After restarting the relay with the fix, local authenticated WebSocket and public WSS history reads succeed; paging backwards returns distinct pages without overlap.
  • The reporter has confirmed the fix in the mobile web client.

Test environment: Linux, herdr 0.9.5, Codex CLI 0.163.0. SSH behavior is covered by automated runner/probe tests, not a claim of testing against a real remote SSH host. Native macOS builds were not run locally (no Swift toolchain; no desktop source changes).

M1racleShih and others added 2 commits October 23, 2026 20:02
locate_codex returns the resolved path, and on macOS a temp dir lives under
/var, which is a symlink to /private/var. The test compared the unresolved
path, so it failed on every mac while passing on the Linux runner.
@dcolinmorgan
dcolinmorgan force-pushed the fix/codex-transcript-history branch from e172cb3 to 769b5cf Compare October 23, 2026 18:03
@dcolinmorgan
dcolinmorgan merged commit 6ddb91b into dcolinmorgan:main Oct 23, 2026
3 checks passed
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.

Codex conversation history reports unsupported despite a valid session

2 participants