Prevent false "conversation not found" notification on no-op startPty calls #3

Open
opened 2026-09-02 02:35:45 -04:00 by toph · 0 comments
Owner

Location

src/lib/features/sessions/terminal/TerminalSessionManager.ts, src/lib/features/sessions/service.svelte.ts

Problem

TerminalSessionManager.startPty() returns { resumed: false } for no-op cases (e.g. if the session is already active or a single-flight start is in progress). When startSessionProcess() receives !info.resumed on a tab that had a resumeToken, it assumes resume failed and triggers a spurious "Previous conversation not found" notification.

Suggested Fix

Refactor startPty() return status to differentiate between genuine fresh process spawns, successful resumes, and no-op / already-running invocations.

### Location `src/lib/features/sessions/terminal/TerminalSessionManager.ts`, `src/lib/features/sessions/service.svelte.ts` ### Problem `TerminalSessionManager.startPty()` returns `{ resumed: false }` for no-op cases (e.g. if the session is already active or a single-flight start is in progress). When `startSessionProcess()` receives `!info.resumed` on a tab that had a `resumeToken`, it assumes resume failed and triggers a spurious "Previous conversation not found" notification. ### Suggested Fix Refactor `startPty()` return status to differentiate between genuine fresh process spawns, successful resumes, and no-op / already-running invocations.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/Sworm#3
No description provided.