Skip to content

Commit f026d81

Browse files
authored
fix(tui): resume sessions with stale locks (#52)
1 parent 4c3b9ae commit f026d81

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kit"
3-
version = "0.1.107"
3+
version = "0.1.108"
44
edition = "2024"
55
rust-version = "1.94.0"
66
publish = false

src/tui/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,13 @@ pub async fn run_with_reasoning_effort_and_openrouter_key(
693693
app.note(format!("session {requested_id} is already active"));
694694
continue;
695695
};
696-
if let Err(error) = crate::session::load(&root, &requested_id) {
696+
// Session switching has no `--force` flag. Reclaim only a
697+
// lock that the OS proves no live Kit process still holds.
698+
if let Err(error) = crate::session::load(&root, &requested_id)
699+
.and_then(|_| {
700+
crate::session::remove_stale_lock(&root, &requested_id)
701+
})
702+
{
697703
app.note(format!("could not resume session: {error}"));
698704
continue;
699705
}

0 commit comments

Comments
 (0)