Plans

Plan 0013

The kernel job contract

One typed lifecycle for kernel work: spawn, observe, cancel, reap, with one result surface. Sixty-plus issues about lost output, orphaned processes, wedged sessions, and inconsistent result types collapse into one contract the Elixir kernel enforces.

Status
Sketch
Ambition
5 the Elixir cutover built the foundation; this finishes the contract
Impact
8 every agent session on every machine touches the kernel job surface
Effort
6 one lifecycle and one result type across spawn, observe, cancel, reap
Risk
4 supervised BEAM processes already isolate the blast radius
Maturity
3 jobs exist and are supervised; the uniform contract does not
Leverage
8 every tool built on the kernel inherits the contract for free
Taste
5 the API shape is a judgment call; the plumbing is mechanical
Authors
andrewgazelka
Created
Updated
Tracking issue
-
Supersedes
-
Superseded by
-

Summary

The largest issue cluster in the repo is kernel work falling between the cracks of an implicit contract: job output that never reaches the caller, processes that outlive their jobs, sessions wedged by a blocking call, result surfaces that differ between call sites. The Elixir cutover (supervised per-cell processes) fixed the substrate. This plan finishes the job: one lifecycle every kernel operation follows, one result type every caller reads, and no way to spawn work outside it.

spawnsupervised, ownedobservetail, await, tracecancelwhole tree, no orphansreapexit + output, one type

Non-goals

New job kinds or scheduling policy; this is the contract for what already exists.

Absorbed issues

#3481, #3430, #3172, #3148, #3140, #3124, #3123, #3113, #3098, #3065, #3001, #2769, #2888, #2848, #2841, #2809, #2833, #2785, #2739, #2737, #2741, #2517, #2370, #2756, #2335, #2357, #2441, #2716, #2740, #2324, #2536, #2700, #2727, #2520, #2361, #2462, #2365, #2438, #2428, #2466, #2399, #2477, #2524, #2545, #2469, #2491, #2465, #2495, #2527, #2572, #2723, #2725, #2755, #2845, #2887, #2801, #2975, #2842, #2630, #2622, #2696, #2537, #2695, #2117, #1945, #1400

Drafted by Claude Code (Fable) from the open-issue corpus; scores are seed estimates.

© 2026 Indexable, Inc.