Stability

July 19, 2026 · View on GitHub

Status: Active
Scope: current-state
Last reviewed: 2026-07-18
Owner: ax-code runtime

How AX Code stays reliable for long interactive sessions and headless runs.

Layers

LayerWhat is hardenedKey modules
TUI lifecycleSuspend/resume, crash terminal restore, session leave memory pruneADR-047; cli/cmd/tui/util/*
Process faultsAbort/cancel/broken-pipe ignored; real crashes still exitutil/harmless-interrupt, TUI crash handler, CLI boot hooks
TimeoutsTool/LSP/MCP bounds without unhandledRejectionutil/timeout.withTimeout
StreamsIdle watchdog, resilient reconnectsession/llm-impl idle watchdog; resilient-stream
PermissionsDouble-submit latch + reply timeoutpermission-submit-latch, permission prompt
Repo wikiPath containment, atomic manifest-last writes, protected content, pre-write validationpackages/ax-wiki; src/wiki/*

Blessed TUI path

The supported runtime stack is:

  • Runtime: Node bundled
  • UI: OpenTUI + Solid
  • Render: Zig (production)
  • The experimental Rust/Ratatui UI was removed; Zig/OpenTUI is the only engine
  • Yoga is not a selectable mode; Zig/OpenTUI remains the default

Cancellations vs crashes

SignalExpected behavior
User abort / Esc / tool cancel (AbortError)Log at warn if unhandled; do not exit TUI
Broken pipe (EPIPE) when shell closesIgnore as harmless
Uncaught application exceptionReset terminal, exit non-zero
Stream idle too longAbort turn via stream idle watchdog (configurable)

Override stream idle timeout with AX_CODE_STREAM_IDLE_TIMEOUT_MS (0 disables).

Permission prompts

Permission replies are:

  1. Latched — only one in-flight reply per request id
  2. Re-armed when the next queued request becomes active
  3. Timed out after 20s so a hung server cannot wedge “Allow” forever
  • Sandbox — execution isolation
  • Autonomous — unattended runs
  • AX Wiki — source-backed semantic layer (not a graph substitute)