anomalyco / anomalyco/opencode

Desktop app freezes on external-directory permission check; after restart, never-run tool call is mislabeled 'interrupted'

Open
#40,066 1 comment 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 1, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The desktop app freezes when a bash tool call triggers an external-directory permission check. The permission ask is raised and logged, but the session becomes unresponsive — no further output, no way to interact with it — and stays that way until the app is killed. Restarting recovers the session, but the tool call that never executed is then reported as "Tool execution was interrupted", which implies execution began.

Observed:

  • The freeze happened at the moment the tool call was issued (a cat > /tmp/... write followed by gh pr edit). The app was unresponsive until killed.
  • The permission ask is the last thing logged; then the log goes silent: no granted, no denied, no heartbeat, no timeout, for 12 h 12 m.
  • The tool call part stays state.status = "running" in the session DB the whole time. In my case: part prt_fbb6e0ca4001dHn4PHFGs9bsXr (time_created 1785555979428, 2026-08-01T03:46:19Z) until the next process start (2026-08-01T15:58:59Z).
  • After restart the call reads "Tool execution was interrupted". It never executed: the target file was never created and the chained gh command never ran. The resumed process logged no resolution for the ask; it was dropped, not denied.

Expected:

  • The permission ask renders as an interactive prompt and does not freeze the session.
  • An unresolved ask resolves within a bounded time (timeout, deny, log entry, part marked cancelled), or it survives the restart and is re-surfaced.
  • A call that never started is not labelled "interrupted". A state such as "not executed - permission pending/cancelled" would stop users from checking for partial side effects.
Plugins

superpowers@git+https://github.com/obra/superpowers.git

OpenCode version

Desktop 1.18.10

Steps to reproduce
  1. Open a session in the desktop app with the default permission config (no custom permission rules).
  2. Issue a bash tool call that writes to an external directory, e.g. cat > /tmp/x <<'EOF' ... EOF; rm /tmp/x.
  3. Observe: the app freezes. No output, no interactive prompt, nothing renders further.
  4. Kill and restart the app, then resume the session: the tool call reads "Tool execution was interrupted", and no side effect ever occurred (/tmp/x was never created).
Screenshot and/or share link

None

Operating System

macOS 26.6 (build 25G72)

Terminal

N/A - OpenCode Desktop app


Evidence, verbatim from log/opencode.log:

2026-08-01T03:46:33.348Z message="resolved path" arg=/tmp/pr-body.md resolved=/tmp/pr-body.md
2026-08-01T03:46:33.350Z evaluated permission=external_directory pattern=/tmp/* action.permission=external_directory action.pattern=* action.action=ask
2026-08-01T03:46:33.350Z asking id=per_fbb6e43060011Gty27gp5vktjN permission=external_directory patterns="[\"/tmp/*\"]"

Session DB (SQLite at ~/.local/share/opencode/opencode.db, table part, JSON in column data): the tool part for cat > /tmp/pr-body.md <<'EOF' ... carries state.status: "running" and is the last part written before the gap.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.