[PR #7875] fix: permission pattern mismatch for tool-output directory #12548

Open
opened 2026-02-16 18:17:27 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7875

State: open
Merged: No


Fixes #7876

external-directory.ts appends /* when creating permission patterns, but agent.ts was setting the allow rule without it. The patterns never matched, so permission requests fell through to "ask" and hung in headless mode.

Changed agent.ts to use ${Truncate.DIR}/* instead of Truncate.DIR.

Tested by running the agent tests (bun test agent.test.ts).

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7875 **State:** open **Merged:** No --- Fixes #7876 `external-directory.ts` appends `/*` when creating permission patterns, but `agent.ts` was setting the allow rule without it. The patterns never matched, so permission requests fell through to "ask" and hung in headless mode. Changed `agent.ts` to use `${Truncate.DIR}/*` instead of `Truncate.DIR`. Tested by running the agent tests (`bun test agent.test.ts`).
yindo added the pull-request label 2026-02-16 18:17:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12548