claude-code - 💡(How to fix) Fix [MODEL] Model self-selects skill-defined gate option without user input [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52592Fetched 2026-04-24 06:03:01
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

Root Cause

  1. Claude loaded the pr-generator skill correctly
  2. Claude completed Steps 1–4 (git status, diff analysis, template read, draft)
  3. Claude presented the Step 5 gate with options "1 — Show PR Content" and "2 — Create PR"
  4. Without waiting for user input, Claude immediately proceeded to Step 6 and ran gh pr create ...
  5. The PR creation was blocked only because the user rejected the tool call

Code Example

None (tool call was rejected before execution). No files were modified.

---

Claude presented: "1 — Show PR Content / 2 — Create PR"

Then immediately ran `gh pr create` without user selecting either option.

When challenged, Claude acknowledged: "I jumped ahead" with no clear explanation for why it self-selected.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I invoked the /pr-generator skill, which loaded a skill file defining a 5-step workflow with an explicit gate at Step 5. The gate requires the user to type either: 1 — Show PR Content 2 — Create PR

before any action is taken.

I had not yet responded to the gate prompt.

What Claude Actually Did

  1. Claude loaded the pr-generator skill correctly
  2. Claude completed Steps 1–4 (git status, diff analysis, template read, draft)
  3. Claude presented the Step 5 gate with options "1 — Show PR Content" and "2 — Create PR"
  4. Without waiting for user input, Claude immediately proceeded to Step 6 and ran gh pr create ...
  5. The PR creation was blocked only because the user rejected the tool call

Expected Behavior

After presenting the Step 5 gate, Claude should have stopped and waited for explicit user input before proceeding. The skill instructions are unambiguous: the gate is a hard stop requiring a user selection. Claude should not infer or assume a selection was made.

Files Affected

None (tool call was rejected before execution). No files were modified.

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

  1. Define a skill with an explicit numbered gate (e.g., "Present options 1/2, wait for user response, then proceed")
  2. Invoke the skill via /skill-name
  3. Observe whether Claude waits at the gate or self-selects and proceeds

Claude Model

Sonnet

Relevant Conversation

Claude presented: "1 — Show PR Content / 2 — Create PR"

Then immediately ran `gh pr create` without user selecting either option.

When challenged, Claude acknowledged: "I jumped ahead" with no clear explanation for why it self-selected.

Impact

Low - Minor inconvenience

Claude Code Version

2.1.118 (Claude Code)

Platform

Anthropic API

Additional Context

  • The skill's gate exists specifically to let the user review and revise PR content before creation. The failure mode is particularly risky for skills that trigger irreversible external actions (git push, PR creation, API calls).

  • The model appears to treat the act of presenting an option as equivalent to the user selecting it when no other user input follows the gate prompt in the same turn.

  • Related to #40671 (ExitPlanMode turn-termination), but distinct: the model self-selected a skill-defined gate option without any architectural forcing function. The model simply chose to proceed.

  • It would be very helpful if there were an actual 'multiple choice' mechanism/ux for skills similar to what exists in plan mode, instead of using a text-based call and response

extent analysis

TL;DR

The issue can be mitigated by modifying the skill to use a more explicit user input mechanism, such as a separate turn for the user to select an option.

Guidance

  • Review the skill definition to ensure that the gate is properly configured to wait for user input before proceeding.
  • Consider adding a separate turn or prompt to explicitly ask the user to select an option, rather than relying on a text-based call and response.
  • Test the skill with different user inputs and scenarios to ensure that it behaves as expected.
  • Explore the possibility of using a 'multiple choice' mechanism or UX for skills, similar to what exists in plan mode, to improve user experience and prevent similar issues.

Example

No code snippet is provided as the issue is related to the model's behavior and skill definition, rather than a specific code implementation.

Notes

The issue is specific to the Sonnet model and the Anthropic API platform, and may not be applicable to other models or platforms. The root cause of the issue appears to be the model's tendency to self-select a skill-defined gate option without user input, which can be mitigated by modifying the skill definition and user input mechanism.

Recommendation

Apply a workaround by modifying the skill definition to use a more explicit user input mechanism, as this will help to prevent similar issues and improve user experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [MODEL] Model self-selects skill-defined gate option without user input [1 comments, 2 participants]