-
Notifications
You must be signed in to change notification settings - Fork 39
Session traces lost after crash — no crash handlers flush traces to disk #593
Copy link
Copy link
Open
Description
Problem
When altimate-code crashes (TUI mode), session traces are lost. Users starting a new session cannot find logs from the previous crash.
Root cause: The TUI worker holds all trace data in memory. Bun Workers don't receive OS signals (SIGINT/SIGTERM/SIGHUP), so the worker dies silently when the main thread exits — no crash handlers flush traces to disk.
Upstream context: sst/opencode has 60+ open crash-related issues including:
- Sessions permanently stuck after server restart or stream interruption — no startup recovery for orphaned messages/tool parts anomalyco/opencode#19023 — Sessions permanently stuck after crash (no startup recovery)
- Session not saved to current project when opencode process terminates unexpectedly. anomalyco/opencode#14291 — Session not saved on unexpected termination
- [BUG] Opencode process survives terminal close — missing SIGHUP handler causes orphaned process accumulation anomalyco/opencode#12767 — Missing SIGHUP handler causes orphaned processes
Expected Behavior
Trace files should be persisted to ~/.local/share/altimate-code/traces/ with status: "crashed" when the process exits unexpectedly.
Reported in
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels