Repository navigation
doperpowers 7.203.2: the appeal's pass keeps to core's plain ask on Claude Code 2.1.307 - #335
Merged
Merged
Conversation
…laude Code 2.1.307 Claude Code 2.1.307 dropped `decider` from the tool.check verdict, which the appeal's guard read to leave two asks alone: the host's (core's ask where a host's permission callback answers) and a hook's person-only ask. The engine now carries them as `e.approver === 'host'` on the question and `verdict.plugin` (the plugin whose hook made or reworded the ask, set by the engine and pinned) on the verdict; every hook's ask is now a person's. On 2.1.307 the old guard read an always-absent `decider`, so a granted pass would have turned either ask into an allow. The engine's own security-default guard made the same translation (`plugin`, or an ask with a host approver). The guard now refuses a pass over a verdict with `plugin`, a question with a host approver, or a verdict carrying `decider`: sessions started on 2.1.306 or earlier still set it and pick this plugin up by reload. The new test fails on main's guard (the plugin's ask is allowed) and passes here. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
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.
Claude Code 2.1.307 (released 2026-10-21) turned main's
mods-typesgate red:hooks/mods/appeal.tsx(366,15): Property 'decider' does not exist on type 'ToolCheckResult'(run 39690239791). Behind the type error is a runtime one in the appeal's permission guard.What 2.1.307 changed
ToolCheckResult.decider('host' | 'person') is gone. Through 2.1.306 core setdecider: 'host'on its ask where a host's permission callback answers it (--permission-prompt-tool, an SDKcanUseTool, a served call), and a hook could setdecider: 'person'to make its ask person-only.ToolCheckInput.approver('host' | 'person', or absent where nobody can be asked) is set on the question before any hook runs. It is'host'under exactly the predicate that used to set core'sdecider: 'host'.ToolCheckResult.pluginnames the plugin whose hook made or reworded an ask. Core's own ask names none.decider: 'person'is mapped toplugin.decider !== undefinedbecameplugin !== undefined || (decision === 'ask' && approver === 'host').Read from the declarations 2.1.307 lays and from the minified code in the 2.1.306 and 2.1.307 binaries. The other mod-API changes since 2.1.304 are a docked pane's width cap, a
partstamp and the typing of a test$.tool.call. No mod here is affected by them:typecheck.shpasses for sminos, to-human and devcloud, and sminos's bridgetool.checkhook reads onlydecision.The runtime break
On 2.1.307,
verdict.decideris always undefined, so the guard no longer recognised two asks it exists to leave alone:--permission-prompt-tool stdio);A granted appeal's pass would have turned either one into an
allow. The pass covers only a subagent's grant, or a main-loop grant the appeal cannot run itself (Agent, AskUserQuestion, Workflow). It is one-shot: the identical call, in the same loop and directory, within 10 minutes, with no prompt or answer in between. Rules, classic hooks, settings checks, ceilings and denies were still honoured.The fix
The guard now refuses a pass over:
plugin;approverishost;decider('decider' in verdict).The
deciderclause is not optional compatibility. A session keeps the engine it started on, andhooks/mods/reload.tsxloads a new plugin version into live sessions. When this was written, every live session on the MacBook ran 2.1.302–2.1.306. Dropping the clause would move the hole into those sessions.A new test in
tests/mods/appeal.test.tsputs each excluded ask in front of a live pass: plugin, host approver, classic hook, setting, and legacydecider(personandhost). Then core's plain ask withapprover: 'person'spends the pass. On main's guard the test fails (the plugin's ask is allowed), and it passes here. All 208 mods tests pass, andtypecheck.shis clean against 2.1.307 for all four plugins.doperpowers 7.203.1 → 7.203.2.
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)