fix(codex): allow larger histories over shared WebSockets (#2171)

This commit is contained in:
Jee
2026-10-26 15:14:45 +08:00
committed by GitHub
parent b8675110b1
commit aed99e22cf
4 changed files with 30 additions and 3 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import WebSocket from 'ws';
import { logger } from '@/ui/logger';
import { JsonLineParser } from '@/utils/jsonLineParser';
import { killProcessByChildProcess } from '@/utils/process';
import { CODEX_WEBSOCKET_MAX_PAYLOAD } from './websocketLimits';
import type {
CollaborationModeListResponse,
InitializeParams,
@@ -229,7 +230,7 @@ export class CodexAppServerClient extends JsonLineParser {
const url = endpoint.startsWith('unix://') ? `ws+unix://${endpoint.slice(7)}:/` : endpoint;
const socket = new WebSocket(url, {
headers: { Host: 'localhost', ...(this.options.token ? { Authorization: `Bearer ${this.options.token}` } : {}) },
maxPayload: 64 * 1024 * 1024,
maxPayload: CODEX_WEBSOCKET_MAX_PAYLOAD,
perMessageDeflate: false,
handshakeTimeout: 10_000
});