Skip to content

Bug report: Unexpected reference tokens appearing in assistant output #160

@lionnel8

Description

@lionnel8

We are using ChatKit with the OpenAI-hosted backend (Agent Builder workflows), with the agent model set to GPT-5.2.

Description

In some assistant responses, we observe unexpected tokens (e.g. filecite, turn4fileX) that resemble internal reference or citation markers, as shown in the image below:

Image

These tokens are rendered verbatim in the final assistant output and are visible to end users. The Show search sources option is unchecked in the agent settings in the Agent Builder.

When it happens

Based on our observations, this issue occurs when the agent retrieves or uses data from files via the File Search tool. It does not happen every time and only occurs occasionally, but when it does, the tokens appear directly in normal assistant response.

Expected behavior

Internal reference or citation markers should never be exposed to end users. Such markers should either be resolved into a supported UI representation or removed entirely from the final output when Show search sources is unchecked in the agent settings.

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