Skip to content

Session traces lost after crash — no crash handlers flush traces to disk #593

@anandgupta42

Description

@anandgupta42

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:

Expected Behavior

Trace files should be persisted to ~/.local/share/altimate-code/traces/ with status: "crashed" when the process exits unexpectedly.

Reported in

#588

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions