claude-code - 💡(How to fix) Fix [BUG] macOS / Pencil MCP: tools spuriously rejected as 'user denied' without permission prompt (v2.1.120) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#53314Fetched 2026-04-26 05:18:54
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Error Message

  1. If something goes wrong at the transport / server level, the model should be told the truth (e.g. "MCP transport error: ...", "Tool call timed out after Ns"), not the literal string used for genuine user denials. Reusing the user-denial string for transport errors poisons the model's decision-making — per its operational rules it stops retrying and asks the user, even though the user did nothing.

Error Messages/Logs

Root Cause

  • Related: #53169 — same symptom (mcp__* tool returns literal user denied rejection without prompt) on Windows for mcp__codebrain__*. Filing this issue separately because (a) different OS, (b) different MCP server, (c) different MCP transport (Pencil ships its own stdio binary), so Anthropic can confirm the bug is not Windows- or codebrain-specific.
  • A PreToolUse hook is configured for Bash only (~/.claude/scripts/deny-check.sh); it should not affect MCP tools, and other MCP tools work fine in the same session. Disabling the hook does not change the symptom (tested separately).
  • Other MCP servers using stdio transport (o3, dart, container-use, context7, mobile-mcp) all work normally in the same session, so this is not a generic stdio-MCP regression — it appears to be specific to which tool name / which MCP server gets auto-rejected.
  • Once a session enters this state, it does not recover for mcp__pencil__* tools; restarting the session shows the same behavior immediately on the first call. Pencil app restart does not fix it. claude mcp restart pencil (re-adding the server) does not fix it.

Code Example

Tool call: mcp__pencil__get_editor_state({ "include_schema": true })
Result:    The user doesn't want to proceed with this tool use. The tool use was rejected
           (eg. if it was a file edit, the new_string was NOT written to the file).
           STOP what you are doing and wait for the user to tell you how to proceed.

---

Tool: mcp__pencil__get_editor_state
Args: { "include_schema": true }
Result: The user doesn't want to proceed with this tool use. The tool use was rejected
        (eg. if it was a file edit, the new_string was NOT written to the file).
        STOP what you are doing and wait for the user to tell you how to proceed.

---

pencil: /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64 --app desktop -Connected

---

pencil:
  Scope: User config (available in all your projects)
  Status:Connected
  Type: stdio
  Command: /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64
  Args: --app desktop

---

{
  "permissions": {
    "allow": [
      "mcp__pencil",
      "...other entries..."
    ],
    "deny": [
      "...non-MCP entries only..."
    ]
  }
}

---

claude mcp get pencil
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In a Claude Code session on macOS, every call to a mcp__pencil__* tool returns the system signal:

The user doesn't want to proceed with this tool use. The tool use was rejected

without any permission prompt being displayed, and without any user interaction. The Pencil MCP server itself reports as healthy (✓ Connected), and the ~/.claude/settings.json allow-list contains an entry for it. The same setup worked in earlier sessions on this exact machine; the regression was first noticed today on Claude Code 2.1.120.

This is closely related to (but separate from) #53169 — that report is for mcp__codebrain__* on Windows. I am filing this one to give Anthropic a clean macOS / different-MCP-server data point so the bug is not mistakenly scoped to Windows or to a single MCP package.

Concrete trace

Tool call: mcp__pencil__get_editor_state({ "include_schema": true })
Result:    The user doesn't want to proceed with this tool use. The tool use was rejected
           (eg. if it was a file edit, the new_string was NOT written to the file).
           STOP what you are doing and wait for the user to tell you how to proceed.
  • No permission prompt was shown.
  • The user was watching the screen and pressed nothing.
  • The macOS Notification hook (osascript ... display notification "Claude Code が許可を求めています") also did not fire, which suggests the request never reached the permission UI in the first place — it appears to be auto-rejected upstream.

Other MCP servers in the same session (dart, github, context7, container-use, mobile-mcp, o3) all work normally, and non-MCP tools (Bash, Read, Edit, Write, Grep) also work. The block is specific to mcp__pencil__*.

What Should Happen?

In order of preference:

  1. The tool just runs. Once mcp__pencil__* (or an explicit allow entry) is in permissions.allow, subsequent calls should execute and return their real result. Earlier sessions on the same machine confirm this used to work.
  2. If a permission really is required, the standard permission prompt should be displayed and the macOS Notification hook should fire — explicit approve / deny by the user, not silent auto-deny.
  3. If something goes wrong at the transport / server level, the model should be told the truth (e.g. "MCP transport error: ...", "Tool call timed out after Ns"), not the literal string used for genuine user denials. Reusing the user-denial string for transport errors poisons the model's decision-making — per its operational rules it stops retrying and asks the user, even though the user did nothing.

Error Messages/Logs

Tool: mcp__pencil__get_editor_state
Args: { "include_schema": true }
Result: The user doesn't want to proceed with this tool use. The tool use was rejected
        (eg. if it was a file edit, the new_string was NOT written to the file).
        STOP what you are doing and wait for the user to tell you how to proceed.

claude mcp list:

pencil: /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64 --app desktop - ✓ Connected

claude mcp get pencil:

pencil:
  Scope: User config (available in all your projects)
  Status: ✓ Connected
  Type: stdio
  Command: /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64
  Args: --app desktop

~/.claude/settings.json (excerpt):

{
  "permissions": {
    "allow": [
      "mcp__pencil",
      "...other entries..."
    ],
    "deny": [
      "...non-MCP entries only..."
    ]
  }
}

Steps to Reproduce

  1. macOS 15.5, Apple Silicon.
  2. Install Pencil.app and ensure its bundled stdio MCP server is registered:
    claude mcp get pencil
    should show ✓ Connected, command /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64 --app desktop.
  3. Confirm Pencil.app desktop is running.
  4. In ~/.claude/settings.json, ensure permissions.allow contains an entry for the server ("mcp__pencil"). No deny entry for it.
  5. Start a new Claude Code session: claude.
  6. From the chat, request a Pencil action that requires a Pencil MCP tool, e.g. "open the editor and tell me what node is selected" — this triggers a mcp__pencil__get_editor_state call.
  7. Observe: the tool result is the literal user denied rejection string, with no permission prompt shown and no Notification hook fired.
  8. Repeat with mcp__pencil__open_document / mcp__pencil__batch_get — same auto-rejection.
  9. In the same session, call any non-pencil tool (Bash, Read, mcp__github__*, mcp__context7__*) — all work normally.

Claude Model

(default; not relevant — model is invoking the tool correctly, the rejection happens before reaching it)

Is this a regression?

Yesmcp__pencil__* tools worked in earlier sessions on the same machine with the same ~/.claude/settings.json and the same Pencil version. The regression was first observed on 2.1.120.

Last Working Version

Unknown precise build, but mcp__pencil__open_document / mcp__pencil__batch_get / mcp__pencil__get_editor_state were used successfully in this project within roughly the past two weeks. Likely working on ~ 2.1.11x.

Claude Code Version

2.1.120 (Claude Code)

Platform

Claude Code CLI

Operating System

macOS 15.5 (Build 24F74), Apple Silicon

Terminal/Shell

zsh (default), running inside iTerm2 / macOS Terminal

Additional Information

  • Related: #53169 — same symptom (mcp__* tool returns literal user denied rejection without prompt) on Windows for mcp__codebrain__*. Filing this issue separately because (a) different OS, (b) different MCP server, (c) different MCP transport (Pencil ships its own stdio binary), so Anthropic can confirm the bug is not Windows- or codebrain-specific.
  • A PreToolUse hook is configured for Bash only (~/.claude/scripts/deny-check.sh); it should not affect MCP tools, and other MCP tools work fine in the same session. Disabling the hook does not change the symptom (tested separately).
  • Other MCP servers using stdio transport (o3, dart, container-use, context7, mobile-mcp) all work normally in the same session, so this is not a generic stdio-MCP regression — it appears to be specific to which tool name / which MCP server gets auto-rejected.
  • Once a session enters this state, it does not recover for mcp__pencil__* tools; restarting the session shows the same behavior immediately on the first call. Pencil app restart does not fix it. claude mcp restart pencil (re-adding the server) does not fix it.

extent analysis

TL;DR

The issue can be resolved by investigating the permission settings and MCP server configuration for the mcp__pencil__* tools, as the problem seems to be specific to these tools and is not a generic issue with all MCP tools or stdio transport.

Guidance

  • Verify that the ~/.claude/settings.json file contains the correct allow-list entry for the mcp__pencil server and that there are no deny-list entries that could be causing the issue.
  • Check the MCP server configuration for mcp__pencil__* tools to ensure it is correctly set up and running, using commands like claude mcp get pencil and claude mcp list.
  • Investigate if there are any specific permission or configuration issues related to the mcp__pencil__* tools that could be causing the auto-rejection without a prompt.
  • Consider testing with a different MCP server or tool to isolate if the issue is specific to mcp__pencil__* or if it's a broader problem.

Example

No specific code example is provided as the issue seems to be related to configuration and permission settings rather than code.

Notes

The issue appears to be a regression introduced in version 2.1.120 of Claude Code, and it's specific to the mcp__pencil__* tools on macOS. The problem does not seem to be related to the PreToolUse hook or the stdio transport in general, as other MCP servers using stdio work normally.

Recommendation

Apply a workaround by checking and adjusting the permission settings and MCP server configuration for the mcp__pencil__* tools, as the issue seems to be specific to these tools and not a generic problem with Claude Code or MCP tools.

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 [BUG] macOS / Pencil MCP: tools spuriously rejected as 'user denied' without permission prompt (v2.1.120) [1 comments, 2 participants]