Skip to content

[codex] Remove unused event messages#20511

Merged
pakrym-oai merged 3 commits into
mainfrom
pakrym/remove-unused-eventmsgs
May 1, 2026
Merged

[codex] Remove unused event messages#20511
pakrym-oai merged 3 commits into
mainfrom
pakrym/remove-unused-eventmsgs

Conversation

@pakrym-oai

@pakrym-oai pakrym-oai commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Why

Several legacy EventMsg variants were still emitted or mapped even though clients either ignored them or had moved to item/lifecycle events. Op::Undo had also degraded to an unavailable shim, so this removes that dead task path instead of preserving a command that cannot do useful work.

McpStartupComplete, WebSearchBegin, and ImageGenerationBegin are intentionally kept because useful consumers still depend on them: MCP startup completion drives readiness behavior, and the begin events let app-server/core consumers surface in-progress web-search and image-generation items before the final payload arrives.

What Changed

  • Removed weak legacy event variants and payloads from codex-protocol, including legacy agent deltas, background events, and undo lifecycle events.
  • Kept/restored EventMsg::McpStartupComplete, EventMsg::WebSearchBegin, and EventMsg::ImageGenerationBegin with serializer and emission coverage.
  • Updated core, rollout, MCP server, app-server thread history, review/delegate filtering, and tests to rely on the useful replacement events that remain.
  • Removed Op::Undo, UndoTask, the undo test module, and stale TUI slash-command comments.
  • Stopped agent job/background progress and compaction retry notices from emitting BackgroundEvent payloads.

Verification

  • cargo check -p codex-protocol -p codex-app-server-protocol -p codex-core -p codex-rollout -p codex-rollout-trace -p codex-mcp-server
  • cargo test -p codex-protocol -p codex-app-server-protocol -p codex-rollout -p codex-rollout-trace -p codex-mcp-server
  • cargo test -p codex-core --test all suite::items
  • just fix -p codex-protocol -p codex-app-server-protocol -p codex-core -p codex-rollout -p codex-rollout-trace -p codex-mcp-server
  • Earlier coverage on this PR also included codex-mcp, codex-tui, core library tests, MCP/plugin/delegate/review/agent job tests, and MCP startup TUI tests.

@pakrym-oai pakrym-oai marked this pull request as ready for review April 30, 2026 22:37
@pakrym-oai pakrym-oai requested a review from a team as a code owner April 30, 2026 22:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1b73a2205

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/app-server-protocol/src/protocol/thread_history.rs
@pakrym-oai pakrym-oai merged commit f50c02d into main May 1, 2026
25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/remove-unused-eventmsgs branch May 1, 2026 03:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
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.

2 participants