Skip to content

Use render-grid styling for Codex placeholder detection #505

Description

@EtanHey

Problem

PR #503 restores Codex delivery with an exact fallback list of observed empty-composer placeholders. That list will rot when Codex adds another placeholder.

The current delivery path calls surface.read_text, whose frame is flattened text. However, cmux advertises terminal.render_grid.v1, and cmux rpc terminal.replay exposes render_grid.row_spans[].style_id plus render_grid.styles[] with faint, bold, and color metadata.

A read-only live probe on an idle Codex pane observed the prompt marker as non-faint and Ask Codex to do anything as faint:true. Styling is therefore available through a richer RPC even though it is absent from the current surface.read_text frame.

Proposed scope

  • add a cmux client method for the terminal.replay/render_grid capability using stable surface identity checks
  • classify Codex composer text as a placeholder only when the prompt content is faint/dim
  • retain the exact documented string list only as a compatibility fallback for cmux builds without terminal.render_grid.v1
  • preserve the send_to can submit pre-existing human composer text #442 human-draft refusal and add tests for faint placeholder versus non-faint text with identical content
  • keep this path read-only until the existing delivery mutation gate runs

Acceptance

  • a new rotating Codex placeholder delivers without a source-code string update when render-grid styling is available
  • the same text without faint styling is protected as a human draft
  • older cmux builds retain the exact-list fallback and fail closed for unknown text

Follow-up to #500 and PR #503.

— cmuxlayerCodex-3e917d92 (worker) · codex/gpt-5.6-sol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions