Repository navigation
The app wires learner-server's hook into every Claude Code session on this Mac - #8
Merged
Merged
Conversation
… this Mac A new job, ClaudeHook (launch, then every 6 h), runs learner-server's own installer from the uploader's checkout: user-level ~/.claude/settings.json, the paired server's URL, and the Keychain lookup as the way to read the device key (never the key). It then runs the installer's --check, which asks the server with that key, and reports the result like any other job: refused or keyless is blocked, unreachable is retried. That covers the terminal CLI and the Code tab of the Claude desktop app. Chats in the desktop app and on claude.ai run no hooks and still arrive through the chat archive. Tests: the arguments and report parsing (light), the job against a stand-in bun (medium), and on the runner the real installer against the real server with a real device key into a scratch ~/.claude, with one prompt sent through the installed hook (heavy). config/learner-server.ref moves to the server commit that admits a device key on the hook's calls. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPMjtan22onKA34S16vwNd
onthegonow
enabled auto-merge (squash)
November 17, 2026 21:30
…pand) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPMjtan22onKA34S16vwNd
…ng else and fails open) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPMjtan22onKA34S16vwNd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
The app now wires learner-server's live hook into Claude Code on this Mac, so the hook runs in every Claude Code session in any folder: the terminal CLI and the Code tab of the Claude desktop app (it runs the same Claude Code and reads the same
~/.claude/settings.json).A new job,
ClaudeHook, runs at launch and every 6 hours. It runs learner-server's own installer (clients/hook/src/install.ts) from the uploader's checkout with:--server-urlset to the paired server,--key-command-jsonset to the Keychain lookup the app already uses. The key itself is never passed, written or logged.It then runs the installer's
--check, which asks the server with that key, and reports the result like any other job. A refused or missing key isblocked; an unreachable server is retried.Not covered, by design of the Claude apps: a chat in the Claude desktop app or on claude.ai runs no hooks. Those still reach the server afterwards through the chat archive.
Server side
config/learner-server.refmoves to the learner-server commit that lets a paired device key call the hook's seven RPCs (before, they needed an admin key, so a Mac could not use the hook at all).Tests
--checkreport parsing, report to job outcome.~/.claude; one prompt sent through the installed hook command must come back with the live-feedback instructions.This branch was written on a Linux box with no Swift toolchain, so CI is its first compile.
Testing it on the owner's Mac (for the desktop agent)
git -C ~/code/learner-server pull --ff-only && (cd ~/code/learner-server && ~/.bun/bin/bun install --frozen-lockfile)scripts/test.sh lightandscripts/test.sh medium.ClaudeHookjob finishingok: wired into Claude Code.~/.bun/bin/bun ~/code/learner-server/clients/hook/src/install.ts --checkmust print"ok":true(it prints no key).LEARNING LIVE FEEDBACK. Report the session ids (not the prompt text) so the server side can confirm the turns were stored.🤖 Generated with Claude Code
https://claude.ai/code/session_01SPMjtan22onKA34S16vwNd