WIP: A simple cli for daily tangled use cases and AI integration. This is for my personal use right now, but happy if others get mileage fro

Fix #17: detect locked keychain and preserve credentials on access failure #34

Merged markbennett.ca
targeting main from fix/keychain-locked-detection
Merged opened by and assigned to markbennett.ca
targeting main from fix/keychain-locked-detection
  • Export KeychainAccessError from session.ts; thrown when getPassword() fails (platform error like locked keychain), not when an entry is missing (undefined)
  • resumeSession() now rethrows KeychainAccessError without clearing metadata, so temporarily locked keychains no longer wipe stored credentials
  • Add ensureAuthenticated(client) to auth-helpers.ts: on KeychainAccessError, attempts to unlock the keychain via security unlock-keychain (macOS only), retries once, then falls back to a clear error message with manual instructions
  • Replace 7 repeated inline auth-check blocks in issue.ts with ensureAuthenticated()
  • Add/update tests for KeychainAccessError propagation and ensureAuthenticated behavior

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Commits 5

Update pipeline cloning
Formatting
chore: allow git fetch in Claude permissions
Move session metadata from keychain to plain file to prevent credential loss
Fix #17: detect locked keychain and preserve credentials on access failure