Problem
Mobile's Agents sheet titles a subagent that has no title of its own from its prompt, in rowTitle in apps/mobile/src/features/threads/threadAgentsPresentation.ts. A prompt longer than 80 UTF-16 code units is cut at 77 units and gets .... When an emoji straddles that cut, the slice keeps only the emoji's high surrogate (U+D83D for 😀). The title then ends in a replacement character (�) right before the ..., where it should end on the last whole character before the emoji.
Where the broken end shows:
- The Stop confirmation dialog, whose message is
Stop <title>?.
- The Stop button's VoiceOver label,
Stop agent <title>.
The row in the sheet uses the same title, but it is one line shared with the status, the elapsed time and the Stop button. On a phone it cuts the title off with … well before the 77th unit, so the row looks the same before and after this fix. Rows of subagents that have a title, workflow member rows (built with an empty prompt) and the workflow Stop dialog (which names the workflow) are not affected. This PR changes mobile only.
Expected: the cut never splits a surrogate pair, as #29163 and #29563 do for thread titles.
Change
When the cut would land between a high and a low surrogate, it steps back one unit. That is the check #29563 added to t3 thread start titles and #29163 added to create_threads titles. The 80-unit limit, the ... suffix and every title without a split emoji are unchanged.
Scope and approval
This is a very small, focused fix for an obvious bug. It is the defect #29563 ("t3 thread start titles no longer end in a broken character") and #29163 ("create_threads titles no longer end in a broken character") fixed in the server's title copies, still present in mobile's own title cut for untitled subagents. It applies their check and changes no other behaviour, setting or contract.
packages/client-runtime/src/state/subagentRuntime.ts:205 has a separate copy of the same cut (80-unit limit, cut at 77, ...) for the runtime subagent title. Web's thread relationships control falls back to it when a subagent's thread has no title, and mobile builds its workflow groups from the same runtime list. I have not confirmed where that cut title shows. I kept it out of this PR so each PR fixes one site, as #29158, #29163 and #29563 did. No open PR changes that cut.
Overlap check, by rowTitle, threadAgentsPresentation and by file. #24968, #27189 and #30249 change threadAgentsPresentation.ts, but none touches rowTitle. #30249's hunk at lines 48 to 54 sits just above it. #24968 also rewrites the test file whole. #24611 changes the shared truncate, which this function does not call.
Verification
apps/mobile/src/features/threads/threadAgentsPresentation.test.ts gets one assertion in its existing falls back to a trimmed prompt when the agent has no title case. It titles a prompt of 76 xs followed by 😀, so the emoji sits on the cut.
On main with only the test commit (e4b3bbd), from apps/mobile, vp test run src/features/threads/threadAgentsPresentation.test.ts:
FAIL |unit| src/features/threads/threadAgentsPresentation.test.ts > resolveSubagentRowPresentation > falls back to a trimmed prompt when the agent has no title
Expected: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..."
Received: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx�..."
Tests 1 failed | 26 passed (27)
The � in Received is the lone high surrogate U+D83D.
With the fix:
vp test run src/features/threads/threadAgentsPresentation.test.ts in apps/mobile: 27 tests passed.
vp run check:changed from the repo root: format, lint, knip, typecheck (2 packages), tests (2 files) and the React Compiler check all pass.
To see it in the app: on mobile, open a thread where the agent started a subagent that has no title, with a prompt of 76 ASCII characters followed by an emoji and more text. While it runs, tap the agents segment of the floating control above the composer to open the Agents sheet, then tap the subagent's Stop button. On main the dialog's Stop <title>? message has the title end in a replacement character and then .... With the fix it ends on the last ASCII character and then .... VoiceOver reads the Stop button's label the same way.
What I could not check: the dialog on a device, or which providers report a subagent with no title. The test covers the row presentation function the dialog and the label read. Like #29163 and #29563, the cut works per code point, so it can still split a grapheme cluster such as a flag, a skin-tone modifier or a ZWJ sequence; it never leaves a lone surrogate. Hermes has no Intl.Segmenter, so a grapheme-aware cut is not available on mobile without a new dependency.
Bug: an untitled subagent row on mobile ends in a broken character when an emoji sits at the cut
This was written with Claude Opus 5.5 in Claude Code, driven from T3 Code.