Skip to content

Doesn't work with Claude Code with enabled sandbox #102

Closed

Description

@simplylizz
❯ /revdiff:revdiff

  Searched for 1 pattern (ctrl+o to expand)

⏺ Bash(/Users/simplylizz/.claude/plugins/cache/revdiff/revdiff/0.7.2/.claude-plugin/skills/revdiff/scripts/detect-ref.sh)
  ⎿  branch: candidates
     main_branch: main
     is_main: false
     … +5 lines (ctrl+o to expand)

⏺ You're on branch candidates with uncommitted changes. What would you like to review?

⏺ User answered Claude's questions:
  ⎿  · What scope should the diff review cover? → Branch vs main

⏺ Launching revdiff with the full branch diff against main...

⏺ Bash(/Users/simplylizz/.claude/plugins/cache/revdiff/revdiff/0.7.2/.claude-plugin/skills/revdiff/scripts/launch-revdiff.sh main)
  ⎿  Error: Exit code 1
     2026-04-13 19:36:33.102 osascript[52190:17723674] Error received in message reply handler: Connection invalid
     2026-04-13 19:36:33.102 osascript[52190:17723675] Connection Invalid error for service com.apple.hiservices-xpcservice.
     131:156: execution error: Ghostty got an error: Application isn’t running. (-600)

⏺ The launcher couldn't detect a running terminal overlay (tried Ghostty but it's not running). Let me check what terminal environment you're in.

I use Ghostty 1.3.1. If I disable sandbox (/sandbox command) then it works.

Activity

  1. umputun commented on Apr 13, 2026

    @umputun
    Owner

    this is a Claude Code sandbox limitation, not a revdiff issue. the Ghostty and iTerm2 launchers use osascript (Apple Events) which requires XPC service access that the sandbox blocks by default.

    fix: add this to your Claude Code settings.json:

    {
      "sandbox": {
        "network": {
          "allowMachLookup": ["com.apple.hiservices-xpcservice"]
        }
      }
    }

    this should allow the specific XPC service osascript needs for Apple Events while keeping everything else sandboxed. I haven't tested this myself though, so pls try it and let me know if it works. if it does, I'll add this to the plugin install docs.

    alternative: run Claude Code inside tmux, which bypasses the issue entirely since tmux popup doesn't need osascript.

  2. simplylizz commented on Apr 13, 2026

    @simplylizz
    Author
      "allowMachLookup": [
        "com.apple.hiservices-xpcservice",
        "com.apple.appleevents",
        "com.mitchellh.ghostty"
      ]
    

    I tried this, but it didn’t help, the error was a different one:

    ⏺ Bash(/Users/simplylizz/.claude/plugins/cache/revdiff/revdiff/0.7.2/.claude-plugin/skills/revdiff/scripts/launch-revdiff.sh main)
      ⎿  Error: Exit code 1
         131:156: execution error: Ghostty got an error: Application isn’t running. (-600)
    

    But adding an exception for launch-revdiff.sh like this did help:

    "excludedCommands": [
      "*/launch-revdiff.sh*"
    ]
    
  3. umputun commented on Apr 13, 2026

    @umputun
    Owner

    thx for finding the workaround. added the excludedCommands solution to the docs (README, site, plugin reference) so others can find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions