Skip to content

fix(claude-ops): inventory reads Explore and Plan disallowed tools as partial on 2.1.286 #5711

Description

@kyle-sexton

Problem

On Claude Code 2.1.286, plugins/claude-ops/skills/inventory/scripts/inventory.py reads the built-in Explore and Plan agents' disallowed tools as partial: the list is short. Those agents' definitions spread a shared list (...pY). The spread resolver reads the nearest pY binding, and on 2.1.286 that is an unrelated pY=p(...) call, so the shared entries, including the Artifact tools, are dropped.

The inventory already reports the field as partial, so this is not a wrong value. But anything that reads those lists sees fewer restrictions than the agents actually have.

Found while fixing #5700 (PR #5704). The behavior was the same before that change.

Fix

Resolve the spread with the module and scope rule that field and name resolution already use (_scoped_constant, #5619 and #5704), so ...pY reads the binding in the agent definition's own scope. If that binding can't be determined, keep partial.

Acceptance

  • On 2.1.286, Explore and Plan list the shared disallowed tools, and the field is no longer partial.
  • 2.1.285 output is unchanged, unless the same field was partial there too.
  • Synthetic-fixture test: a spread whose nearest same-name binding sits in another scope.

Related: #5640 (move to a real JavaScript parser).

Activity

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

    needs-triageNot yet classified. Floor until a type and one priority tier are set.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions