Skip to content

[Bug]: Track Codex harness stability work #66251

Description

@cyrusaf

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

This is a tracking issue for coordinating Codex harness stability work. Detailed repro steps, root-cause notes, and implementation discussion should live in linked child issues or PRs.

Steps to reproduce

This is an umbrella tracking issue rather than a single repro case.

The bundled Codex harness has several related reliability issues across gateway startup, Codex app-server initialization, session reset, native compaction, and token accounting. This issue is meant to organize Codex-specific reports and keep the stabilization work easy to follow.

Expected behavior

The bundled Codex harness should be stable enough to use as the primary runtime for Codex-backed OpenClaw agents.

At a high level:

  • Codex-backed gateway startup should reliably register the Codex harness and model/provider catalog.
  • Codex app-server initialization should accept valid supported app-server versions and fail clearly when initialization cannot complete.
  • Reset/new-session flows should not accidentally preserve stale native Codex app-server state.
  • Native Codex compaction and status reporting should reflect current context state accurately.

Actual behavior

Multiple related Codex harness bugs have been observed or reported. This parent issue is only for coordination, ordering, cross-linking, and broader discussion about getting the Codex harness into a stable state.

OpenClaw version

2026.4.10 / 2026.4.11 reports, plus current main investigation

Operating system

macOS and Linux reports

Install method

npm/global CLI and local source investigation

Model

codex/gpt-5.4

Provider / routing chain

OpenClaw -> bundled codex plugin -> Codex app-server

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Tracking map

1. Gateway startup, plugin activation, and model catalog

These cover cases where Codex appears configured or loaded, but the live gateway/model registry does not have the expected Codex runtime surface available.

2. Codex app-server initialization and protocol robustness

These cover handshake, initialization, user-agent parsing, and app-server protocol fragility.

3. Codex reset and native app-server resume state

These cover cases where Codex-backed reset/new-session behavior does not fully isolate the next run from old native Codex app-server state.

4. Native Codex compaction, token accounting, and context reporting

These cover misleading context size and Codex-specific compaction/status accounting.

Scope notes

Please keep this tracker focused on the bundled Codex harness and Codex app-server integration. Generic session, compaction, transcript replay, CLI fallback, or ACP issues should only be linked here when they have a clear Codex-harness-specific failure mode.

Notes for contributors

Please prefer focused child issues and PRs over adding detailed repros directly here. A good child issue should include:

  • the smallest reproduction path
  • observed vs expected behavior
  • suspected code path or root cause, if known
  • the narrowest useful regression test
  • links back to this tracking issue

Impact and severity

Affected: Users running OpenClaw with the bundled Codex harness.

Severity: High for Codex-backed long-running sessions.

Frequency: Multiple related issues have been observed across startup, reset, status, and compaction flows.

Consequence: Codex-backed sessions can fail to start through the expected harness, preserve stale native context after reset, or report misleading context usage after compaction.

Additional information

This issue is intended as a coordination hub. Please keep detailed reproduction steps, root-cause notes, and implementation discussion in the linked child issues or PRs where possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions