fix(coding-agent): close codex websocket sessions

Fixes #4103
This commit is contained in:
Armin Ronacher
2026-05-03 23:25:56 +02:00
committed by Mario Zechner
parent ce377fc4a1
commit 78c3cbe0c3
2 changed files with 6 additions and 0 deletions

View File

@@ -14,6 +14,10 @@
- Changed `read` tool rendering to collapse Pi documentation, AGENTS/CLAUDE context files, and `SKILL.md` contents by default in interactive output.
### Fixed
- Fixed OpenAI Codex WebSocket transport keeping `--print` and JSON mode processes alive after the response by closing cached WebSocket sessions during session shutdown ([#4103](https://github.com/badlogic/pi-mono/issues/4103)).
## [0.72.1] - 2026-05-02
## [0.72.0] - 2026-05-01

View File

@@ -31,6 +31,7 @@ import {
modelsAreEqual,
resetApiProviders,
} from "@mariozechner/pi-ai";
import { closeOpenAICodexWebSocketSessions } from "@mariozechner/pi-ai/openai-codex-responses";
import { theme } from "../modes/interactive/theme/theme.js";
import { stripFrontmatter } from "../utils/frontmatter.js";
import { sleep } from "../utils/sleep.js";
@@ -752,6 +753,7 @@ export class AgentSession {
);
this._disconnectFromAgent();
this._eventListeners = [];
closeOpenAICodexWebSocketSessions(this.sessionId);
}
// =========================================================================