VS Code support, and the Claude install that was already running there - #29
Merged
Merged
Conversation
The submission checks read plugin.json, .plugin/plugin.json or .github/plugin/plugin.json, and this repository carried only the Claude and Codex manifests. Add the Agent Plugins v1 manifest at the plugin root, where github/awesome-copilot resolves it from the listing's source.path, with hooks in com.github.copilot/hooks/hooks.json. What VS Code grants was measured against 1.137.0 with Copilot Chat 0.65.0 rather than read out of its documentation, and it is narrower than the documentation suggests. A prompt can be stopped before it is sent and a tool call denied before it runs. After a tool, nothing can be withheld: a probe answering decision: "block" on a terminal result was followed by the model quoting the secret out of that result, and continue: false did not stop the turn either. A read_file result never reaches the hook at all, arriving as an empty tool_response, so a file read is covered by its path before the read. So Adapter carries a third field, power, and every adapter states which of rewrite, refuse or report-only its client grants at that event. _decide caps the action at it: a mask becomes a refusal where only refusal exists, and a refusal becomes a report where the model already holds the data. The session record follows, saying found rather than blocked, because reporting a block the model read through is worse than reporting the finding plainly. The same run uncovered an older fault. VS Code reads ~/.claude/settings.json by default, so shim install claude has been registering shim in two clients at once, and in VS Code it spoke Claude's protocol: decision: "block" is a field VS Code ignores. Anyone running user-prompt = "enforce" who used VS Code had prompts sent that shim reported as blocked. The two are now told apart by what each always sends, permission_mode against timestamp, and answered in their own protocol. The environment cannot be used for this: the VS Code capture carried CLAUDE_CODE_* variables, inherited from the terminal that started it. A hook asked for a client this build does not know now inspects nothing and says so on stderr, rather than answering with another client's refusal; an older package meeting this newer plugin would otherwise have blocked every VS Code prompt with a message naming Codex. Copilot CLI and the Copilot app read the same hook file, where shim install copilot is the supported route, so the command stands down on COPILOT_CLI. Live: the shipped plugin in VS Code 1.137.0 (prompt, terminal result and session summary), Claude Code 2.1.273 masking a .env through the committed archive, Copilot CLI 1.0.85 standing down, and plugin detection unchanged on Claude Code and Codex 0.151.0. Captures are fixtures under tests/fixtures/probe/vscode/. 2,032 tests pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The README is the tour and commands.md is the reference; neither answers "my team's hostnames are not secrets to the detector" or "one tool is noisy and I do not want to disable a type everywhere". Eleven recipes, each one a problem someone actually has, with the two lines that solve it. Every command in it was run before it was written: the custom-pattern pair against `shim redact`, the reveal format, `scan`'s grep-style exit codes, and the settings path `shim config` prints. The client table says what each one can do rather than what its documentation implies, including the VS Code limits measured for 1.0.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The submission checks read
plugin.json,.plugin/plugin.jsonor.github/plugin/plugin.json, and this repository carried only the Claude and Codex manifests. This adds the Agent Plugins v1 manifest at the plugin root — where github/awesome-copilot resolves it from the listing'ssource.path— with hooks incom.github.copilot/hooks/hooks.json.What VS Code actually grants
Measured against VS Code 1.137.0 with Copilot Chat 0.65.0, not read out of its documentation:
UserPromptSubmitcontinue: falsePreToolUsepermissionDecision: "deny"PostToolUsefollowed.PostToolUsedecision: "block"PostToolUsecontinue: falseAlso: a
read_fileresult reaches hooks astool_response: "", so a file read is covered by its path before the read; a terminal result arrives in full.So
Adaptercarriespower—rewrite,refuseorreport-only— and_decidecaps the action at what the client grants. A mask becomes a refusal where only refusal exists; a refusal becomes a report where the model already holds the data. The session record saysfoundrather thanblocked, because reporting a block the model read through is worse than reporting the finding plainly.The fault this uncovered
VS Code reads
~/.claude/settings.jsonby default, soshim install claudehas been registering shim in two clients at once — and in VS Code it spoke Claude's protocol, whosedecision: "block"VS Code ignores. Anyone runninguser-prompt = "enforce"who used VS Code had prompts sent that shim reported as blocked. They are now told apart by what each always sends (permission_modeagainsttimestamp) and answered in their own protocol. The environment is no help here: the VS Code capture carriedCLAUDE_CODE_*variables inherited from the terminal that started it.A hook asked for a client this build does not know now inspects nothing and says so on stderr, instead of answering with another client's refusal — an older package meeting this newer plugin would otherwise have blocked every VS Code prompt with a message naming Codex.
Copilot CLI and the Copilot app read the same hook file, where
shim install copilotis the route, so the command stands down onCOPILOT_CLI.Verified live
hooks/run-shimand the committed archive: prompt answeredshim: found EMAIL (1) in your prompt. Not modified.;cat secrets.envansweredshim: found DB_URI (1), EMAIL (1), SECRET (1) in run_in_terminal. Not modified.and the model described the file without quoting a value;Stoprendered the session summary, overhead 168 ms median.Readof a synthetic.envreached the model as<SECRET_1>and<EMAIL_1>, and it said a masking layer had replaced them.Codex had no live prompt on this build; the evidence record says so.
Captures are fixtures under
tests/fixtures/probe/vscode/. 2,032 tests pass, gate green at 1.0.1.🤖 Generated with Claude Code