Skip to content

Report terminal program status with OSC 7501 - #52725

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6d2a6885687b0e7af825e954fab72db0765c9a07
Oct 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6d2a6885687b0e7af825e954fab72db0765c9a07

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Report terminal program status with OSC 7501

Why

Lifecycle status reporting was limited to direct iTerm2 sessions. OSC 7501 lets other terminals receive Codex's program state.

What changed

  • Emit OSC 7501 with app=codex and states idle, working, or blocked whenever stdout is a terminal, including multiplexed sessions. Report blocked when user action is required.
  • Continue emitting iTerm2's OSC 21337 status and bounded activity details in direct iTerm2 sessions.
  • Clear status before handing the terminal to an external program, as well as on suspension and exit, and re-emit the current state after returning.

Testing

Add coverage for OSC 7501 encoding, combined iTerm2 output, clearing both protocols, and protocol selection across terminal and multiplexer environments. Update lifecycle tests and status snapshots for the new protocol.

## Why

Lifecycle status reporting was limited to direct iTerm2 sessions. OSC 7501 lets other terminals receive Codex's program state.

## What changed

- Emit OSC 7501 with `app=codex` and states `idle`, `working`, or `blocked` whenever stdout is a terminal, including multiplexed sessions. Report `blocked` when user action is required.
- Continue emitting iTerm2's OSC 21337 status and bounded activity details in direct iTerm2 sessions.
- Clear status before handing the terminal to an external program, as well as on suspension and exit, and re-emit the current state after returning.

## Testing

Add coverage for OSC 7501 encoding, combined iTerm2 output, clearing both protocols, and protocol selection across terminal and multiplexer environments. Update lifecycle tests and status snapshots for the new protocol.

GitOrigin-RevId: 6d2a6885687b0e7af825e954fab72db0765c9a07
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6d2a6885687b0e7af825e954fab72db0765c9a07 branch from 63bb0ea to 4bad6d7 Compare October 9, 2026 23:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T23:45:42.597701Z 63bb0ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 4bad6d7 into main Oct 9, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6d2a6885687b0e7af825e954fab72db0765c9a07 branch October 9, 2026 23:43
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
@RomneyDa
RomneyDa deployed to issue-triage October 9, 2026 23:56 — with Image GitHub Actions Active
@RomneyDa
RomneyDa deployed to issue-triage October 9, 2026 23:56 — with Image GitHub Actions Active
@RomneyDa
RomneyDa deployed to issue-triage October 9, 2026 23:56 — with Image GitHub Actions Active
@RomneyDa
RomneyDa deployed to issue-triage October 9, 2026 23:58 — with Image GitHub Actions Active
@Sxara242
Sxara242 deployed to issue-triage October 10, 2026 00:44 — with Image GitHub Actions Active
@Sxara242
Sxara242 deployed to issue-triage October 10, 2026 00:44 — with Image GitHub Actions Active
@Sxara242
Sxara242 deployed to issue-triage October 10, 2026 00:44 — with Image GitHub Actions Active
@Sxara242
Sxara242 deployed to issue-triage October 10, 2026 00:45 — with Image GitHub Actions Active
@Ray-SSS
Ray-SSS deployed to issue-triage October 10, 2026 00:45 — with Image GitHub Actions Active
@Ray-SSS
Ray-SSS deployed to issue-triage October 10, 2026 00:45 — with Image GitHub Actions Active
@Ray-SSS
Ray-SSS deployed to issue-triage October 10, 2026 00:45 — with Image GitHub Actions Active
@Ray-SSS
Ray-SSS deployed to issue-triage October 10, 2026 00:46 — with Image GitHub Actions Active
@jared-paul
jared-paul deployed to issue-triage October 10, 2026 00:54 — with Image GitHub Actions Active
@jared-paul
jared-paul deployed to issue-triage October 10, 2026 00:54 — with Image GitHub Actions Active
@jared-paul
jared-paul deployed to issue-triage October 10, 2026 00:54 — with Image GitHub Actions Active
@PorkWrath
PorkWrath deployed to issue-triage October 10, 2026 00:55 — with Image GitHub Actions Active
@PorkWrath
PorkWrath deployed to issue-triage October 10, 2026 00:55 — with Image GitHub Actions Active
@PorkWrath
PorkWrath deployed to issue-triage October 10, 2026 00:55 — with Image GitHub Actions Active
@jared-paul
jared-paul deployed to issue-triage October 10, 2026 00:56 — with Image GitHub Actions Active
@gigatier
gigatier deployed to issue-triage October 10, 2026 00:58 — with Image GitHub Actions Active
@gigatier
gigatier deployed to issue-triage October 10, 2026 00:58 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 4bad6d78 Deployed Oct 10, 2026 by dilireba666999 via Identify potential duplicates (all issues) #53902
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.