- PR #8004 dispose() now releases the session manager in-memory transcript;
snapcompact-budget rebuilt a session over the closed manager and the exit
diagnostics read released entries.
- Snapcompact reopens the persisted file for its replacement session; exit
diagnostics move to disk-backed managers and assert the exit marker from a
reopened manager, proving actual durability.
Close pending tool turns recorded during normal shutdown and apply interrupted-tail recovery when switching or reloading sessions.
Signed-off-by: Christian Stewart <christian@aperture.us>
Skip interrupted-turn recovery when an error or aborted assistant already closed its tool calls with synthetic results.
Signed-off-by: Christian Stewart <christian@aperture.us>
Detect pending tool calls from assistant content and use the selected model metadata to terminate first-turn user tails after abnormal process exits.
Signed-off-by: Christian Stewart <christian@aperture.us>
Appended one terminal aborted assistant record when a persisted abnormal-exit diagnostic follows a non-terminal transcript tail, preserving partial history while making resumed context valid.
Signed-off-by: Christian Stewart <christian@aperture.us>
- Thread the postmortem reason through the session teardown pipeline to the session dispose process.
- Prevent generic "dispose" logs from overwriting real triggers like SIGTERM, SIGHUP, or uncaught exceptions.
- Ensure the first teardown trigger's reason is preserved when concurrent disposal calls occur.
- Add comprehensive test coverage verifying signal-specific reason mapping inside exit diagnostics.
- Fix a minor unhandled-exception test utility expectation in input controller tests.
Collected assistant tool calls regardless of stopReason so malformed or legacy restored tails still surface pending-tool diagnostics.
Added regression coverage for a toolCall-bearing assistant stop message.
Fixes#2606
Recorded durable tool-start and session-exit markers so resumes can warn when a prior branch ended with pending tool calls.
Added regression coverage for pending bash tool calls and shutdown diagnostics.
Fixes#2606