Repository navigation
Conversation
nwparker
force-pushed
the
oom/15-b-browser-emulator
branch
from
July 24, 2026 07:48
1f56455 to
11dc81e
Compare
nwparker
force-pushed
the
oom/15-b-browser-emulator
branch
from
July 25, 2026 02:21
11dc81e to
d67f955
Compare
nwparker
force-pushed
the
oom/15-b-browser-emulator
branch
from
July 25, 2026 02:40
d67f955 to
cafefaf
Compare
nwparker
force-pushed
the
oom/15-b-browser-emulator
branch
from
July 25, 2026 03:11
cafefaf to
16e0218
Compare
Files: 65 applied, 0 deleted (from 6eb70d8) Co-authored-by: Orca <help@stably.ai>
nwparker
force-pushed
the
oom/15-b-browser-emulator
branch
from
July 25, 2026 03:34
16e0218 to
01bade0
Compare
Contributor
Author
|
Superseded by #10548, which re-scopes this work to the bound-at-ingress doctrine (see #10533 and An audit found the original #10179 scope was ~50x the size of the fix for the crash it targeted, and that bounds had landed ahead of their callers. Every file in these slices was re-adjudicated individually: ingress bounds (transport frames, PTY flow control, on-disk transcripts, parsing, enumeration, media decode, user-keyed accumulators) were kept; interior ceilings behind an already-bounded input were dropped. 1,882 files → 1,155, full suite green, and no No memory protection was lost — only speculation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OOM hardening slice 16/29 — bound Codex session/transport/account memory
Summary
This slice re-introduces explicit count/byte/depth/LRU ceilings across Codex and OpenCode account-management, migration, session-listing, capability-cache, and usage-scan code, plus a 4 MiB per-file read cap (readAgentStateFileSync / node-bounded-file-reader) on agent state files. All bounds are whole-file with dedicated boundary tests; every over-limit path fails closed or LRU-evicts.
ELI5
Orca reads and imports a lot of files that Codex/OpenCode write on disk (login tokens, session logs, config, usage history). Before, some of that reading had no size limit, so a giant or corrupt file could balloon memory and crash the app. This change puts a fixed "you can only hold this much" cap on each of those spots. In everyday use nobody hits the caps. If something is absurdly large (a 4 MB auth file, 200k session files, 100k history threads), Orca now skips or trims that piece instead of trying to swallow it all — occasionally meaning one feature (like usage analytics or OpenCode status integration) quietly steps aside until the oversized data is gone.
Proof of OOM fix
Regressions
Normal-path (ordinary use, below the new limits): none — behavior is unchanged below the ceilings.
Overload-only (extreme input / sustained backpressure) — intended, documented degradations:
Build / CI
Adversarial review
Confirmed ceilings:
Refuting/qualifying the prior reviewer:
Residual risk (medium, NOT ordinary-path): the cumulative per-scan usage budget makes a heavy multi-year Codex user (~100k+ lifetime token_count records) permanently lose the usage panel (sticky scan_failed) where base degraded gracefully. This is above ordinary use but worth a human sign-off note, and the actual defaults live in a dependency slice (usage-history-scan-budget.ts) so they must land together.
Files
65 files changed (+4362 / −865).
🤖 Decomposed, reviewed & assembled by Claude Code from the reverted #10179. Draft — do not merge out of order.
Made with Orca 🐋