Skip to content

[FEATURE]: Preserve partial bash output for the model after abort #13809

Closed

Description

@jakvbs

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When a long-running bash tool call is interrupted by the user (or timeout), OpenCode currently records the interruption, but the model does not receive the partial command output that was already produced before abort.

This creates a gap between what users saw in-flight and what the assistant can reason about afterward. In practice, useful diagnostics often appear early (first stack trace, first failed test, missing env var), so losing partial output forces unnecessary reruns and slows debugging.

Current behavior

  • bash streams output while running (visible in UI/metadata updates).
  • On abort, the tool is marked interrupted/error.
  • The next model turn gets interruption/error context, but not the partial log content.

Requested behavior
On interrupted bash runs, include bounded partial output in the tool result/context with explicit incomplete markers, e.g.:

  • interrupted: true
  • complete: false
  • interruption_reason: "user_abort" | "timeout"

Why this is useful

  • Lets the assistant diagnose immediately from already-produced logs.
  • Reduces reruns of expensive build/test/e2e commands.
  • Keeps behavior transparent by marking output as incomplete.

Guardrails

  • Keep existing truncation/size limits.
  • Prefer tail-focused partial output if token budget is tight.
  • Preserve current semantics for fully completed tool calls.

Acceptance criteria

  • After aborting a bash command, the model receives partial output (bounded/truncated).
  • Partial output is explicitly marked as incomplete/interrupted.
  • No regression in tool-call/tool-result consistency.

Related context: #10670, #13338, #13589, #8497

Activity

  1. github-actions commented on Apr 18, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions