You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent-scheduled tasks with bindToCurrentThread=false create a thread and worktree on every run #16725
An agent scheduled a recurring task with the MCP tool schedule_task and bindToCurrentThread: false. It wanted to keep the watchdog's ticks out of its own context. Every run then launched a new top-level thread and a new git worktree and branch from origin/main. Nothing reused or cleaned them up.
A 45-minute watchdog produced 28 top-level threads and 36 t3code/<title>-N branches with worktrees in about a day. Every branch was 0 commits ahead of origin/main.
Why
OrchestratorMcpService.scheduleTask stores an unbound MCP task as threadId: null with workspace strategy { type: "worktree", baseRef: "main", startFromOrigin: true }. ScheduledTaskService then calls threadLaunch.launch for every run of a threadId: null task, so each run gets its own thread and worktree.
The tool text says false creates "a fresh top-level thread per run". It does not say that each run also creates a worktree and branch. An agent asking for "not in my thread" gets per-run sprawl instead.
Expected
A recurring task an agent schedules away from its own thread should still have one place for its runs: one thread, and at most one workspace, for the task.
Environment
T3 Code Nightly 0.0.46-nightly.20261005.2689, macOS. Agent: Claude Code (Claude Opus 5.5) inside T3 Code.
Activity
juliusmarminge commentedon Oct 7, 2026
we prob need better organization but this is working as expected.