Skip to content

fix-ask-conversation-hidden-by-hook-claude: run the LLM phone check outside a GUI panel's binding - #112

Merged
tarr1124 merged 1 commit into
mainfrom
feature/fix-ask-conversation-hidden-by-hook-claude
Oct 28, 2026
Merged

tarr1124 merged 1 commit into
mainfrom
feature/fix-ask-conversation-hidden-by-hook-claude

Conversation

@tarr1124

Copy link
Copy Markdown
Contributor

Problem

When a GUI panel's turn ends, its Stop hook runs rill autosync hook-stop, which commits through the pre-commit PII hook. If a staged line trips the phone regex, the hook starts claude -p --model haiku to verify it. That child inherited the panel's RILL_TAB / RILL_WORKSPACE / RILL_ORIGIN, so rill session-hook recorded the check's own session as a new session of the panel.

The app reads the newest SessionStart with a panel's tab as the panel's current conversation (that is how /clear is followed), so it took the check for the panel's conversation. In Ask the vault, the real conversation then left the list while its process kept running, and was unreachable after leaving and reopening Ask.

The child also inherited autosync, so its own SessionStart hook waited up to 60 s on the lock held by the commit that started it.

Change

  • bin/hooks/pre-commit-pii-check.sh and rill crypt doctor start the check with env -u RILL_TAB -u RILL_WORKSPACE -u RILL_ORIGIN -u RILL_CLAUDE_VERSION RILL_AUTOSYNC=0 (the same panel variables the app already strips from the processes it spawns).
  • test/cli/test-pii-hook.sh: a stub claude records its environment; both call sites are checked under a panel's environment. The new cases fail on main and pass here.

The app side (ignore sdk-cli SessionStarts when binding a panel) is fixed separately in the app repository.

Verification

  • bash test/cli/test-pii-hook.sh: 49/49
  • bash test/cli/test-pii-regex-guard.sh: 18/18
  • codex review --base main: no findings

🤖 Generated with Claude Code

The pre-commit PII hook (and `rill crypt doctor`) start `claude -p` to
verify phone candidates. When the commit comes from a GUI panel's Stop
hook (`rill autosync hook-stop` -> `rill push`), that child inherited the
panel's RILL_TAB / RILL_WORKSPACE / RILL_ORIGIN, so `rill session-hook`
recorded the check's own session as a new session of the panel. The app
then took it for the panel's current conversation (as after a /clear) and
dropped the real one from its list while its process kept running.

The child also inherited autosync, so its SessionStart hook waited up to
60 s on the lock held by the very commit that started it.

Both call sites now drop the panel binding and set RILL_AUTOSYNC=0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tarr1124
tarr1124 merged commit 8a31f96 into main Oct 28, 2026
4 checks passed
@tarr1124
tarr1124 deleted the feature/fix-ask-conversation-hidden-by-hook-claude branch October 28, 2026 12:29
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