Repository navigation
fix: ask before confirming, even in apps that cut the guide (#333) - #334
Merged
Merged
Conversation
Claude Code keeps only the first 2,048 characters of a server's instructions. Saddle's are 6,912 on a fresh site, and the rule to show the user a preview before confirming sat at character 6,532, so Claude Code confirmed a gated delete in the same turn. - The preview's own instructions say to show the summary and ask. - "What you are allowed to do" carries the same rule. - The handshake's first line says where the rest of the guide is, including the owner's instructions. - The withheld-tools line names the level as the owner sees it. Refs #333, #223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #333 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #333 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
ifahimreza
added a commit
that referenced
this pull request
Oct 5, 2026
Refs #223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ifahimreza
added a commit
that referenced
this pull request
Oct 5, 2026
* docs(clients): real-app results for Claude Code, 2026-10-05 Key and sign-in on the 1.5.1 zip: connect, read and the Read only refusal pass; the gated write confirmed without asking (#333), fixed by #334 and checked with the real app. Also records Claude Code's 2,048-character instructions limit and how to run the pass headless. Refs #223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(clients): #334 is on main Refs #223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <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.
Closes #333
Refs #223
What
An AI app now shows the user a gated step's preview and waits for their yes before it confirms, including Claude Code, which reads only the start of Saddle's guide.
Why
Found in the #223 real-app pass. On the 1.5.1 zip, Claude Code 2.1.289 was asked to "Move the oldest draft to the trash". It got the preview and token and confirmed in the same turn without asking. The gate worked (two calls, single-use token, Activity with Undo), but the promise on the consent screen ("Deletions and overwrites will still show you a preview and ask for confirmation every time") was not kept.
Claude Code keeps the first 2,048 characters of a server's
instructions(measured: its copy of Saddle's 6,912-character guide ends at character 2,048 with "… [truncated]"). The ask-first rule was at character 6,532. The preview's own text said only "To proceed, call this tool again… with confirm_token". The owner's instructions come last, so Claude Code never saw those either.How
Saddle_Approval::gate(): the preview'sinstructionssay to show the summary, ask, and call with the token only after the user agrees. Every app reads this, whatever its instructions limit.Saddle_Context::system_context(): the write-tier line in "What you are allowed to do" carries the same rule, inside the first 2,048 characters.Saddle_MCP::server_instructions(): the handshake's first line tells an app that cut the guide short to callsaddle/get-instructionsfor the rest, including the owner's instructions. It is not insystem_context(), becauseget-instructionsserves that.Changelog line written under 1.5.2; the number is yours.
Testing
Saddle_MCP_Transport_TestandSaddle_Approval_Test, 64/64, including two new tests: the first 2,048 characters of the handshake carry the ask-first rule and the pointer (with owner instructions set), and the preview tells the agent to ask. Full suite: see below.phpcsclean on the three changed files.saddle.potregenerated: exactly the three changed strings.saddle-get-instructionsby itself.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.