Skip to content

fix(lpend): prefer fresh claude session path when registry is stale#96

Merged
bfly123 merged 1 commit intobfly123:mainfrom
bookandlover:fix/lpend-session-path-conflict
Feb 23, 2026
Merged

fix(lpend): prefer fresh claude session path when registry is stale#96
bfly123 merged 1 commit intobfly123:mainfrom
bookandlover:fix/lpend-session-path-conflict

Conversation

@bookandlover
Copy link
Copy Markdown

Summary

Fixes stale lpend/pend claude reads when registry and .claude-session disagree on claude_session_path.

Fixes #95

Root cause

bin/lpend previously selected:

  • log_path = registry_log_path or session_log_path

So any non-empty registry path always won, even if stale.

Changes

  • Add conflict-aware path selection:
    • If registry/session paths are both present and differ, compare mtime and prefer newer path.
    • Keep existing fallback behavior when only one path exists.
  • Add self-healing sync:
    • When selecting .claude-session path, update registry providers.claude.claude_session_path via upsert_registry.
  • Keep behavior transparent with debug logs (LPEND_DEBUG / CCB_DEBUG).

Validation

  • python3 -m py_compile bin/lpend
  • Manual conflict scenario validation (stale registry path + newer .claude-session path):
    • lpend now selects the newer session path.
    • Registry is auto-updated to the selected fresh path.

@bfly123 bfly123 merged commit 00cbcbe into bfly123:main Feb 23, 2026
bfly123 added a commit that referenced this pull request Feb 24, 2026
Covers merged PRs #87, #91, #92, #96, #97: Gemini CLI 0.29.0
dual-hash support, OpenCode async deadlock fix, mail setup v3
compat, lpend stale-registry fallback, and autostart routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

lpend may read stale registry claude_session_path instead of current .claude-session

2 participants