Repository navigation
Expire idle Touch ID sessions and add a caller hint to the prompt - #1333
theoephraim wants to merge 1 commit into
Conversation
keychain() reads only checked that a cached LAContext existed, so an approval lasted until lock, sleep, or daemon exit. The daemon now tracks when each session was last used and drops it after 5 minutes of inactivity. Each gated use extends the session. sessionWarm now reflects this expiry. The prompt reason now names the project folder and the AI agent (Claude Code, Codex) when detected from the caller's environment. These are hints only, since a same-user process can fake them.
|
The changes in this PR will be included in the next version bump.
|
There was a problem hiding this comment.
ℹ️ No blocking issues. One non-blocking finding below.
Approach: Explicit idle expiry at the shared authentication gate is appropriate for keychain reads, and caller hints remain separate from authorization.
Reviewed changes include all six changed files and their authentication, IPC, and menu-bar callers.
- Session expiry: Cached contexts expire after five minutes without gated use; authentication refreshes their timestamps, and warm-state queries exclude expired sessions.
- Prompt hints: IPC forwards the caller PID so prompts can include a bounded project-folder name and detected agent label from its environment.
- Documentation and release: The Keychain documentation describes idle expiry, and the macOS native helper receives a patch bump.
Swift syntax parsing passed. macOS authentication and menu-bar behavior could not be exercised on this Linux runner.
Non-blocking
- P2: The menu-bar icon stays unlocked after idle expiry. The expiry-aware state query is only reflected when the icon is refreshed by a successful gated operation, explicit lock, or opening the menu. After the last session idles out, the icon therefore remains unlocked until another event occurs; schedule a refresh when the last active session expires.
gpt-6.1-sol | 𝕏
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | d9ff073 | Commit Preview URL Branch Preview URL |
Dec 04 2026, 09:27 PM |



What
keychain()reads only checked that a cachedLAContextexisted for the session, so one approval lasted untilvarlock lock, sleep, screen lock, or the daemon exiting. The daemon now tracks when each session was last used and drops it after 5 minutes of inactivity. Each gated read or decrypt extends the session.sessionWarmand the menu bar state now reflect this.Notes
varlock()decrypts may still be re-prompted by macOS on its own schedule for Secure Enclave key operations. We don't control that while using the SE key directly; the local encryption v2 work addresses it.