opencode
opencode copied to clipboard
fix: permission pattern mismatch for tool-output directory
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).