Skip to content

[Bug] Local lifecycle closes surface as failed tool cards #898

@Astro-Han

Description

@Astro-Han

What happened?

Active assistant runs can be interrupted by local lifecycle actions and then surface as failed tool cards. This looks like a tool failure even though the tool did not fail and, in the captured cases, did not actually start running.

Two local session exports show the same broad failure class with different lifecycle triggers:

  • pawwork-session-silent-eagle-2026-05-25-06-42-28-tool-execution-aborted.json

    • App version: 0.0.0-prod-202605201754
    • Classification: local_instance_reload
    • Lifecycle: instance_reload
    • Tool state: bash input was fully materialized, tool_call_seen: true, tool_execution_started: false
    • UI text: Tool execution aborted
  • pawwork-session-calm-river-2026-05-25-06-59-38-Tool call generation interrupted before the tool ran..json

    • App version: 0.0.0-prod-202605241640
    • Classification: local_instance_dispose
    • Lifecycle: instance_dispose_all
    • Origin: settings.provider.connect -> POST /global/dispose -> Instance.disposeAll()
    • Tool state: tool input generation started but did not complete, tool_call_seen: false, tool_execution_started: false
    • UI text: Tool call generation interrupted before the tool ran.

This is distinct from a provider/network stream disconnect. The captured failing traces have provider progress, no watchdog timeout, no provider error event, no tool error result, and no tool execution start.

Which area seems affected?

Model harness, prompts, tools, or session mechanics

How much does this affect you?

Breaks an important workflow

Steps to reproduce

  1. Start an assistant run that is preparing or about to run a tool.
  2. Trigger a local lifecycle action while the run is active. Captured examples:
    • Reload the active project instance.
    • Connect a provider from settings, which calls global.dispose() with client action settings.provider.connect.
  3. Return to the active session timeline.
  4. See the active assistant turn marked interrupted with a failed tool card.

What did you expect to happen?

Local lifecycle closes should be presented as local app/session interruptions, not as tool failures. If a tool never started, the UI should make that clear and the incident classification should guide the user toward the local lifecycle trigger.

PawWork version

Observed on:

  • 0.0.0-prod-202605201754
  • 0.0.0-prod-202605241640

OS version

Observed on macOS / Darwin:

  • 25.4.0
  • 25.5.0

Can you reproduce it again?

Sometimes

Diagnostics

Relevant code paths from the local investigation:

  • packages/opencode/src/session/processor.ts maps interrupted tool parts to Tool execution aborted, Tool call was prepared, but the tool did not run before the interruption., or Tool call generation interrupted before the tool ran. based on interruption phase.
  • packages/opencode/src/session/run-observability/recorder.ts classifies lifecycle scope closes as local_instance_reload or local_instance_dispose.
  • packages/app/src/components/dialog-connect-provider.tsx calls global.dispose() with settings.provider.connect.
  • packages/opencode/src/server/instance/global.ts handles /global/dispose by calling Instance.disposeAll().

The key product problem is not whether the run was correctly aborted internally. It is that local lifecycle aborts currently surface to users as failed tool cards, making them look like command/tool failures or generic connection failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityappApplication behavior and product flowsbugSomething isn't workingharnessModel harness, prompts, tool descriptions, and session mechanics

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions