Skip to content

Tool "bash" conflicts with pi-patty-bg-tasks at startup (load-time registration still races) #35

Description

@RaviTharuma

Environment

  • pi-tool-display 0.5.0
  • pi-patty-bg-tasks 1.1.6
  • @earendil-works/pi-coding-agent (Homebrew current)
  • Both packages enabled in ~/.pi/agent/settings.json

Repro

  1. Enable both packages:
    {
      "packages": [
        "npm:pi-tool-display",
        "npm:pi-patty-bg-tasks"
      ]
    }
  2. Leave default ownership (registerToolOverrides.bash: true / missing config).
  3. Start pi in any project.

Actual

Error: Failed to load extension ".../pi-patty-bg-tasks/index.ts": Tool "bash" conflicts with .../pi-tool-display/index.ts
Hint: Start without extensions using "pi -ne".

Expected

pi-tool-display should yield bash when another extension already owns it, as documented under Tool ownership conflicts / deferred ownership discovery (see closed #29 / #17).

Root cause

registerToolDisplayOverrides() still calls registerIfOwned("bash", ...) and other built-ins during extension load. Ownership is checked via pi.getAllTools() at that moment, so a later package cannot claim the slot cleanly. Pi then reports a hard tool-name conflict diagnostic.

README currently says overrides are deferred to before_agent_start, but that is only true for MCP decoration — built-ins still register immediately.

Workaround

In ~/.pi/agent/extensions/pi-tool-display/config.json:

{
  "registerToolOverrides": {
    "bash": false
  }
}

Optionally load pi-patty-bg-tasks before pi-tool-display.

Fix

PR: #34

Defer all built-in override registration to session_start / before_agent_start and re-evaluate ownership against the full tool graph before registering.

Related: #17, #29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions