Skip to content

fix: keep partial tool output on interrupt #41

Closed

Description

@wowi42

Summary

When a running tool is interrupted (Esc), keep whatever output it produced so far and deliver it to the model marked as partial, instead of dropping it.

Why

Today a user cancel re-raises through _run_shell and the partial buffer is lost, so the next turn re-runs the command and pays for the output twice. Maki keeps partial output for bash, subagent transcripts, and scripts on interrupt.

Scope

  • bash: on cancellation, kill the process tree and return the buffered output with an "interrupted, partial output" note instead of raising
  • Runner: deliver the partial result as the tool message on user interrupt
  • Tests: cancel mid-stream, assert partial output reaches the model

Out of scope

  • Partial subagent transcripts (separate change if wanted)

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions