GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tool: long-running shell calls aborted with 'Tool execution interrupted', partial output lost · Issue #63752 · anomalyco/opencode

tool: long-running shell calls aborted with 'Tool execution interrupted', partial output lost #63752

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
tool: long-running shell calls aborted with 'Tool execution interrupted', partial output lost#63752
Copy link
Labels
area/coreAgent loop, tools and configplatform/macosmacOStype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@albertVel
albertVel
opened on Nov 13, 2026
Issue body actions

Summary

Long-running foreground shell tool calls (1-5 min AWS CLI scans / waits) were repeatedly aborted with Tool execution interrupted and all their output was lost, forcing the agent to re-run work.

Environment

  • opencode version: 2.2.7
  • OS: macOS (Darwin 25.6.0, arm64)
  • Terminal: VS Code integrated terminal 1.145.2 (TERM=xterm-256color, TERM_PROGRAM=vscode)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: 1 local plugin (~/.config/opencode/plugins/postman.ts)

Reproduction

  1. Start a session and let the agent run a long foreground shell command (e.g. a loop of AWS CLI calls taking several minutes, timeout set to 120-300s).
  2. While it runs, type and send a new message in the prompt (e.g. a follow-up or "status?").
  3. Observe the running tool call.

Expected Behavior

Either the running tool call finishes and the new message is queued, or the user is clearly told that sending a message will abort the running tool. Partial output collected so far should be kept.

Actual Behavior

The tool call ends with {"error":{"type":"aborted","message":"Tool execution interrupted"},"content":[]} and no partial output is returned. Happened ~8 times in one session.

Additional Context

  • Not 100% sure every abort was caused by sending a message; some may have happened without user input.
  • Workaround: running commands with background: true avoided the problem.

Activity

  1. opencodejr
    added
    area/coreAgent loop, tools and config
    platform/macosmacOS
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 13, 2026
  2. opencodejr commented on Nov 13, 2026

    @opencodejr
    opencodejrBot
    on Nov 13, 2026
    Contributor
    More actions

    Thanks for the detailed report. I couldn't reproduce the abort on 2.2.7.

    What I tried: the TUI with a simulated model. The model ran a ~25-second foreground shell loop (for i in $(seq 1 25); do echo tick-$i; sleep 1; done, timeout 300000). Partway through I typed status? and pressed Enter. The shell call kept running and finished, and the model got the full output. My follow-up was delivered after the command completed. There was no Tool execution interrupted. That matches how it is meant to work: plain Enter while OpenCode is working steers the session, and the message is picked up at the next step boundary, not by stopping the running tool. I tested on Linux, not macOS or the VS Code terminal, and without your plugin.

    On the lost output: when a shell call is interrupted, 2.2.7 discards what it had printed so far. That is tracked in #39565, and a fix (#62977) landed on dev after 2.2.7.

    To find what is stopping your calls, these would help:

    1. Around one of the aborts, did the session show a message like "The server restarted while you were working…"? Could you share the opencode.log lines from a minute before to a minute after an abort, with anything private removed? A restart of the background service would interrupt running tools without any input from you (see tui: shared service is killed after 45s of SSE silence, causing cross-session restart loops #63357, also 2.2.7 in the VS Code terminal with a plugin installed).
    2. Could an Esc keypress have reached the TUI while you typed? Esc interrupts the running work.
    3. Does it still happen with ~/.config/opencode/plugins/postman.ts temporarily removed?
    4. Did you send with plain Enter, or with Ctrl+X then Enter (queue)?

    Related issues:

    • core: interrupted tools cannot retain partial results #39565: an interrupted shell call loses its partial output (fixed on dev, not in 2.2.7)
    • tui: shared service is killed after 45s of SSE silence, causing cross-session restart loops #63357: the TUI replaces the shared background service after its event stream stalls, interrupting busy sessions
    • desktop: supervisor respawns a live local service every ~60s (reason: 'missing'), aborting every tool call #61061: the desktop app respawns its background service, aborting tool calls with Tool execution interrupted
    • server: silent service restarts within seconds of git worktree add — tool responses lost, worktree registry stale #58991: silent service restarts lose the responses of tool calls that were running
  3. opencodejr commented on Nov 13, 2026

    @opencodejr
    opencodejrBot
    on Nov 13, 2026
    Contributor
    More actions

    Closing this for now, since we haven't heard back. On 2.2.7, sending a follow-up while a long foreground shell call was running didn't abort it in my test. The command finished, the model got its full output, and my message was delivered afterwards. Without more detail I can't tell what stopped your calls. The things that would help are:

    • the opencode.log lines around an abort, and whether a "The server restarted while you were working…" message appeared
    • whether an Esc keypress could have reached the TUI
    • whether it still happens with the postman.ts plugin removed
    • whether you sent with plain Enter or with Ctrl+X then Enter

    The lost partial output after an interrupt is tracked in #39565. A fix for it (#62977) landed on dev after 2.2.7.

    If it still happens, reply here with any of those details and the issue will reopen.

  4. opencodejr
    closed this as not plannedon Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreAgent loop, tools and configplatform/macosmacOStype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.