Skip to content

v0.1.14 — Subagent tool restriction and write/edit permission fix

Choose a tag to compare

@andrea-tomassi andrea-tomassi released this 01 Aug 14:53
· 57 commits to main since this release

Fixed

  • Issue #4 — write/edit permission collision: write and edit are now separate permission categories. Previously, {edit: true, write: false} silently produced edit: deny due to both mapping to the same key. In pi, write (create/overwrite) and edit (search-and-replace) are distinct tools.

  • Issues #1 + #2 — Subagent tool restriction: OpenCode-style tools: map and explicit permission: blocks now restrict the subagent child process toolset via the --tools CLI flag. Previously, these restrictions were silently ignored for subagents — the child received all tools regardless.

Changed

  • toolToPermission() and toolsMapToPermission() no longer collapse write into edit. Only apply_patch (OpenCode-only) still maps to edit.
  • New deriveToolsWhitelist() in subagent executor derives --tools from permission allow-lists when no explicit tools array exists.
  • Removed dead PI_OPEN_AGENTS_PERMISSION from RecursionEnv type.

Known limitations

  • Wildcard permissions (*: allow + specific denies) cannot produce a finite --tools whitelist — the CLI flag is a whitelist, not a deny-list. The child gets all tools in this case.
  • Issue #3 (variant: field) not addressed — requires a pi-core --variant CLI flag.

Tests

  • 97 tests (84 existing updated + 13 new), all passing