GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Withdrawn · Issue #65128 · anomalyco/opencode

Withdrawn #65128

New issue
Copy link
New issue
Copy link
Closed
Closed
Withdrawn#65128
Copy link
Labels
area/pluginsPlugins, skills, custom agentstype/featureNew behaviour or an improvementversion/v2OpenCode 2.x

Description

@jonatan-bengtsson
jonatan-bengtsson
opened on Nov 20, 2026
Issue body actions
No description provided.

Activity

  1. opencodejr commented on Nov 20, 2026

    @opencodejr
    opencodejrBot
    on Nov 20, 2026
    Contributor
    More actions

    Thanks for the detailed request! In short, you'd like the permission.evaluate hook for external_directory checks to receive the ID of the individual (nested Code Mode) tool call next to the outer execute ID, plus the exact resolved target path or paths. That way a plugin can scope a directory decision without guessing from event order.

    What I found in the code matches what you saw:

    • The external_directory check uses the target's directory glob (<dir>/*) as its resource, not the file path. Targets in the same directory are merged into one check, so your a.txt and b.txt reads produce the same resource.
    • The hook's input (PermissionEvaluation) has resources, metadata and source. None of these carries a nested call's own ID or the resolved file paths.
    • fix(core): give each Code Mode call its own ID #64324 gave each Code Mode call its own ID but kept permission requests on the execute call's ID. It lists this as a known limit: a plugin sees the inner ID in tool.execute.before and the execute ID in permission.evaluate.

    Because of this, it can't be done in a plugin today; it needs a small addition to the plugin API, such as the call's own ID in source next to the parent ID, and the resolved targets in the check's metadata. Maintainers will consider it.

    Related issues and PRs:

    • fix(core): give each Code Mode call its own ID #64324: the change that gave nested Code Mode calls their own IDs, with this limit noted
    • [FEATURE]: Expose saved permissions (or rule provenance) to server plugins #61767: exposing more about where permission decisions come from to plugins
    • grep and glob assert their pattern as the permission resource, so path-based policy is impossible #64059: grep and glob not using paths as permission resources
    • [FEATURE]: Opt-in to bound external_directory at the instance directory, not the git worktree #54869, [FEATURE]:permissions: external_directory approval prompt lacks explicit scope choice (folder only vs including subfolders) #56807: the scope of external_directory checks
  2. opencodejr
    added
    area/pluginsPlugins, skills, custom agents
    type/featureNew behaviour or an improvement
    version/v2OpenCode 2.x
    on Nov 20, 2026
  3. jonatan-bengtsson
    changed the title [-][FEATURE]: Expose nested tool calls and resolved targets in `external_directory` permission hooks[/-] [+]Withdrawn[/+] on Nov 20, 2026
  4. jonatan-bengtsson
    closed this as not plannedon Nov 20, 2026
  5. jonatan-bengtsson
    closed this as completedon Nov 20, 2026
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

    area/pluginsPlugins, skills, custom agentstype/featureNew behaviour or an improvementversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.