Skip to content

Commit 31c54af

Browse files
committed
fix: kill stale tmux session on resume instead of reusing it
Always create a fresh tmux session when resuming a Claude session, matching the behavior of launch which already kills stale sessions.
1 parent 716435b commit 31c54af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/KanbanCodeCore/UseCases/LaunchSession.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public final class LaunchSession: SessionLauncher, @unchecked Sendable {
7171
skipPermissions: Bool = false,
7272
preamble: String? = nil
7373
) async throws -> String {
74-
// Check if there's already a tmux session for this
74+
// Kill stale tmux session if one exists — we always want a fresh resume
7575
let existing = try await tmux.listSessions()
7676
if let match = existing.first(where: { $0.name.contains(String(sessionId.prefix(8))) }) {
77-
return match.name
77+
try? await tmux.killSession(name: match.name)
7878
}
7979

8080
// Create new tmux session with resume command

0 commit comments

Comments
 (0)