Skip to content

fix: use the parent session's current agent for exit notifications#52

Open
sjawhar wants to merge 1 commit into
shekohex:mainfrom
sjawhar:fix-notification-current-agent
Open

fix: use the parent session's current agent for exit notifications#52
sjawhar wants to merge 1 commit into
shekohex:mainfrom
sjawhar:fix-notification-current-agent

Conversation

@sjawhar

@sjawhar sjawhar commented Jul 24, 2026

Copy link
Copy Markdown

#50 made exit notifications preserve the parent session's model, but they still pass the agent that was captured at spawn time. If the user switches agents while the PTY is running, the exit notification switches the session back.

This reuses the session.get call added in #50: prefer the parent session's current agent, and fall back to the spawn-time parentAgent when the server doesn't expose one (same graceful degradation as the model lookup).

Added tests for both cases; the existing notification tests pass unchanged.

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.

1 participant