For AI agents: the complete documentation index is available at /tc39-atlas/en/llms.txt, the full documentation bundle is available at /tc39-atlas/en/llms-full.txt, and this page is available as Markdown at /tc39-atlas/en/proposals/year/pending/proposal-oom-fails-fast.md.
  • English
  • OOM Fails Fast S1

    Proposal details
    Proposal overview

    This proposal introduces a host hook and a built-in method to handle fatal faults. The HostFaultHandler hook allows hosts to react to internal fault conditions, potentially terminating the current unit of computation. The Reflect.panic method lets JavaScript code explicitly trigger this hook.

    Note

    The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.

    Don't Remember Panicking

    A TC39 proposal for both

    • A HostFaultHandler hook for optionally immediately terminating the enclosing unit of computation.
    • A builtin panic method for explicitly invoking HostFaultHandler

    Status

    The TC39 Process

    Achieved Stage 1 as OOM Must Fail-Fast

    Co-Champions

    • Mark S. Miller, Agoric (@erights)
    • Peter Hoddie, Moddable (@phoddie)
    • Zbyszek Tenerowicz (@naugtur)
    • Christopher Hiller (@boneskull)

    Presentations

    What

    • A new Host Hook
    HostFaultHandler(faultType, arg = undefined)

    to be invoked for various from various internal fault conditions, so the host can react according to the host's policy. Including sudden termination of "Minimal Abortable Unit of Computation", such as an Agent cluster.

    • A new built-in
    Reflect.panic(arg = undefined)

    so JavaScript code can directly fault to HostFaultHandler.

    See @endo/panic for an imperfect ponyfill of the panic function from this proposal.

    Why

    See OOM Must Fail-Fast for the original motivation and rationale, most of which is still interesting and valid.

    See "Don't Remember Panicking" Stage 1 Update (keynote slides, pdf slides) for the expanded motivation and rationale

    Acknowledgements

    Thanks to Felipe Natal for bring our attention to a problem that

    • revived our interest in this old "OOM Must Fail Fast" proposal.
    • needed the addition of a user panic operation to solve.