Repository navigation
Conversation
A title derived from an agent's schedule_task prompt is cut at 80 UTF-16 code units, which can split a surrogate pair and leave a lone high surrogate that renders as a replacement character. Drop that dangling half after the cut, keeping the 80-unit limit, explicit titles and the "Scheduled task" fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This prevents broken characters in automatically generated scheduled-task titles without changing task execution or explicit titles. Because it changes the default title generated when no title is supplied, human review is required. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
# Conflicts: # apps/server/src/mcp/OrchestratorMcpService.test.ts
Main's "keeps the saved workspace when an unbound task stays unbound" test now records whole upsert inputs, like this branch's other scheduled-task tests, and compares their workspace strategy.
|
Note 🤖 Opus 5.5 replying on behalf of Victor. |
Problem
When an agent schedules a task over MCP without a title, the server names it after the prompt's first line, cut to 80 UTF-16 code units. If an emoji or other character outside the Basic Multilingual Plane straddles unit 80, the saved title should end before it, but it ends in
�, and every client that lists the task shows that.Change
After the 80-unit cut, drop a trailing lone high surrogate. The 80-unit limit, explicit titles and the
Scheduled taskfallback for a blank first line are unchanged. A first line that is nothing but a lone surrogate now falls back toScheduled taskrather than saving the surrogate.Scope
A bug fix for wrong saved data: a truncation that splits a surrogate pair and stores a broken character. There is no issue or discussion, since this is a very small, focused fix of an obvious bug in one expression of the MCP
scheduleTaskdefault-title path. It does not change title limits or add grapheme-aware truncation.Verification
To see it in the web client:
schedule_taskwith no title and the promptCheck the nightly build, list all of the new test failures, and post a summary 🚀 to the team.mainthe title ends in�; on this branch it ends after "summary".I ran that with a small scripted MCP client (no agent, no model call) on today's
main(2b07556), this branch (b445770) and the previous head 6a96eea, in that order, each on a fresh isolated server, in the web client and on iOS and Android. Onmainevery client shows the title ending in�and the database holds 80 units ending inEF BF BD; on this branch and on 6a96eea the title ends after "summary". The unit test "titles an emoji split by the limit" fails withmain'sOrchestratorMcpService.tsand passes on this branch.main2b07556Stored titles, method, tests and the merge
The stored title, read back from the server's database in read-only mode. Today's
main(2b07556):This branch (b445770):
6a96eea:
schedule_taskonce with no title; the prompt's first line puts🚀at units 79–80. The web client is each revision's own build. The phones run today'smainapp against each revision's server, since the change is server-only. Phone input went through the T3 Device panel, web through the T3 Browser panel. b445770 merges cleanly with 2b07556 (git merge-tree).vp test run src/mcp/OrchestratorMcpService.test.ts(fromapps/server, Node 26.12.1) on b445770: 75 passed. Withmain'sOrchestratorMcpService.tsunder the same tests, only "titles an emoji split by the limit" fails: it receives the 79 ASCII characters followed by a broken character instead of the 79 characters alone.vp run check:changedpasses on b445770.main(dbfbe39):main's newer test "keeps the saved workspace when an unbound task stays unbound" uses the scheduled-task test helper this branch changed, so it now reads the workspace strategy from the recorded upsert inputs. That test file is the only difference from git's automatic merge.mainand this branch comes frommain's fix(scheduler): show short server timezone on fixed-time labels #23111 (server time zone on fixed-time labels), which 6a96eea predates.Not checked: a real agent calling
schedule_task; the desktop app and other browsers in this run; tunnel and relay connection modes, though the title is server data and travels unchanged; iPad layout. A cut that lands just after a space still leaves that trailing space, as it did before; this change does not alter that.Prior PRs
Generated with Claude Opus 5.5 and GPT-6.1 Terra and GPT-6.1 Sol in T3 Code Nightly