You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A session event larger than 1 MiB aborts the scan, even after the scan work succeeded #291
ScanCostTracker throws when a single JSONL event in a Codex session rollout file exceeds 1 MiB. The throw propagates out of the cost tracker and aborts the entire scan — in my case after a deep scan had already completed its full discovery workflow, which meant hours of completed scan work never produced sealed artifacts.
Environment
@openai/codex-security 0.1.6 (verified still present in 0.1.7, tag npm-v0.1.7)
Linux x86_64, Docker (locally built image), Node 22
Deep scan of a large repository
Root cause
readSessionChunk in sdk/typescript/src/cost.ts:
constlineBytes=session.pendingLineBytes+fragment.length;if(lineBytes>MAX_SESSION_EVENT_BYTES){thrownewError("Codex session event exceeds the 1 MiB safety limit.");}
The throw propagates through readSessionUsage → #readSessions, which rethrows for any session included in the scanned thread tree. A legitimate large event (mine was ~1.1 MB, e.g. a big tool output in the rollout) therefore kills the scan at any point — including after the deep workflow has finished but before the CLI writes the canonical draft artifacts.
The cost tracker is telemetry for progress/cost display. Aborting a completed multi-hour scan over an unparseable-for-telemetry event is a disproportionate failure mode.
Suggested fix
Skip (or quarantine) oversized events instead of throwing: discard the pending line, resume at the next newline, and count the skip. In practice the oversized lines are large tool outputs, not token_count events, so cost accounting is unaffected. This complements the quarantine approach discussed in #223/#224.
I have a minimal local patch along these lines (skip + discard flag for lines spanning read chunks) and can contribute it if useful.
Against that released source, the focused reads session events larger than 16 MiB|handles a session-tracking failure cost/API test selection passed: 3 passed, 132 filtered, 0 failed.
pnpm run types also passed.
I did not repeat a paid scan: the released source-level regression directly covers the event-size trigger, and the supporting cases cover non-fatal optional tracking failures.
Would maintainers consider #291 ready to close? Broader unreadable-session quarantine and bounded telemetry work appears to belong with #224/#278 rather than this now-removed size abort.
Thanks for reporting this. #331 removed the 1 MiB session-event limit, and the current regression test accepts events larger than 16 MiB. The fix shipped in 0.1.10.
Activity
createsomethingtoday commentedon Aug 12, 2026
Release verification: the reported oversized-session-event abort is fixed in
@openai/[email protected].npm-v0.1.10resolves tobf0184d05c7dce5ce86bbb91adc47ecd776b656cand includes PR fix: remove session event limits and keep scans running #331 (cd23a23f25644728145301a56b97de11e8d732ed).reads session events larger than 16 MiB|handles a session-tracking failurecost/API test selection passed: 3 passed, 132 filtered, 0 failed.pnpm run typesalso passed.I did not repeat a paid scan: the released source-level regression directly covers the event-size trigger, and the supporting cases cover non-fatal optional tracking failures.
Would maintainers consider #291 ready to close? Broader unreadable-session quarantine and bounded telemetry work appears to belong with #224/#278 rather than this now-removed size abort.
mldangelo-oai commentedon Aug 15, 2026
Thanks for reporting this. #331 removed the 1 MiB session-event limit, and the current regression test accepts events larger than 16 MiB. The fix shipped in 0.1.10.