Skip to content

Skip the local existence check for a remote project's tied root - #266

Open
shenghsi wants to merge 1 commit into
mainfrom
fix/remote-project-tie-existence-check
Open

Skip the local existence check for a remote project's tied root#266
shenghsi wants to merge 1 commit into
mainfrom
fix/remote-project-tie-existence-check

Conversation

@shenghsi

@shenghsi shenghsi commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • historical_thread_belongs_to_panel (landed in v0.11.3, PR Fix two ways a historical Agent Thread session can go missing #264) started requiring a tie override's target directory to exist before trusting it, so a session tied to a worktree later deleted falls back to its natural root instead of disappearing from every panel.
  • Path::exists only ever inspects the calling process's own filesystem. For a remote (SSH) project, the tied root is a path on the remote host, not this machine, so the check always reported a perfectly valid remote tie as "gone" -- silently discarding every retie for remote-project users, a regression v0.11.3 shipped.
  • The check is now skipped for remote projects, restoring the pre-v0.11.3 (unconditional-trust) behavior there. Local projects keep the new existence check.

Test plan

  • cargo test -p agent_threads --lib (295 passed)
  • Added historical_thread_belongs_to_panel_trusts_a_remote_tie_it_cannot_locally_stat, which reties a thread to a path that cannot exist locally and asserts a remote-project lookup still trusts it
  • ./script/clippy -p agent_threads
  • cargo fmt --all -- --check

Release Notes:

  • Fixed a regression where a retied Agent Thread session in a remote (SSH) project could stop appearing in its History panel

historical_thread_belongs_to_panel (landed in v0.11.3) started
requiring a tie override's target directory to exist before trusting
it, so a session tied to a worktree that was later deleted falls back
to its natural root instead of disappearing. Path::exists only ever
inspects this process's own filesystem, though, and for a remote
project the tied root lives on the remote host -- so the check always
reported a perfectly valid remote tie as "gone", silently breaking
every retie for remote-project users. Skip the check for remote
projects, restoring the pre-v0.11.3 behavior there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1w3ZFFG8tjN3aRWALbxm8
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