Skip to content

stream-json emits duplicate tool_use lifecycle events with initially empty input #310

Description

@konard

Agent CLI 0.26.0 emits one logical read call three times in stream-json with the same tool_use_id: pending as input {}, running with the full filePath, and completed with the same full input again. It emits no terminal tool_result event. The persisted session has one completed tool part and the file-time log records one read, so arguments are preserved internally; consumers that retain the first event see an empty input and consumers that treat events independently see duplicate calls. This is a narrower recurrence after issue 281 and PR 282: their regression covers an already-populated pending part, not pending to running to completed. Acceptance criteria: emit exactly one full-input tool_use per call id, emit one terminal tool_result or error event, preserve zero-argument tool semantics, and add a lifecycle integration test. Sanitized reproduction used a local OpenAI-compatible provider, read-only mode, stream-json compact output, and a request to read the first line of Cargo.toml; no credentials or secrets are included.

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