Skip to content

bug(codex): browser-pocket server restart is always refused on Codex 0.157 — the empty-composer check cannot see an empty composer #1313

Closed

Description

@Juliusolsson05

Actual

requestServerRestart (browser pocket) delivers with requireEmptyNativeComposer: true. For Codex, promptDelivery.ts then requires isCodexNativeComposerEmpty(snapshotScreen()), which expects:

  • the idle footer <model> · <cwd> on the last row, and
  • a bare › row above it.

Codex 0.157.0 renders neither when the composer is empty.

Evidence (recorded 2026-09-25, raw PTY stream, codex-cli 0.157.0, 100×30)

Idle, empty composer:

26|› Ask Codex to do anything
28|  GPT-6-Sol high fast · ~/Desktop/Development/agent-code
29|  ← for agents · ? for shortcuts            ⚠ 1 warning · f2 to view
  • The placeholder is dim (\x1b[2mAsk Codex to do anything), so the › row is never bare.
  • A second footer row (hints or warnings) sits below the status row.
  • isCodexNativeComposerEmpty therefore returns false on an empty composer, and the restart is refused with "Codex native input is occupied or cannot be verified empty".

With a typed draft, the row is › please review the draft in plain cells. Only the cell attributes tell a placeholder from a draft, as with Claude.

Expected

An empty composer (bare or dim placeholder) is verified empty, and a typed draft still refuses the delivery.

Plan

Fix together with #800: codex-headless gains a live-buffer, attribute-aware composer read (bottom-pane anchored, 1–2 footer rows), and the app uses it for this check and for Codex draft occupancy.

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Sep 25, 2026
  2. added a commit that references this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    class:C1-prompt-deliveryPrompt delivery inferred from the terminal screenprovider:codexAffects Codex integrationsev:P2Real bug with a workaroundtype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions