Skip to content

[Bug]: Raw internal tool-call metadata leaks into visible assistant message content #1147

@gmackie

Description

@gmackie

Describe the bug

In a long tool-heavy chat, the assistant started rendering raw internal tool-call metadata directly into the visible assistant response.

Instead of only natural-language output, the message included serialized fragments that look like internal tool invocation payloads.

Expected behavior

Internal tool-call data should never appear in the visible assistant message.

Only the assistant’s final text should be rendered.

Actual behavior

The rendered assistant message included snippets like:

to=functions.exec_command ... {"cmd":"date +%s","workdir":"/Volumes/dev/edgeOps","yield_time_ms":1000,"max_output_tokens":200}
assistant to=functions.exec_command մեկնաբանություն 付款json {"cmd":"date +%s","workdir":"/Volumes/dev/edgeOps","yield_time_ms":1000,"max_output_tokens":200}
still to=functions.exec_command մեկնաբանություն leakingjson {"cmd":"date +%s","workdir":"/Volumes/dev/edgeOps","yield_time_ms":1000,"max_output_tokens":200}

There were also repeated garbled fragments around these payloads, e.g.:

to=functions.exec_command մեկնաբանություն ...

This content was appended to otherwise normal assistant replies.

Reproduction

I don’t have a minimal repro yet, but this happened consistently in a long conversation with many assistant/tool turns.

Observed pattern:

  1. Long thread
  2. Repeated tool usage
  3. Assistant response starts normally
  4. End of response includes raw tool-call payload text
  5. Same issue repeats in later messages

Environment

  • Repo/app: pingdotgg/t3code
  • Browser: unknown
  • OS: macOS
  • App version / build: 0.0.11 (876bbd715ae6)

Impact

High. This leaks internal implementation details into user-visible content and breaks trust in the response stream.

Possibly related

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