Skip to content

[Upstream #220] Duplicate/empty assistant responses and duplicated tool calls in active session #164

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodeIssue #220 by @capt-marbles
Original state: open
Created: 2026-05-15T19:11:33Z · Updated: 2026-05-15T19:11:33Z
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


Summary

During an active Jcode session, the UI/transcript began showing duplicate assistant messages and duplicate tool invocations. Some user-visible responses appeared empty or repeated, even though the underlying tool actions completed successfully.

This happened after a long session with many tool calls while working in /Users/awalker/trading-bot.

Symptoms observed

  • Assistant progress/final messages appeared twice.
  • Some responses looked blank/empty to the user.
  • Tool calls were duplicated in the transcript, for example the same todo, bash, grep, and read calls appeared twice around the same action.
  • The duplicated calls sometimes both executed, so this can be dangerous if the tool action is not idempotent.
  • A paper-trading close operation was protected by explicit user approval and completed correctly, but surrounding messages/tool calls showed duplication artifacts.

Example from session

Around the sequence:

  1. User: close CSCO paper position
  2. Assistant progress message appeared twice.
  3. The same close/verification bash blocks were emitted twice in the transcript, though only the successful output was shown once.
  4. Later user asked: why the empty answers?
  5. Assistant final answer was duplicated.

Also happened earlier with messages like:

  • I’ll build the manual promotion bridge now... repeated twice.
  • Built and committed advisory transition planning... repeated twice.

Expected behavior

  • Each assistant message should render once.
  • Each tool call should execute once unless explicitly invoked multiple times.
  • If the UI loses a message, it should not show an empty assistant response.

Impact

Potentially high because duplicate tool execution can be unsafe for non-idempotent operations such as trading, file mutations, emails, or external API actions.

Environment

  • OS: macOS arm64
  • Jcode version: v0.12.1 f6ce4fd
  • Working directory: /Users/awalker
  • Date: 2026-05-15 UTC

Related issue

Possibly related to earlier session/runtime instability reported in #218.

Notes

I can provide a transcript excerpt or diagnostics bundle if useful.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions