Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.
This repository was archived by the owner on May 28, 2026. It is now read-only.

overstory-guard.ts extension affects standalone Pi sessions instead of being scoped to Overstory worktrees. #117

Description

@RogerNavelsaker

Steps to reproduce

  1. Start a standalone pi session in a repository where Overstory has previously spawned an
    agent.
  2. Ensure the agent role in the generated .pi/extensions/overstory-guard.ts is set to a
    read-only role (e.g., coordinator).
  3. Attempt to run a write tool (edit, write) or a restricted bash command (echo >, mv).

Expected behavior

The guard should only apply to agents running inside an Overstory-managed worktree (e.g.,
.overstory/worktrees/...). Standalone sessions in the repository root should remain unblocked.

Actual behavior

The guard intercepts all tool_call events for the pi agent because it is placed in the
project-wide .pi/extensions/ directory, causing persistent "coordinator agents cannot modify
files" errors in standalone sessions.

overstory version

0.9.1

Bun version

1.3.10

Operating system

Linux (CachyOS/Arch, Kernel 6.19.7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimesRuntime adapters and spawning (Claude, Pi, Copilot, Codex, Gemini, Sapling, OpenCode)bugSomething isn't workingdifficulty:moderateRequires understanding of 1-2 subsystemspriority:mediumUseful but not urgent, well-scoped

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions