You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Permission check for tool-output directory never matches, causes hang in headless mode #7876
When running in headless/automated mode (e.g. ralph loops), opencode hangs indefinitely when trying to read truncated tool output.
The issue is in agent.ts - the allow rule for Truncate.DIR uses the directory path directly, but external-directory.ts creates patterns with /* appended. The wildcard matching fails and falls through to "ask", which hangs without a UI.
While #7758 was closed and focused on a different directory access pattern, both issues involve permission rule matching for internal opencode directories. The root cause in #7758 involved pattern matching logic and containment checks that might have similarities to the wildcard matching issue described here.
Feel free to ignore if your specific case (tool-output directory pattern mismatch with wildcards) is distinct from that closed issue.
Activity
github-actions commentedon Jan 11, 2026
This issue might be related to a previously reported problem:
While #7758 was closed and focused on a different directory access pattern, both issues involve permission rule matching for internal opencode directories. The root cause in #7758 involved pattern matching logic and containment checks that might have similarities to the wildcard matching issue described here.
Feel free to ignore if your specific case (tool-output directory pattern mismatch with wildcards) is distinct from that closed issue.
rekram1-node commentedon Jan 13, 2026
I did a tweak that was kinda ugly that I think fixes this
TomLucidor commentedon Jan 20, 2026
Directory issues and other tool call bugs are always annoying ngl, maybe there are ways to fuzzy-checking them beforehand?
dhowe commentedon Mar 22, 2026
status?
github-actions commentedon May 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.