Trailing mojibakes + internal turn artifacts in Codex agent reply

Open Beginner friendly
#33,489 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend, desktop

Research direction

Read CodexAdapterV2.ts around lines 5280–5284 and trace how item.text reaches the desktop renderer. Check the existing handling for t3-citation:// and Codex directives, then find the relevant provider or rendering tests. Done means Codex-native citeturn/view markers and 【turnXviewY】 tokens no longer appear in user-visible replies while meaningful text remains intact.

Written by the indexing model from the issue text.

Description

via-triage
What happened

Trailing Private-Use-Area (PUA) glyphs and internal Codex turn-view artifacts leak into the user-visible chat text on the desktop app after Codex agent sessions. The rendered text shows markers such as:
citeturn918416view0turn291398view2
These artifacts appear sometimes in regular chat with a Codex-backed agent, always trailing the meaningful text, and are made up of internal provider identifiers that should have been stripped before display.

Diagnosis

Source: The markers originate from the Codex app-server provider, not T3 Code's own citation system. They come from two sources within the Codex protocol:
(1) item/completed agent message events wrapped in PUA sentinels containing tokens citeturn<N>view<V> (e.g., citeturn918416view0, turn291398view2). These appear in provider event logs like events.mcp-launch-cf7cfe43c61cf9092fe657358db496313e10d4c34dc67362ea4548885879ea41.log:4014.
(2) MCP tool-call result text — e.g., 【turn141338view0】 from web/browse tool outputs. These appear in logs like events.mcp-launch-561cae086a4946b04164cb05a82358c59c50dba226fd45362a693a6812d8b126.log:1002.

Why they leak: In CodexAdapterV2.ts:5280-5284, the server passes Codex's raw item.text straight through with no stripping of provider-internal markers. The client-side renderer only handles T3 Code's own t3-citation:// citations and Codex codex-file-citation / artifact-template / codex-followup directives. It does not strip Codex's native citeturn/view or 【turnXviewY】 syntax, so they render verbatim.

Steps to reproduce
  1. Start a Codex agent session on the desktop app (local server connection)
  2. Chat with the agent for any length of time
  3. Observe agent replies — trailing garbled PUA glyphs and citerviewview / 【turnXviewY】 tokens appear appended to or embedded in the message text
  4. No deterministic trigger — happens intermittently, but consistently in Codex sessions
Version

T3 Code nightly v0.1.8-nightly.20261109.4399

Environment

OS: Windows 11 Pro, Node v24.22.1, triage CLI version 0.1.8-nightly.20261109.4399, server process running at http://127.0.0.1:3773, connecting the desktop app to a local server

Evidence
- `events.mcp-launch-cf7cfe43c61cf9092fe657358db496313e10d4c34dc67362ea4548885879ea41.log:4014` — `turn918416view0`, `turn291398view2`, `turn564001view0`, `turn345183view4` all in one `item/completed` agent message event
- `events.mcp-launch-561cae086a4946b04164cb05a82358c59c50dba226fd45362a693a6812d8b126.log:1002` — `turn974882search0`, `turn141338view0` from MCP search tool results
- `events.f92e11fb-7e1a-47eb-abce-f636c7dc0f7d.log:2940` — `turn275451search1` from another Codex session
Related issues

No response

Fix applied or workaround

None known — this is a rendering bug in the client's text pipeline where Codex provider-internal markers are not filtered before display.

Filed by

claude (sonnet-5) via t3 triage

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
13h 9m
Merged PRs (30d)
187

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.