mirror of
https://github.com/openai/codex.git
synced 2026-04-25 23:24:55 +00:00
chore(app-server): stop emitting codex/event/ notifications (#14392)
## Description This PR stops emitting legacy `codex/event/*` notifications from the public app-server transports. It's been a long time coming! app-server was still producing a raw notification stream from core, alongside the typed app-server notifications and server requests, for compatibility reasons. Now, external clients should no longer be depending on those legacy notifications, so this change removes them from the stdio and websocket contract and updates the surrounding docs, examples, and tests to match. ### Caveat I left the "in-process" version of app-server alone for now, since `codex exec` was recently based on top of app-server via this in-process form here: https://github.com/openai/codex/pull/14005 Seems like `codex exec` still consumes some legacy notifications internally, so this branch only removes `codex/event/*` from app-server over stdio and websockets. ## Follow-up Once `codex exec` is fully migrated off `codex/event/*` notifications, we'll be able to stop emitting them entirely entirely instead of just filtering it at the external transport boundary.
This commit is contained in:
@@ -594,7 +594,7 @@ impl McpProcess {
|
||||
/// Deterministically clean up an intentionally in-flight turn.
|
||||
///
|
||||
/// Some tests assert behavior while a turn is still running. Returning from those tests
|
||||
/// without an explicit interrupt + `codex/event/turn_aborted` wait can leave in-flight work
|
||||
/// without an explicit interrupt + terminal turn notification wait can leave in-flight work
|
||||
/// racing teardown and intermittently show up as `LEAK` in nextest.
|
||||
///
|
||||
/// In rare races, the turn can also fail or complete on its own after we send
|
||||
@@ -631,18 +631,19 @@ impl McpProcess {
|
||||
}
|
||||
match tokio::time::timeout(
|
||||
read_timeout,
|
||||
self.read_stream_until_notification_message("codex/event/turn_aborted"),
|
||||
self.read_stream_until_notification_message("turn/completed"),
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(result) => {
|
||||
result.with_context(|| "failed while waiting for turn aborted notification")?;
|
||||
result.with_context(|| "failed while waiting for terminal turn notification")?;
|
||||
}
|
||||
Err(err) => {
|
||||
if self.pending_turn_completed_notification(&thread_id, &turn_id) {
|
||||
return Ok(());
|
||||
}
|
||||
return Err(err).with_context(|| "timed out waiting for turn aborted notification");
|
||||
return Err(err)
|
||||
.with_context(|| "timed out waiting for terminal turn notification");
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user