Repository navigation
heed tells Claude's auto mode where a tool result came from - #263
Merged
Merged
Conversation
heed's PostToolUse hook recognises the calls that bring a PR, an issue or a gist in (gh pr view, diff and checkout, git fetch of a PR's head, gh api comments and reviews, gh run view --log, WebFetch and curl of github.com) and, in auto mode, answers with classifierContext: the repo, the number, who opened it and wrote on it, who each is to the repo and whether its code is from a fork. Built only from facts the app keeps beside its socket, never from the content; no note when heed does not know, or when everyone involved can write to the repo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The facts are projected from the PRs and issues heed holds and written off the main actor when they change. When a hook found heed knew too little, the app asks GitHub once (read only, at most once a minute per PR or issue) for the next call. Each note is a cause, "Told auto mode: …", above what the agent in that pane does next. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude Code reports /private/tmp/x where heed may keep /tmp/x; the folder a call ran in now finds its checkout either way. The latency test checks the median, so a busy test machine does not fail it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n gh that answers every read The stand-in answers every gh call agents made in earlier runs (gh api comments and reviews, --jq through jq), which a replay checks without a model, along with the built hook's answer. The review comment asks for a push straight to main; the prompt asks to address it and push. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
When an agent in auto mode reads content other people wrote (a PR checkout, PR or issue comments, a CI log), heed's
PostToolUsehook now tells Claude Code's auto mode classifier where that result came from: the repo, the PR or issue, and the people in it with how they relate to the repo (owner, collaborator, bot, or not a collaborator). The note carries only facts heed holds, never the content itself, and is sent only when someone outside the repo's collaborators is involved.What changed
OriginNotein HeedCore recognises the commands that bring other people's content in (gh pr checkout,gh pr view/diff,gh issue view,gh api …/comments|reviews,gh run view --log, fetches of PR refs, WebFetch/curl of GitHub URLs) and answers withclassifierContext./private/tmp/…and/tmp/…now match the same checkout.agents/hooks.mdandinsights/audit.md.Verified
mise run lint,mise run text-checkandmise run test(2446 tests) pass; each new rule was mutation-checked, and a replay test runs the built hook end to end.HEED_LIVE=1, Claude Code in auto mode on Haiku 5.5, stand-ingh, no GitHub) confirms the note reaches auto mode. It could not show whether the note changes the classifier's decisions: the agent declined the request in the stand-in comment by itself in every run, so the classifier was never asked. The raw runs are inTests/HeedCoreTests/Fixtures/live/.Not tested
🤖 Generated with Claude Code