Skip to content

tui3: consumed steering retains abandoned tool payload and leaks update marker #1609

Closed

Description

@santoshkumarradha

What happened

On 2026-09-27, PR #1607 revision c74a37b067c3b8c4ed80c832809a8f5e8e5b1a9a left unfinished streamed write arguments visible after a user correction. The next intended-human update appeared with a literal [update] prefix. Observed during a real expense CLI build in tmux on Spark using deepseek/deepseek-v4.1-flash.

Replication

Field (real model). Build that revision with make build, then run bin/codeaf chat --model deepseek/deepseek-v4.1-flash --one-model --no-host with an OpenRouter key. Ask it to build a Python expense CSV CLI with tests. While it is streaming a write call, send a correction asking for Decimal arithmetic and a 0.10 + 0.20 regression. The abandoned partial write can remain visible; a subsequent [update] reply can retain its protocol marker. This requires interrupting tool argument streaming, rather than waiting until a command is executing.

Deterministic regression to add. Feed an assistant prefix and a forming tool into the shared feed reducer, then consume steering and start a new explicitly marked update. Assert the abandoned forming call disappears, the marker is stripped, and the user correction plus intended-human content remain.

Where

The shared feed reducer handles EventSteerConsumed without resetting the update-prefix parser or removing abandoned forming calls. The engine journal already drops the interrupted tool.

The fix

Treat consumed steering as a response boundary: preserve real human-facing content and actual executed tools, discard only abandoned non-executed calls, and parse the next response independently.

Acceptance

  • e2e: A real multi-turn tmux build with steering during tool argument streaming retains the correction and intended-human updates, shows no literal protocol prefix, and leaves no abandoned tool payload after settling.
  • e2e: Actually run the built artifact and preserve a continuous recording with the exact tested revision and model audit.
  • Unit: Exercise the consumed-steering reducer boundary, including preserving executed tools and interrupted intended-human content.
  • Update the PR change entry and relevant manual description if the documented behavior changes.

Related: #1605 and PR #1607. This was found during the additional sustained workflow acceptance requested for that PR.

Activity

  1. added
    bugSomething the code does that it should not
    area:chatThe v3 surface a person sits in front of (internal/tui3)
    on Sep 27, 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:chatThe v3 surface a person sits in front of (internal/tui3)bugSomething the code does that it should not

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions