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
Authentication and skill subprocess output can grow without bounds #130
CodexLoginHandle appends every chunk to #stdout or #stderr. Each chunk then calls #notifyInstructions, whose getters parse the complete accumulated output again. This combines unbounded storage with roughly quadratic parsing work as output grows.
runCodex also retains complete stdout and stderr. readSkillCommandOutput has no maximum JSONL line length and retains an unrestricted final agent message or error message.
Why this matters
A malfunctioning, compromised, or unexpectedly verbose child process can exhaust the SDK/CLI process's memory. Interactive login output can additionally cause excessive CPU use because earlier output is repeatedly reparsed. A single unterminated or very large JSON event from a skill command has the same memory risk.
Expected behavior
Subprocess output used for diagnostics or instruction discovery should have explicit byte limits. Oversized structured output should fail with a controlled, redacted error.
Suggested direction
Parse login instructions incrementally and keep only a bounded diagnostic tail.
Add separate stdout/stderr ceilings to runCodex.
Bound JSONL line size and retained final-message size in readSkillCommandOutput.
Preserve current credential redaction when reporting truncation or overflow.
Add tests for oversized stdout, stderr, JSONL lines, and final responses.
Existing tests cover malformed and normal-sized output but not these resource boundaries.
Found by static audit of upstream main at 9c7634b.
Authentication and skill subprocess output now has enforced size limits. I verified the oversized-output regressions for interactive authentication, noninteractive authentication, and skill events on the current main. Thank you for the report.
Activity
mldangelo-oai commentedon Aug 3, 2026
Fixed in #152.
Authentication and skill subprocess output now has enforced size limits. I verified the oversized-output regressions for interactive authentication, noninteractive authentication, and skill events on the current main. Thank you for the report.