Catchable Alarms (deferred) GitHub issue

vibecode
{"vibecode": {
    "doc": "catchable-alarms",
    "role": "deferred alternative design where alarms can be caught at role boundaries via boundary catchers, rather than the current always-fatal alarm model; recorded for possible revisit",
    "key_concepts": ["alarms_at_role_boundaries", "boundary_catcher", "alarm_to_exception_demotion",
        "considered_and_dropped"],
    "status": "deferred"
}}

Status: considered and dropped from current production. Recorded here in case it's worth revisiting later.

The current role-model spec (see roles.md) treats alarms as always fatal: they go directly to the engine with no unwinding, no finally blocks, no catch handlers from Caspian code. The engine terminates the process or handles it however it sees fit.

This document describes an alternative design that was sketched during the brainstorm — one where alarms can be caught at role boundaries — and explains why it was set aside.


The Alternative Design GitHub issue

The idea: alarms travel up the call stack past ordinary catch handlers, but can be intercepted at role boundaries via a specially-installed catcher.

Mechanism GitHub issue

The effect: an alarm from inside a different-role function trampolines past that function's own catch blocks and lands in the caller's boundary catcher. The caller (the boundary owner) sees a regular exception in their own scope and can handle it.

Use Cases This Would Enable GitHub issue


Why It Was Dropped (For Now) GitHub issue

The use cases are real but narrow. Most of what they accomplish can be done with regular exceptions:

The cost of the elaborate design:

For the current pass, simpler wins: alarms are fatal, regular exceptions are the only catchable thing, two categories with clean semantics.


When to Revisit GitHub issue

If revisited, the natural home for the implementation is %chain — the role boundary already maps onto a %chain frame, and chain-scoped values are how the runtime already handles boundary-respecting state.

© 2026 Puck.uno