t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: XML-like tags get filtered/removed from the chat

Open AlexBabescu opened this issue 4 months ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Simple bug, I was testing if my changes in the global AGENTS.md are loaded and asked my codex agent in t3code this without reading a file, do you have <global-agent-instructions> in your context? if yes, how many times?

That messaged got rendered back to me as without reading a file, do you have in your context? if yes, how many times?

The agent received the correct instruction and replied accordingly so this bug is only visual.

Expected behavior

See the exact thing I typed: without reading a file, do you have <global-agent-instructions> in your context? if yes, how many times?

Actual behavior

without reading a file, do you have in your context? if yes, how many times?

Image

Impact

Cosmetic issue

Version or commit

0.0.28

Environment

Linux

Logs or stack traces


Screenshots, recordings, or supporting files

No response

Workaround

No response

AlexBabescu avatar Jul 16 '26 19:07 AlexBabescu

I reproduced this locally. One correction to the report: in my testing, the issue occurs in the web browser client; the desktop client rendered the XML-like text correctly.

The cause is raw HTML parsing in the Markdown renderer: an unknown XML-like tag such as <global-agent-instructions> is interpreted as HTML and removed during sanitization.

I have a local patch that renders HTML/XML-like syntax literally in user messages while preserving sanitized raw HTML rendering for assistant messages. I added regression coverage for both behaviors and confirmed in the browser that <global-agent-instructions> remains visible. The focused tests, vp check, and the full monorepo typecheck all pass. I can open a PR with the patch.

0utsights avatar Jul 18 '26 18:07 0utsights