Repository navigation
fix(server): scheduled worktree tasks in non-Git projects run at the root when they fire - #45560
Conversation
…runs at the root Fails on main: the stored worktree strategy reaches the launch unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…root when they fire The non-Git and Scratch fallback only ran when a task was saved, so rows saved before #36821, or whose folder stopped being a repository, still launched a worktree and failed. Apply the same check at fire time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — Saved worktree tasks in non-Git projects now fall back to root execution when they fire. Human confirmation is needed that unattended tasks should run against shared project files rather than retain their requested isolation. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
**v0.1.14-nightly.20261129.5452** · 48 changes from 11 contributors - **Smaller macOS updates.** macOS updates download faster by reusing unchanged fonts and models. - **Markdown table copying.** Copying a selection across Markdown table rows now preserves every selected cell. ### Plus 46 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * fix(server): browser preview tab titles no longer end in half an emoji by @saphid in pingdotgg/t3code#45485 * fix(server): content search includes folders re-included by .ignore before the index is ready by @iamshadmantaqi in pingdotgg/t3code#45482 * fix(web): stop PR checks popover clicks and keys from selecting the row by @only21mil in pingdotgg/t3code#45478 * fix(server): partitioned Codex models_cache files no longer break shadow homes by @DOISolutions in pingdotgg/t3code#45450 * fix(shared): preserve the selected digit when uppercasing project monograms by @saphid in pingdotgg/t3code#45497 * fix(server): keep starting terminals available for reattachment by @StiensWout in pingdotgg/t3code#45492 * fix(web): keep every selected cell when copying part of a Markdown table by @saphid in pingdotgg/t3code#45500 * fix(server): thread search skips link addresses written in angle brackets by @AymanKhan9 in pingdotgg/t3code#45499 * fix(mobile): the merge button tells screen readers "1 stack layer", not "1 stack layers" by @saphid in pingdotgg/t3code#45496 * fix(server): opening the browser falls back on Linux when PATH ends in a file by @iamshadmantaqi in pingdotgg/t3code#45501 * fix(mobile): a failed Issues next page waits for Try again instead of retrying on scroll by @tiliakoos in pingdotgg/t3code#42298 * fix(shared): accept GitHub repository links with README queries or fragments by @saphid in pingdotgg/t3code#45508 * fix(server): t3_thread_read no longer splits a surrogate pair at textOffset by @only21mil in pingdotgg/t3code#45509 * fix(web): editing Theme JSON clears stale import errors by @only21mil in pingdotgg/t3code#45517 * fix(desktop): reuse unchanged fonts and models in macOS updates by @renningg in pingdotgg/t3code#45460 * fix(mobile): iOS Quote sheet scrolls the comment field above the keyboard by @juliusmarminge in pingdotgg/t3code#45524 * fix(server): remove evicted terminals from connected clients by @StiensWout in pingdotgg/t3code#45506 * fix(web): font family fields trim whitespace before saving by @only21mil in pingdotgg/t3code#45521 * fix(web): mark invalid provider environment variable names by @only21mil in pingdotgg/t3code#45526 * fix(client-runtime): handle combined -o/-O options with -c in shell command labels by @saphid in pingdotgg/t3code#45342 * fix(web): stop listing TAR files replaced by unsupported members by @saphid in pingdotgg/t3code#45525 * perf(server): avoid enumerating active threads' checkpoint refs during cleanup by @jamesx0416 in pingdotgg/t3code#45516 * fix(web): Enter in custom model editor text inputs saves the edit by @only21mil in pingdotgg/t3code#45539 * fix(web): apply the TSV record size limit to the final unterminated record by @saphid in pingdotgg/t3code#45537 * fix(shared): count words separated by an unspaced em dash in text direction by @saphid in pingdotgg/t3code#45534 * fix(web): use the numbered fallback for blank OpenDocument preview names by @saphid in pingdotgg/t3code#45536 * fix(web): Enter advances or submits the Add provider identity step by @only21mil in pingdotgg/t3code#45541 * fix(web): copy inline PNGs whose MIME parameter contains the word base64 by @saphid in pingdotgg/t3code#45546 * fix(server): scheduled worktree tasks in non-Git projects run at the root when they fire by @juliusmarminge in pingdotgg/t3code#45560 * fix(mobile,web): preserve comma-containing environment IDs in limits refresh by @saphid in pingdotgg/t3code#45512 * fix(shared): keep Devanagari conjuncts intact in automatic project monograms by @saphid in pingdotgg/t3code#45554 * fix: a machine overloaded on both CPU and I/O no longer reads "Machine overloaded · Machine overloaded" by @saphid in pingdotgg/t3code#45531 * fix: keep RTF footnotes and text boxes after blank source lines by @saphid in pingdotgg/t3code#45559 * fix(shared): preserve inner quote punctuation when highlighting message results by @saphid in pingdotgg/t3code#45568 * fix(server): repeated thread actions no longer stay pending in clients by @saphid in pingdotgg/t3code#45565 * fix(web): closing Usage with its shortcut returns focus to the opener by @only21mil in pingdotgg/t3code#45577 * fix(shared): thread titles no longer cut a flag emoji in half by @saphid in pingdotgg/t3code#45574 * fix(web): stop linking GitHub bot comment authors to missing profiles by @only21mil in pingdotgg/t3code#45573 * fix(server): whole-word search finds non-ASCII words past 100 partial lines by @juliusmarminge in pingdotgg/t3code#45582 * fix(client-runtime): keep durable environment streams alive across in-place catalog updates by @saphid in pingdotgg/t3code#45584 * fix(web): invalid When expression blocks visual keybinding edits by @DaDerekkk in pingdotgg/t3code#45553 * fix(web): focus the merged cell when spreadsheet navigation skips a hidden column by @saphid in pingdotgg/t3code#45583 * fix(shared): count words separated by zero-width spaces when choosing text direction by @saphid in pingdotgg/t3code#45566 * fix(web): saving another keybinding keeps an unfinished new keybinding row by @iamshadmantaqi in pingdotgg/t3code#45593 * fix(codex): stopped partial plans no longer remain streaming by @saphid in pingdotgg/t3code#45590 * fix(server): selected-file commits keep refusing a merge when the project folder is a symlink by @iamshadmantaqi in pingdotgg/t3code#45592 * fix(forgejo): single-page issue lists and pickers no longer claim more items by @only21mil in pingdotgg/t3code#45591 * fix(cli): t3 doctor no longer prints "1 superseded events removed." by @only21mil in pingdotgg/t3code#45598 ## New Contributors * @DOISolutions made their first contribution in pingdotgg/t3code#45450 * @renningg made their first contribution in pingdotgg/t3code#45460 * @DaDerekkk made their first contribution in pingdotgg/t3code#45553 **Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261129.5438...v0.1.14-nightly.20261129.5452 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261129.5452
…and pingdotgg#44794 Web icon stack) Ports 51 selected high-value upstream PRs from ba05524..d7e01c3 plus the Web-only overlapped provider icon stack visual delta from pingdotgg#44794 while preserving all 15 locked T4 customizations, T4 branding, zero-telemetry stance, and self-hosted infrastructure (skipping Jira-only pingdotgg#45030): - Features & perf (9 + pingdotgg#44794 Web): pingdotgg#45373, pingdotgg#45460, pingdotgg#45286, pingdotgg#45560, pingdotgg#45533, pingdotgg#45637, pingdotgg#45835 (Lock pingdotgg#13 orthogonal), pingdotgg#45828 (Lock pingdotgg#5 orthogonal), pingdotgg#45832 (swipe-actions-only partial), pingdotgg#44794 (Web SidebarThreadRow overlapped icon stack) - Mobile iPhone/iPad & remote (7): pingdotgg#45324, pingdotgg#45524, pingdotgg#45403, pingdotgg#42298, pingdotgg#45285, pingdotgg#45315, pingdotgg#45397 - Multi-machine, Desktop SSH & Linux (12): pingdotgg#45584, pingdotgg#45443, pingdotgg#45414, pingdotgg#45297, pingdotgg#45454, pingdotgg#45407, pingdotgg#45432, pingdotgg#45501, pingdotgg#45471, pingdotgg#45420, pingdotgg#45482, pingdotgg#45582 - ACP, Codex, Git & terminal stability (14): pingdotgg#45410, pingdotgg#45450, pingdotgg#45590, pingdotgg#42115, pingdotgg#45371, pingdotgg#42260, pingdotgg#45618, pingdotgg#45592, pingdotgg#45298, pingdotgg#45492, pingdotgg#45506, pingdotgg#45827, pingdotgg#45565, pingdotgg#45516 - Web/Desktop composer & Git UX (9): pingdotgg#45369, pingdotgg#45391, pingdotgg#45418, pingdotgg#45390, pingdotgg#45406, pingdotgg#45302, pingdotgg#45343, pingdotgg#45441, pingdotgg#45604 Includes independent gpt-6.2-astra blind-review hardening for pingdotgg#45391 (preserving remote tab pendingImageCount across storage events and clearing stale in-memory stash entries on storage clear).
Merges `pingdotgg/t3code` `c16ad0ce17` (186 commits, base `72d700a78c`) into the fork. Branched from `main`; no open merge PR to stack on. - **Landed:** 633 files vs 630 in the upstream range. The 3 extra are fork docs. Fork delta: 794 files. - **Conflicts:** 8, all `converged`, resolved by their verdicts. Details are in `docs/fork/upstream-merge-log.md` (2026-11-30). Two of them were restructures: - `ThreadDetailsPanel.tsx`: upstream moved the sections into user-ordered blocks. The fork's sandbox row, scheduled-tasks gate and artifacts section now ride inside the existing `environment`, `automations` and `relationships` blocks, with no new block id. - `SidebarThreadRow.tsx`: upstream made the row a token layout. The fork's owner name, parent link and child-task badge now render with the `agents` (provider) item. - **Contracts:** added `UnsupportedMethodError` to `threadHandoff.options`/`start`/`cancel`/`adopt` and `tools.list`. The derivation reports no ADD or DROP now. - **Inventory:** - New `web-translations` path policy. - `useThreadActionMenu.test.ts` added to the thread-visibility entry. - Replaced the stale duplicate-add exception with the `Sidebar.logic.test.ts` `new Set(),` one. - Updated anchors for the two restructured deltas. - **Gaps:** - Extended "Methods the backend does not dispatch" with handoff and `tools.list`. - Added the c16ad0c range to "Runtime fixes upstream made to its own server". - Added ServerBrowser's `Uint8Array.fromBase64` to the Node 24 entry. ## Verification `verify.mjs` full run. Duplicate-adds, tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint, typecheck and build are all green. - `@t3tools/web`: 3 files failed in the full run. On the rerun alone all 750 passed. - `t3`: 9 files failed. All are registered sandbox gaps: - Node 24 lacks `StatementSync.stat`, `setTypeOfService` and `Uint8Array.fromBase64`. - The sandbox `/tmp` has no sticky bit (Codex token broker). - The global git `insteadOf` rewrites the test remotes. - Every other package passed. - The commit used `--no-verify` for the known knip failure (the same 27 fork exports). ## Usable as-is - Customizable sidebar thread rows and a reorderable Thread Details card (pingdotgg#42576). These read the `sidebarRowLayout` and `threadDetailsOrder` client settings. Not checked: whether Moatless stores them. - Provider icon stack on thread rows (pingdotgg#44794). - The machine-overload warning is now a smaller pill you can dismiss (pingdotgg#45775, pingdotgg#45273). Without `severeSince` a dismissal does not reset when a new overload episode starts. - About 60 web UI fixes: keybinding editor, branch and diff pickers, find bar, file previews (spreadsheet, TSV, TAR, RTF, ODT, Markdown tables), pull request views, the composer and queued messages. - Text fixes: text direction, monograms, work-log command labels, Markdown recovery. - Mobile-only fixes: inbox scroll and swipe, Android split screen, iPad keyboard. ## Unsupported in Moatless / needs implementation - **Continue a thread on another machine** (pingdotgg#44775, pingdotgg#44774, pingdotgg#44773). Methods: `threadHandoff.options`, `start`, `cancel`, `adopt`. UI: `HandoffRequestCard`, `ThreadHandoffDialog`, and a thread-menu item. - Hidden against Moatless, because `canMoveThreadsAtom` requires `offersLinkedEnvironments`. - To implement: linked environments plus a thread import. Alternatively, keep the capability absent. - **`tools.list`** (`packages/contracts/src/agentTools.ts`). Lists the MCP servers and skills a thread's agent gets. No web surface reads it yet. - To implement: return Moatless's tool list in the `AgentToolsList` shape. - **MCP servers and disabled skills per thread and per project** (pingdotgg#45175, pingdotgg#45306, pingdotgg#45362, pingdotgg#45320). These are `mcpServers` and `disabledSkills` in settings and in `projectSettingsOverrides`, saved through `server.updateSettings`. - To implement: Moatless would have to persist them, redact secrets on read, and pass them into provider sessions. Until then the setting probably appears to save and does nothing. This was not checked against the Moatless settings handler. - **`severeSince` on host pressure** (`resourceTelemetry.ts`). Optional, low priority. ## Backend behavior to consider reproducing in Moatless - **Agent tools:** `pull_request_create` adds labels (pingdotgg#45533). Per-project MCP servers keep their secrets out of `settings.json` (pingdotgg#45362, pingdotgg#45306). `t3_thread_read` no longer splits a surrogate pair at `textOffset`, and a `t3_thread_launch` replay keeps the launched thread's model selection (pingdotgg#45509, pingdotgg#42115). - **VCS:** - Forgejo auto-merges once checks pass (pingdotgg#38773), and its single-page issue lists stop claiming more items (pingdotgg#45591). - GitLab reads and retries CI jobs (pingdotgg#45027). - A new worktree's index swap no longer locks out Git (pingdotgg#42260). - A task folder that loses a branch race leaves the winner's checkout alone (pingdotgg#45618). - A worktree thread in a plain folder runs in the folder (pingdotgg#44799, pingdotgg#45560). - Selected-file commits still refuse a merge when the project folder is a symlink (pingdotgg#45592). - **Thread search:** - Lists every older settled thread that matches (pingdotgg#44741). - Skips link addresses (pingdotgg#45499, pingdotgg#45271, pingdotgg#45354). - Finds non-ASCII whole words (pingdotgg#45582). - Includes folders re-included by `.ignore` before the index is ready (pingdotgg#45482). - Stops listing nested worktree files as `.worktrees/x/./path` (pingdotgg#45481). - **Runtime:** - Repeated thread actions no longer stay pending (pingdotgg#45565). - Cancelling a queued follow-up cancels only its own run (pingdotgg#45414). - Evicted terminals are removed from connected clients (pingdotgg#45506). - Switching providers no longer waits on the old one's background work (pingdotgg#45373). - Checkpoint cleanup no longer enumerates active threads' refs (pingdotgg#45516). - Remote delegated subagents no longer trigger completion notifications (pingdotgg#45297). - **Providers:** - Codex: a stopped partial plan no longer stays streaming (pingdotgg#45590), and a partitioned `models_cache` no longer breaks shadow homes (pingdotgg#45450). - ACP: the `/` menu lists commands advertised late (pingdotgg#45286), and a failed history read no longer reports the session as imported (pingdotgg#45410). - **Workflows:** daily interval and weekday fixes, and no duplicate runs for equivalent label filters (pingdotgg#45371, pingdotgg#45312, pingdotgg#45281, pingdotgg#45264, pingdotgg#45276). - **Machine-load warnings:** stop while the CPUs sit idle, and ignore jobs outside T3 stalling at their own memory limit (pingdotgg#45531). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/350bcaee-9e40-4d3b-83f5-1ea4e9e745e6
A scheduled task set to run in a new worktree, in a project folder that is not a Git repository, failed every time it fired ("Workspace preparation failed during provision worktree ... Failed to resolve the VCS driver"). This happened when the task was saved before #36821, or when its folder stopped being a Git repository after it was saved. Such a task now runs in the project folder, as tasks saved after #36821 already do.
root) moves into a sharedresolveWorkspaceStrategyhelper inScheduledTaskService.upsertcalls the helper as before, and the run path now calls it right beforethreadLaunch.launch, so stored rows are corrected when they fire.Fixes #45543
Reproduction on main
On origin/main cf1f69c in a fresh worktree:
T3CODE_DEV_SEED=0 vp run dev:server, so it made a new database.t3 project add --base-dir <worktree>/.t3 <folder>.onceabout 75s ahead, thread_id NULL, thread_mode new_thread, created_by agent / creation_source mcp, model devReplay, and workspace_strategy_json{"type":"worktree","baseRef":"main","startFromOrigin":true}. This stands in for the reporter's step of saving on an old build and then updating.Result: last_run_status=failed with last_run_error "Workspace preparation failed during provision worktree: Git command failed in GitWorkflowService.resolveWorktreeBaseRemote (): Failed to resolve the VCS driver for this Git command." This is the reporter's error word for word. The row still has the worktree strategy.
I also added a unit test to apps/server/src/scheduledTasks/ScheduledTaskService.test.ts. It stores the same row, mocks isNonGitProject as true, calls runNow, and expects launch to get {type:'root'}. On main it gets the stored worktree strategy, so it fails; the other 20 tests in the file pass.
Evidence
Environment: Linux, real web client in Chromium, 1280×800, light theme; isolated fresh databases and Replay (dev), identical synthetic legacy rows on both commits.
On each commit, start the real web app/server on a fresh database with dev seeding disabled. Add a plain non-Git folder through the project CLI. Insert a synthetic pre-upgrade once task due 75 seconds later: thread_id NULL, thread_mode new_thread, agent/mcp origin, devReplay/showcase, and stored worktree strategy {type:'worktree',baseRef:'main',startFromOrigin:true}. Delete a separate disposable task through RPC to invalidate the scheduler's due-time cache without updating the legacy task. Open Scheduled tasks and let the task fire automatically. Wait for workspace failure or successful one-time-task cleanup; capture Settings, and on success open the resulting thread and capture the completed replay response.
Scenario: A legacy worktree schedule fires in a non-Git folder
Proven: the scenario fails on base cf1f69c289 and passes on head c112d1d46a.
ASSERTION_FAILED: expect.poll(...).toBe(...) timed out after 15000 ms
last: expected "failed" to be "completed"
Scenario and legacy-row seed.
The base displays the reported VCS-driver/worktree error. The head completes the replay turn in the plain folder (the thread shows “Initialize Git”) and cleans up the completed one-time schedule.
Not shown:
Tests
vp test run src/scheduledTasks/ScheduledTaskService.test.ts(apps/server), without the fix: 1 failed (the regression test for a worktree task saved before fix(server): scheduled tasks in a non-Git project run in its folder instead of failing #36821), 20 passedvp test run src/scheduledTasks/ScheduledTaskService.test.ts(apps/server), with the fix: 21 passedvp run check:changed: format, lint, knip, graphql, typecheck (3 packages) and tests (5 files, 102 tests) all passNot in this change
Who did the work
Run by the t3code factory in T3 Code.