Repository navigation
Conversation
nwparker
force-pushed
the
oom/17-b-native-chat-speech
branch
from
July 24, 2026 07:48
814e0ac to
a84c732
Compare
nwparker
force-pushed
the
oom/18-b-agent-hooks-automations
branch
from
July 24, 2026 07:48
c34b6da to
fc15b24
Compare
nwparker
force-pushed
the
oom/17-b-native-chat-speech
branch
from
July 25, 2026 02:21
a84c732 to
8b66f08
Compare
nwparker
force-pushed
the
oom/18-b-agent-hooks-automations
branch
from
July 25, 2026 02:21
fc15b24 to
3bb8160
Compare
nwparker
force-pushed
the
oom/17-b-native-chat-speech
branch
from
July 25, 2026 02:40
8b66f08 to
704235f
Compare
nwparker
force-pushed
the
oom/18-b-agent-hooks-automations
branch
from
July 25, 2026 02:40
3bb8160 to
e0b2660
Compare
nwparker
force-pushed
the
oom/17-b-native-chat-speech
branch
from
July 25, 2026 03:11
704235f to
5c1dffb
Compare
nwparker
force-pushed
the
oom/18-b-agent-hooks-automations
branch
from
July 25, 2026 03:11
e0b2660 to
6764f21
Compare
Files: 60 applied, 0 deleted (from 6eb70d8) Co-authored-by: Orca <help@stably.ai>
nwparker
force-pushed
the
oom/17-b-native-chat-speech
branch
from
July 25, 2026 03:34
5c1dffb to
375ef05
Compare
nwparker
force-pushed
the
oom/18-b-agent-hooks-automations
branch
from
July 25, 2026 03:34
6764f21 to
67854b5
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 18/29 — bound agent hooks & automations state
Summary
Slice #18 re-introduces OOM ceilings across agent-hooks, automations, and skills: bounded file reads (config/script/plugin/bundle/status), streaming directory/lock cleanup, retained-metadata byte caps on the agent-hook status server, bounded skill-discovery traversal, and concurrency caps on remote fan-outs. Almost all changes are overload-only fail-closed guards; a few introduce user-visible ceilings (skill discovery now throws on overload; Hermes run pages clamp to 100; WSL skill-scan buffer shrinks 128MiB→8MiB).
ELI5
Imagine the app used to read whole files and folders no matter how huge, and kept lists that could grow forever until it ran out of memory and crashed. This change adds size limits everywhere: "don't read a file bigger than X", "don't keep more than N items", "don't do more than 4 of these at once". If something is absurdly big it's skipped or an error is shown instead of crashing. For normal users nothing changes; only people with truly gigantic files or thousands of items hit the new walls.
Proof of OOM fix
Regressions
Normal-path (ordinary use, below the new limits):⚠️ needs sign-off:
Overload-only (extreme input / sustained backpressure) — intended, documented degradations:
Build / CI
Adversarial review
REFUTED the one claim that looked like a user-visible regression: Hermes run pages clamping to 100 (safePageSize=min(HERMES_RUN_PAGE_MAX_RUNS=100,...) at hermes-cron-output.ts:687). The caller external-manager.ts:330 ALREADY clamps pageSize to Math.min(100, ...) in BASE (pre-existing), so the internal cap is pure defense-in-depth and no UI/API path ever requested >100. Not a regression.
Confirmed all other ceilings are far above ordinary use:
serializeStatusFile manual serializer (server.ts:2106) is the highest-risk change: builds JSON by hand, iterates entries in reverse to keep newest within the 16MiB budget, then fragments.reverse() to restore order. Separator/prefix byte accounting is consistent with the final ','-join; keys re-quoted via JSON.stringify; values via stringifyJsonWithinByteLimit. Covered by server-status-cache-bound.test.ts. No ordering/correctness defect found; 16MiB is unreachable in normal use (handful of small entries). Byte estimator uses length*2 (over-counts UTF-8 for ASCII) so the 4MiB skill budget trips conservatively early — still far above normal.
dispatch-tokens identityDigest(sha256) rewrite is functionally equivalent for match/reserve/release/clear. first-work-branch-rename sha256 dedupe with in-flight cap 32 correctly retries dropped attempts (no worktree poisoning). No normal-path regression and no correctness bug confirmed. Safe to open as a draft PR for human review; the two low items are behavior-change acknowledgements, not bugs.
Files
60 files changed (+3225 / −472).
🤖 Decomposed, reviewed & assembled by Claude Code from the reverted #10179. Draft — do not merge out of order.
Made with Orca 🐋