Repository navigation
fix(server): run_scheduled_task_now returns why a started run failed - #37149
Conversation
The tool's response dropped lastRunError when a run started but its dispatch failed (threadId: null, lastRunStatus: "failed"). The field already exists on the task and is already a plain message with no stack trace. Pass it through.
…duled-task-start-error
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The tool now returns the task's recorded failure reason alongside its run status. This additive diagnostic field leaves existing access controls and scheduling behavior unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…art-error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b908ce6 to
3eb1c85
Compare
EvidenceCreate Demo and a paused Claude Haiku 5.5 task scheduled every 15 minutes, with a new thread each run in the project checkout. With Claude disabled, call list_scheduled_tasks and run_scheduled_task_now once through the real MCP endpoint. Capture Settings and display the actual MCP structuredContent in a replay thread. The full-access MCP client replaces the reporter's paid Codex caller; Claude is disabled in startup settings rather than toggled manually. Proven: scenarios:prove exited 0. Base omits lastRunError; head returns the recorded reason alongside lastRunStatus: failed and threadId: null. Environment on both sides: Chromium, 1280×800, light theme, fresh synthetic data, real server.
|
…ingdotgg#37149) Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit def4cd4)
**v0.1.10-nightly.20261115.4736** · 95 changes from 43 contributors - **Large terminal pastes.** Paste large amounts of text into the terminal without the paste being rejected. - **Faster Codex skills.** Codex skills appear faster when opening or switching workspaces. - **Faster long threads.** Long threads open about 2.5 times faster. - **Image attachments.** Distinct pasted images with matching attachment details are no longer silently collapsed into one. - **Selected-file commits.** Committing selected files preserves merge conflicts in other files. - **Long-lived drafts.** Images in older drafts are recovered before sending if their uploads have expired. - **Optional questions.** Submit agent questions without filling in optional text fields. ### Plus 82 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * fix(web): sidebar edge uses the same resize cursor as side panels by @tenyoru in pingdotgg/t3code#33083 * fix(web): attach command palette threads outside the sidebar by @Yash-Singh1 in pingdotgg/t3code#37054 * fix(server): status reports no branch while a clone has not checked out HEAD by @juliusmarminge in pingdotgg/t3code#37041 * perf(scripts): check:changed on Windows no longer spends minutes walking node_modules (2,500 s → 5.0 s) by @Pyseph in pingdotgg/t3code#32023 * perf(web): answering a question no longer re-renders the whole chat view by @OmarAlex24 in pingdotgg/t3code#32324 * perf(server): command palette status rows skip the Changes totals they never show by @Yuruzuu in pingdotgg/t3code#32351 * fix(web): PR file order follows alias imports of dotted modules by @jancuk in pingdotgg/t3code#32364 * fix(acp): a failed MCP-over-ACP disconnect can be retried by @notzenco in pingdotgg/t3code#33069 * fix(web): settle check lines up with row timestamps by @sergiiopm in pingdotgg/t3code#33053 * fix(provider-core): handoff work reserve fits small context windows by @MiaAI-Lab in pingdotgg/t3code#32598 * fix(mobile): video previews survive re-signed URLs and a late-attached player item by @bartlomiejbloniarz in pingdotgg/t3code#32196 * fix(mobile): honor Android clock format in message timestamps by @razzeee in pingdotgg/t3code#33078 * fix(shared): .localdomain hosts no longer leak to the favicon service by @mrlufepines in pingdotgg/t3code#32657 * fix(web): collapsing Electron main no longer hides the backend server by @thepradipvc in pingdotgg/t3code#32619 * test: remove duplicate client call-site coverage by @t3-code-bot[bot] in pingdotgg/t3code#36776 * fix(github): pull request activity reports a rate-limited review-thread read instead of hiding its threads by @only21mil in pingdotgg/t3code#32620 * fix(web): stacked composer banners no longer show dark seam bands by @Pulsar-Programmer in pingdotgg/t3code#32683 * fix(web): draft images keep their order after a reload by @only21mil in pingdotgg/t3code#32709 * fix(web): open PDF links in the file viewer by @Yash-Singh1 in pingdotgg/t3code#37064 * fix(server): a selected-file commit keeps other files' merge conflicts by @only21mil in pingdotgg/t3code#33115 * fix(web): a file opened from a diff in a project folder inside a repository opens that file by @Entrpi in pingdotgg/t3code#32684 * test(web): ACP project picker test waits for the popup to take focus by @seancarnahan in pingdotgg/t3code#33061 * fix(web): stop held dictation when shortcut modifiers are released by @mrlufepines in pingdotgg/t3code#32648 * perf(web): resting on a PR row also reads its activity, so the timeline shows on click by @Bil0000 in pingdotgg/t3code#32842 * fix(server): agents can see whether a thread is pinned by @shadizx in pingdotgg/t3code#32727 * fix(server): a pushed commit no longer reports failure when the final git status read fails by @only21mil in pingdotgg/t3code#32705 * test(web): the streaming render scenario gives the timeline stable props by @Entrpi in pingdotgg/t3code#32792 * fix(web): HTML file previews use the current canvas color by @Yash-Singh1 in pingdotgg/t3code#37072 * fix(web): an image-only send that fails behind a new draft now says so by @only21mil in pingdotgg/t3code#32732 * fix(assets): align app icons and retain a folder placeholder while loading by @Yash-Singh1 in pingdotgg/t3code#37067 * fix(github): pull request activity says when its comments were cut by @only21mil in pingdotgg/t3code#32707 * test(github): activity mock sets the new truncated flag by @juliusmarminge in pingdotgg/t3code#37078 * fix(server): a branch's own pull request shows past a hundred same-named fork pull requests by @only21mil in pingdotgg/t3code#32796 * fix(server): an effect this build can't read no longer blocks its thread's later work by @only21mil in pingdotgg/t3code#32746 * fix(acp-registry): a failed agent install no longer floods provider status with its whole log by @only21mil in pingdotgg/t3code#32800 * fix(web): terminal reports focus changes to programs that request them by @StiensWout in pingdotgg/t3code#37066 * fix(web): remove redundant subagent action from background row by @Yash-Singh1 in pingdotgg/t3code#37079 * fix(web): a side chat's subagent opens its parent as a side chat tab, not a bare page by @Yuruzuu in pingdotgg/t3code#32907 * fix(shared): inline code paths like `docker/Dockerfile` become file chips by @felixlaga in pingdotgg/t3code#32402 * fix(web): Esc in Clerk's account modal no longer closes Settings by @thepradipvc in pingdotgg/t3code#32859 * fix(mobile): show thread sync status in the header, not above the composer by @juliusmarminge in pingdotgg/t3code#37076 * fix(mobile): undo toast lines up with the folded Duo's tab bar by @juliusmarminge in pingdotgg/t3code#37081 * fix(desktop): Stable switch no longer tells policy-blocked nightly apps to reinstall by hand by @only21mil in pingdotgg/t3code#32609 * fix(web): live dictation transcript keeps the newest words in view by @SharoonRafeek in pingdotgg/t3code#32960 * fix(server): preserve shell paths containing spaces and dashes by @StiensWout in pingdotgg/t3code#37069 * perf(server): batch terminal output that arrives within 2 ms by @juliusmarminge in pingdotgg/t3code#37060 * perf(desktop): WSL preflight starts the staged runtime once instead of twice by @juliusmarminge in pingdotgg/t3code#37052 * fix(mobile): worktree setup shows in the chat from the first moment by @juliusmarminge in pingdotgg/t3code#37084 * fix(server): an MCP pin lands at the top of the Pinned section by @xwchen in pingdotgg/t3code#33978 * fix(mobile): keep Diagnostics and Client Storage content above floating tabs by @j-gaertig in pingdotgg/t3code#32821 * fix(acp-registry): observe delayed model discovery and avoid stale cache lock by @hxbib in pingdotgg/t3code#33170 * test(web): Settings Esc test waits for the modal's initial focus by @juliusmarminge in pingdotgg/t3code#37089 * fix(claude): keep monitor threads waiting between updates by @Yash-Singh1 in pingdotgg/t3code#37085 * fix(mobile): the iPhone Duo's sidebar list ends above its tab bar in portrait by @juliusmarminge in pingdotgg/t3code#37091 * fix(web): switching providers no longer drops the thread's stored effort by @only21mil in pingdotgg/t3code#33090 * fix(mobile): PR activity filter remembers bot and resolved visibility by @juliusmarminge in pingdotgg/t3code#37096 * fix(web): terminal links open bare compiler filenames by @StiensWout in pingdotgg/t3code#37071 * fix(acp): optional text questions can be left blank by @shivamhwp in pingdotgg/t3code#36997 * fix(shared): MCP apps that fall back to a blob: frame no longer render blank by @u9g in pingdotgg/t3code#32129 * fix(shared): keep coalescing workers alive when processors throw by @luke2x in pingdotgg/t3code#32178 * fix(server): an empty Antigravity MCP config still allows text generation by @saphid in pingdotgg/t3code#36496 * perf(server): active thread reads filter on the archived_at column by @mahirozdin in pingdotgg/t3code#28992 * perf(resource-monitor): look up external process identities by PID by @hieu-lee in pingdotgg/t3code#31202 * fix(server): accept ASCII whitespace in base64 image payloads by @darshmahadevia in pingdotgg/t3code#31798 * perf(server): Codex skills for four workspaces load in a median 138 ms instead of 1,657 ms (12x) by @Yuruzuu in pingdotgg/t3code#33972 * fix(web): recover expired composer uploads before sending by @Adamulek123 in pingdotgg/t3code#32910 * fix(server): content search recovers after a slow first index by @ItsThierry in pingdotgg/t3code#33138 * fix(terminal): show shell startup failures across attachments by @StiensWout in pingdotgg/t3code#37088 * perf(server): long threads open about 2.5x faster by @valuin in pingdotgg/t3code#34014 * fix(mobile): inline markdown images page through their message's images by @juliusmarminge in pingdotgg/t3code#37117 * fix(mobile): /model suggestion opens the model picker by @StiensWout in pingdotgg/t3code#37109 * fix(desktop): release cancelled Codex callback listeners during browser launch by @romil-bijarnia in pingdotgg/t3code#29734 * perf(server): skip compression for the desktop's local connection by @voltcrash in pingdotgg/t3code#30832 * fix(server): outside MCP clients stop being offered thread-bound tools by @RVZO6 in pingdotgg/t3code#32764 * fix(ssh): preserve literal home paths in Include expansion by @Lucenx9 in pingdotgg/t3code#33288 * fix(server): finish closed terminal kills before shutdown by @StiensWout in pingdotgg/t3code#37113 * fix(web): keep distinct images with matching attachment metadata by @StiensWout in pingdotgg/t3code#37116 * fix(web): large terminal pastes reach the program intact by @StiensWout in pingdotgg/t3code#37103 * fix(server): settling a thread keeps exec and foreground Bash terminals open by @juliusmarminge in pingdotgg/t3code#37125 * fix(codex): keep browser access prompts available in full access by @Yash-Singh1 in pingdotgg/t3code#37104 * fix(web): open terminal file links naming the server hostname by @StiensWout in pingdotgg/t3code#37133 * fix(mobile): recheck the current branch before selecting it by @StiensWout in pingdotgg/t3code#37121 * fix(acp): wait for session/load to reply before prompting by @shivamhwp in pingdotgg/t3code#37139 * fix(web): terminal mouse reports hit the drawn cell by @StiensWout in pingdotgg/t3code#37148 * fix(server): run_scheduled_task_now returns why a started run failed by @SouthCarpet in pingdotgg/t3code#37149 * fix(azure-devops): pull request titles like `@notes.txt` are saved as typed by @juliusmarminge in pingdotgg/t3code#37110 * fix(web): Sharing & access can select a desktop-local WSL backend by @juliusmarminge in pingdotgg/t3code#37151 * fix(mobile): pasted GIFs on iOS keep their animation by @StiensWout in pingdotgg/t3code#37143 * fix(acp): Copilot's reply after a background agent wakes it opens a continuation run by @juliusmarminge in pingdotgg/t3code#37159 * fix(shared): ß no longer splits words in generated folder and branch names by @lowlyleon in pingdotgg/t3code#37152 * fix(server): name the missing project when a change request's repository has none by @Sidreyas in pingdotgg/t3code#37161 * fix(server): an oversized provider request reads as too large, not raw 413 HTML by @Sidreyas in pingdotgg/t3code#37156 * fix(provider-acp): Grok early task completion no longer replaces the child's answer by @juliusmarminge in pingdotgg/t3code#37162 * fix(web): keypad navigation works with NumLock off by @StiensWout in pingdotgg/t3code#37175 ## New Contributors * @tenyoru made their first contribution in pingdotgg/t3code#33083 * @mrlufepines made their first contribution in pingdotgg/t3code#32657 * @thepradipvc made their first contribution in pingdotgg/t3code#32619 * @Pulsar-Programmer made their first contribution in pingdotgg/t3code#32683 * @seancarnahan made their first contribution in pingdotgg/t3code#33061 * @shadizx made their first contribution in pingdotgg/t3code#32727 * @SharoonRafeek made their first contribution in pingdotgg/t3code#32960 * @xwchen made their first contribution in pingdotgg/t3code#33978 * @j-gaertig made their first contribution in pingdotgg/t3code#32821 * @hxbib made their first contribution in pingdotgg/t3code#33170 * @ItsThierry made their first contribution in pingdotgg/t3code#33138 * @lowlyleon made their first contribution in pingdotgg/t3code#37152 **Full Changelog**: pingdotgg/t3code@v0.1.10-nightly.20261115.4723...v0.1.10-nightly.20261115.4736 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.10-nightly.20261115.4736




claude-sonnet-5-5 on behalf of SouthCarpet
Problem
When a scheduled task's run starts but its dispatch fails,
run_scheduled_task_nowreplies{ taskId, threadId: null, lastRunStatus: "failed", runCount, nextRunAt }. The server already stored a reason intask.lastRunError(apps/server/src/scheduledTasks/ScheduledTaskService.ts:1112and:1132), but the tool's success schema (apps/server/src/mcp/toolkits/thread/tools.ts) has no field for it and the handler (apps/server/src/mcp/toolkits/thread/handlers.ts) does not read it. An agent that calls the tool sees onlythreadId: nulland cannot tell why the run failed.This is a different gap from #25647. That PR covers a refused call, where the tool returns an error. This PR covers the success path, where the run started and then failed.
Change
tools.ts: addlastRunError: ScheduledTask.fields.lastRunErrortoScheduledTaskRunTool.success. It reuses the existing nullable string field ofpackages/contracts/src/scheduledTask.ts:261.handlers.ts: returntask.lastRunErrorin the reply.No change to the contracts package, to settings or to who may call the tool.
What text this returns
lastRunErroris free text and this PR does not filter it.ScheduledTaskService.ts:1112stores the result ofdispatchErrorMessage(:370-376). For a direct orchestration refusal with a string cause, that is the user-facing text of the refusal when one exists (#32115). In every other case it squashes the failure cause and storesError.message, orString(failure)for a value that is not anError(:365-368).ThreadLaunchService.ts:134-158,ThreadManagementService.ts:219-371). One exception:ThreadManagementWorktreeRestoreError(ThreadManagementService.ts:326-337) puts the message of its cause into its own message.OrchestratorCommandPreviouslyRejectedError(Orchestrator.ts:339-350) adds a free-textdetailtaken from a stored receipt error.ScheduledTaskService.webhook.test.ts:1387-1415shows this on the real service: an injectedError("injected start failure")is stored verbatim.The same stored field is already rendered to a connected UI user in web settings (
ScheduledTasksSettings.tsx:809) and mobile settings (SettingsScheduledTasksRouteScreen.tsx:1579-1581). With this PR the text also enters the context of the calling agent. The tool keeps its existing access policy unchanged (McpToolAccess.writesEnvironment: a full-access runtime and the default interaction mode). I make no claim that the text is sanitized. #29889 removed stack traces from it.Scope and approval
No prior issue. This uses the route for a very small, focused fix of an obvious bug in
CONTRIBUTING.md: two added source lines copy a field that the server already computes into an existing reply. The sibling fix #25647, for the refusal path of the same tool, states the same route in its own "Scope and approval" section, has no closing issue reference, and was merged on 2026-11-01.Size: 50 changed lines in 3 files. Without the test file, 2 changed lines.
Verification
run_scheduled_task_now reports why a started run failed to dispatchinapps/server/src/mcp/toolkits/core.test.ts. It calls the real tool registration throughMcpServer.callToolwith a mockedScheduledTaskService. It proves that the reply forwards the stored field. It does not prove what text a real failure stores; the section above covers that by source reading and by the existing webhook test, and the evidence below shows one real failure.lastRunError. With the lines restored it passes.vp test run apps/server/src/mcp/toolkits/core.test.ts: 26 passed.vp run check:changed e101cae1b9: format, lint, knip, graphql, typecheck (3 packages) and tests pass.lastRunErrorto this reply. fix(server): retain scheduled dispatch refusal reasons #32115 (merged 2026-11-15, on this base) changes the content oflastRunErrorfor one case and leaves the MCP schema alone. fix(server): scheduled runs record how their turn ended #23131 (open) addslastRunErrorto thelist_scheduled_taskssummary and does not change this reply. fix(server): scheduled tasks record runs that fail after dispatch #31366 (closed as a duplicate of fix(server): scheduled runs record how their turn ended #23131) held the same two lines inside a larger change. fix(server): a failed scheduled run shows its error without a stack trace #29889 (merged) is on this base.evals/mcp-tool-useeval. It calls paid models. Five of its cases mentionrun_scheduled_task_now; none grades this tool's reply or mentionslastRunError. I added no case.Evidence
I started the real server of each commit from source, each with a fresh isolated home and an empty working folder. I made the same
run_scheduled_task_nowcall over the real MCP endpoint with a small HTTP client (pairing code, full access). Setup on both sides: one new project whose default model belongs to theclaudeAgentprovider, one disabled interval task, thenclaudeAgentdisabled in the settings of that home. The manual run starts and its dispatch fails for a real reason. These are command outputs, not web screenshots.Before,
e101cae1b9(main): the reply has nolastRunError.After,
7d73b41f93(this branch): the reply also has"lastRunError": "Provider instance \"claudeAgent\" is disabled for project mcp:cf653924-…".On the base side the server holds the reason in its database (
last_run_error), but the reply leaves it out.Not shown:
list_scheduled_tasks. It has nolastRunErroron either side, and this PR does not change it.claude-sonnet-5 on T3 Code wrote the code. gpt-6.1-sol on T3 Code verified it.