mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why MCP hook results were flattened to text, so `SessionStart` hooks could not pass encrypted context to the model as encrypted tool output. ## What changed Recognize text blocks marked with `codex/encryptedContent` in synchronous MCP `SessionStart` hooks. Send them to the model as standalone `function_call_output` items with the originating tool name and namespace. Keep ciphertext out of hook previews and plaintext spill files. Reject empty encrypted blocks and cap the serialized encrypted output at 40,000 bytes per hook run. ## Testing Add a scenario that checks that ciphertext above the plaintext spill threshold reaches the first model request unchanged, appears once after a cold resume, and stays out of hook previews and spill files. Cover discarding encrypted context when hook output fails JSON parsing under both failure policies. GitOrigin-RevId: cbc11c6f7055cc131212c6e9ddd37a882ed61d38