Skip to content

fix: Preserve session state on idle-kill instead of destroying it#1459

Merged
charlesvien merged 1 commit intomainfrom
04-02-session_idle_kill_preserves_state
Apr 2, 2026
Merged

fix: Preserve session state on idle-kill instead of destroying it#1459
charlesvien merged 1 commit intomainfrom
04-02-session_idle_kill_preserves_state

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 2, 2026

Problem

Idle killed sessions had their state fully torn down, preventing users from retrying with context intact.

Changes

  1. Add handleIdleKill that marks sessions as errored without clearing events, logUrl or adapter
  2. Guard idle kill against sessions with in-flight MCP tool calls
  3. Include inFlightMcpToolCalls in hasActiveSessions check to prevent premature app quit
  4. Add tests for idle kill behavior with non-empty and empty MCP tool call maps

How did you test this?

Manually

@charlesvien charlesvien changed the title Preserve session state on idle-kill instead of destroying it fix: Preserve session state on idle-kill instead of destroying it Apr 2, 2026
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 2, 2026

@charlesvien charlesvien marked this pull request as ready for review April 2, 2026 16:55
@charlesvien charlesvien merged commit 882f4de into main Apr 2, 2026
25 checks passed
@charlesvien charlesvien deleted the 04-02-session_idle_kill_preserves_state branch April 2, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants