Skip to content

Epic: Switchboard in T3 Code — assigned issues start threads #1

Open

Description

@jehhynes

Bring Switchboard's work into T3 Code: issues assigned to me in GitHub, Zoho Desk and DPAF start agent threads, and T3 Code's own thread states show what needs me. Switchboard's hub, dock, VS Code extension and browser extensions are retired once this covers daily work.

Build on existing T3 Code features wherever one fits. New code lives in its own folders where possible, so upstream merges stay cheap.

Base

Fork workflow

switchboard is two layers. Upstream wins anything it owns; only the top layer is ours.

  • switchboard-base: the issue stack with current upstream main merged in. While upstream's stack lags main, this is our own integration merge; once upstream merges main into the stack, their branch replaces it, and their conflict resolutions win.
  • switchboard: switchboard-base plus fork-only commits, kept in their own folders where possible.

Updating:

  • Upstream main moved, stack didn't: merge upstream/main into switchboard-base, then merge switchboard-base into switchboard.
  • Upstream stack moved: pick the new base (upstream's stack as-is if it already contains main, otherwise merge main into it again; rerere replays past resolutions), point switchboard-base at it, then git rebase --onto switchboard-base <old base> switchboard and force-push switchboard.
  • Stack lands in upstream main: the base becomes main itself.

Migrations: fork-only schema never takes a numbered id. It runs as idempotent unnumberedSchemaSteps after the numbered migrations (apps/server/src/persistence/Migrations.ts) and is never recorded, so the database's history stays identical to upstream's and official builds still open it. A change to a fork table that already exists on an installed database is a new idempotent step that reshapes it, not an edit to the old one. Drop a step once upstream ships the table as a numbered migration, after reconciling any shape difference.

Fork-only changes to re-check on every base update:

  • IssueTrackerBindings runs as an unnumbered step (Migrations/unnumbered/IssueTrackerBindings.ts); the base numbers it 81.
  • The base builds git hosts' issue trackers inside their source-control drivers (issues on the driver instance). When upstream solves this its own way, take theirs.

Work

Each item states the outcome. Its own issue explores T3 Code and picks the implementation; the agent implementation notes at the end list the T3 Code features to try first and what is known to be missing. GitHub comes first: the whole flow is built and in daily use with GitHub before Zoho Desk and DPAF (see Deferred).

1. GitHub board as a source

2. Playbooks: issues start threads

A playbook is a configured way to start work on an issue: a prompt that names the issue's fields (framed as untrusted data), the project, the provider and model, permission and interaction modes, and whether it needs a worktree. Playbooks come from configuration; none are built in (R12, R13).

  • Selection. Each playbook has rules that pick the issues it handles, from board status, assignees (for example, assigned to me, or to me and somebody else), labels and open blockers. Being assigned to me is a rule, not a requirement: with it off, board status alone decides (R44 requireAssignee). Rules replace triage wherever they can decide: today's Jessy triage is board status plus one assignee rule (develop for Ready and In progress, ship for In review, other otherwise). (Playbook selection: rules pick the playbook for each board issue #5)
  • Auto-start per playbook. A playbook either starts its thread itself or waits for my Start (section 3). develop waits; others may start themselves. (Playbooks that start by themselves, with the boards read on a timer #10)
  • On entry, not on match. A playbook acts when an issue enters its selection (R2, R7). Settling an issue's thread does not restart it. An issue that moves to another playbook's selection, such as from In progress to In review, gets that playbook's work, in the issue's open thread when there is one, so the work keeps its context and worktree. (Playbooks act when an issue enters their selection, not on every match #7)
  • Failures show on the issue. A start that fails never disappears silently: while the issue has no thread, its cause shows on the issue, with Retry, whether I pressed Start or the playbook started by itself; nothing retries on its own (R37). (A failed start shows its cause on the issue, with Retry #19)
  • Failures show on the thread. A start that fails once its thread has the prompt stays with that thread, which shows the failure as T3 Code already does, and the issue does not wait again. A start that fails with its thread still empty shows its cause on the issue, and Retry sends the prompt to that thread. Either way Retry cannot make a second thread or send the prompt twice. (A start that fails once its thread exists stays with that thread #23)
  • Playbooks live in a JSON file I can keep in git, playbooks.json beside settings.json (R42). (Playbook selection: rules pick the playbook for each board issue #5) No Settings editor is built, and playbooks stay separate from T3 Code's scheduled tasks: the operator decided both on 2026-11-10, because a scheduled task belongs to one project and keeps one last result, and making tasks issue-aware would change large upstream files.
  • Prompt fields. A playbook's prompt wraps only the issue's free text, such as its title and labels, as untrusted data. Its number, URL and repository cannot carry text, so they go in as written, and a prompt such as /sb-plan {{issue.number}} sends /sb-plan 123. To ship before the fork is installed for daily use. (A playbook's prompt wraps only the issue's free text as untrusted data #41)

3. Start from an issue

4. Worktrees per issue

5. Settle when the issue leaves

6. Wait for blockers

  • With the source's Wait for blockers on, an issue with an open blocker does not start, from a playbook or from Start, and starts once its blockers close; the issue shows its blockers (R90). Jessy uses this today. (An issue with an open blocker waits to start #65)

7. Stage

8. Later

Deferred

  • Zoho Desk and DPAF, after the GitHub flow is in daily use:

    • Several trackers per project. One project can draw issues from more than one standalone tracker, because Zoho Desk and DPAF both serve the Tier 3 work in tier3.
    • Zoho Desk source, read-only: tickets in the Tier 3 escalation queue that are assigned to me, and those assigned to no one, or to a support agent or team, as the pool (R46, R47).
    • DPAF source, read-only: open forum topics assigned to me, and unassigned ones as the pool (R5, R47). When the replica is unreachable, it says to check the VPN, never that there are no topics.
  • Issues and Start on mobile: skipped on 2026-11-11 at my decision; the development machine has no device or emulator to test it on.

  • Time waiting (R53): each issue waiting for Start shows how long it has waited, from when it entered a selection; a move between selections does not reset it.

  • Approval reports and Approve (R23, R31). Until then, a session asks for approval in its final message and I answer in the thread.

  • History (R59)

  • Add comment (R87)

Dropped

  • Status reports other than stage: done is Settled; link, paste and task are dropped (R52, R60, R68); T3 Code links issues and pull requests to threads itself. Drafted replies go in copyable regions of the message.
  • Work items (R7, R9): the issue and its threads take their place. Before a thread starts, the waiting state (the selecting playbook, time waiting, a start failure, blockers) belongs to the issue; once started, the thread carries the work.
  • One session per ticket (R17): the default with one thread per issue, not a rule.
  • Home-repository wait (R44).
  • Separate work item status, list and dock (R27, R34, R71).
  • VS Code item windows, forks, Continue in Background, registered sessions, roster reconciliation (R28–R30, R39, R43, R72, R75, R76, R78, R81, R89).
  • Browser extension board pills and snooze (R56, R66, R67, R69, R74).
  • Friction debriefs (R55), T3 volume report (R84), handled assignments (R85), until needed.

Done when

Issues on my GitHub boards, in any of their repositories, start the playbook their selection picks or wait for my Start, run in a configurable per-issue worktree, show their stage in the sidebar, and settle when they leave every playbook's selection, on web and desktop; and Switchboard is no longer running for GitHub work. Zoho Desk and DPAF follow as deferred work.

Agent implementation notes

Starting points for each item's own issue, verified on issues/5-linear and switchboard as of 2026-11-10. Each issue confirms them and picks its own design.

Existing features this maps onto (verified on issues/5-linear)

Switchboard T3 Code Where
Session per work item, Claude or Codex Thread, any provider orchestration-v2
Work item status (R34) Thread status: approval, input, request, working, waiting, failed, limited, ready; plus Settled, Snoozed, Pinned apps/web/src/components/Sidebar.logic.ts (SidebarThreadStatus)
Dock list and groups (R27, R71) The sidebar docs/user/thread-sidebar.md
Done, Mark done, Reopen (R10, R32, R86) Settle / Un-settle; agents can settle through the thread tool, including settlesWhenTurnEnds apps/server/src/mcp/toolkits/thread/tools.ts, ThreadSettlementService.ts
Snooze and restore (R49), for threads Snooze / Wake thread.snooze command
Ready for review ordering (R73) Pin and drag to reorder docs/user/thread-sidebar.md
Search (R63) Command palette thread and message search docs/user/thread-sidebar.md
"N need you", notifications (R64, R65) Sidebar states, desktop and mobile notifications docs/user/mobile-notifications.md
Answering questions (R70), Stop (R40), Retry (R34), Delete (R76) In-thread answers, Interrupt, T3 Code's own retry and archive —
Open Changes (R57) Diffs and checkpoints —
Ad-hoc prompt (R6) New thread —
Schedules (R82) Scheduled tasks: interval, fixed_time, webhook packages/contracts/src/scheduledTask.ts
Playbook launch settings (R14–R16, R22) Scheduled task prompt, projectId, modelSelection, runtimeMode, interactionMode, workspaceStrategy (root, worktree, existing_worktree) ScheduledTask in scheduledTask.ts
Prompt template (R14) Webhook prompt placeholders ({{body.path}}), values framed as untrusted data apps/server/src/scheduledTasks/webhookTemplate.ts
Playbook selection by rule Webhook filters (equals, in, exists, …) apps/server/src/scheduledTasks/webhookFilter.ts
Worktree per ticket, reused (R19, R21, R24) worktree / existing_worktree launch strategies, worktree branch-name settings OrchestrationV2ThreadLaunchWorkspaceStrategy
Ticket ↔ session link, ticket reports (R83) Thread issue links with snapshot (key, title, state), refreshed on link, at run end and on visit after 5 minutes; link_issue tool apps/server/src/orchestration-v2/ThreadIssueService.ts
Listing assigned tickets issuesList with involvement: "assigned" across projects and hosts IssueListInput in packages/contracts/src/issue.ts
Pool and unstarted items (R47) Issues page: filters for state, involvement, tracker, search apps/web/src/routes/_chat.issues.tsx
Reading tickets in sessions list_issues, read_issue, list_thread_issues apps/server/src/mcp/toolkits/issues/tools.ts
Read-only sources Tracker capabilities; the service refuses unsupported writes packages/issue-tracker-core/src/server/IssueTracker.ts
Pluggable sources (R1) IssueTrackerApi drivers; standalone trackers bound per project; IssueTrackerKind is an open string packages/issue-tracker-core, apps/server/src/issue/builtInIssueTrackers.ts
Pre-filled start (R77) Prompt links open a draft (/new?prompt=…); a link cannot set worktree or permission mode docs/user/prompt-links.md
Triage classifier (R18) Text generation service (fixed-purpose methods today) packages/provider-core/src/server/textGeneration.ts
Hub outlives the window (R33) The server, t3 service install —

By item

  1. GitHub board as a source. Built in Read a GitHub project board as an issue source #2: boards are named in settings.json as githubBoards: [{ owner, number, statusField }], and IssueService.board (apps/server/src/issue/issueBoard.ts) reads each one whole through the GitHub driver's listBoard (packages/source-control-github/src/server/gitHubBoard.ts), answering every open issue with its repository, board status, assignees, labels, open blockers and the project for its repository, or none. The read runs on demand, from the Issues page (issues.board), and stores nothing: a board that cannot be read answers its cause with no entries. Built in An issue leaves a playbook's selection only when a direct read confirms it #15 (R88): listBoard takes the issues issue_playbook_entries records in a selection on the board, and the GitHub driver reads each one the search leaves out with a batched BoardIssue query (GraphQLResolver.aliased, 25 per request); an issue is gone only when that read finds it closed, missing or off the board, otherwise it stays listed with that read's fields, and a read that fails or cannot tell fails the board's read, which changes no record. Built in Turn a GitHub board source off and on #4: a board is off until I turn it on with the switch in its section on the Issues page (issues.setBoardEnabled, settings-write grant); a board that is on is a row in the fork-only table issue_board_sources, and IssueService.board answers a board that is off with enabled: false and no entries without reading it, so whatever selects from that listing gets nothing from it. Built in GitHub boards, their read interval and the thread limit are set in Settings #85: Settings → Source control has a GitHub boards section (apps/web/src/components/settings/GitHubBoardSettings.tsx) that lists, adds, edits and removes boards and sets the read interval (seconds, at least 10) and maxRunningIssueThreads through the existing settings patch, which now takes githubBoards (the list replaces the saved one whole), githubBoardReadInterval and maxRunningIssueThreads with the settings-write grant; removing a board, or giving it another owner or number, turns the old one off first, so its switch is forgotten; a change to the board list, from Settings or a hand edit, reads the boards at once (PlaybookAutoStart ends its wait when the list differs from the one its last read began with); and any Settings save writes settings.json without keys T3 Code does not know and without keys at their default value.
  2. Playbooks. Built in Playbook selection: rules pick the playbook for each board issue #5: selection only. Playbooks are { name, rules } entries of playbooks.json beside settings.json (not a settings.json key, so a syntax error cannot fail the settings), read on every IssueService.board call; the first whose rules all match (status, repository, labels, assignee relative to the board's GitHub account, blocked) gives each board entry its playbook, and mistakes come back in playbookErrors with the invalid entry left out. Because the first match wins, a playbook left out for a mistake hands its issues to a later one, such as other (Playbook selection: rules pick the playbook for each board issue #5 Follow-up); auto-start must decide what a mistake does before a playbook starts anything on its own, for example nothing starts while playbookErrors is not empty. The launch settings below are still to come. Scheduled tasks carry every launch setting (ScheduledTask in packages/contracts/src/scheduledTask.ts). A likely shape is a new ScheduledTaskSchedule member, such as { type: "issue", source, filters, autoStart }, beside interval, fixed_time and webhook, with filters modeled on webhookFilter.ts and prompt placeholders on webhookTemplate.ts (values framed as untrusted). Launch through ThreadLaunchService and link with ThreadIssueService.link. T3 Code stores no issue locally: an issue's only local trace is a ThreadIssueLink on a thread (identity plus a key, title and state snapshot, packages/contracts/src/issue.ts). Acting on entry, the Start list and failures before a thread exists all need a small local record per watched issue, keyed like ThreadIssueKey: the playbook selection it is in, the last start error and the last-read blockers (and, once R53 is built, when it entered). Failure display before A start that fails once its thread exists stays with that thread #23: a workspace preparation that fails after launch returned fails the thread's prepared run (prepared-run.fail), which the thread shows, but a launch error after the thread exists showed nothing in the thread (an empty thread, or a run left preparing until startup recovery cancelled it); a scheduled task keeps only its latest lastRunStatus and lastRunError, so with many issues per playbook the next run hides an earlier issue's failure, and a failure before the thread exists has nowhere per issue to show. It is a fork-only table, added as an unnumbered step. Storage: server settings live in ~/.t3/userdata/settings.json (apps/server/src/config.ts, serverSettings.ts, which already follows a symlinked file), while scheduled tasks live in statev2.sqlite; playbooks in settings.json, or a file beside it, would meet R42. Alternative for GitHub only: the existing webhook trigger with GitHub's issues events (needs a T3 Connect URL); Zoho Desk and DPAF will need polling anyway. A fork checkout resolves to its upstream remote (RepositoryIdentityResolver pickPrimaryRemote), so T3 Code treats the fork's own issues as outside the project's scope (Read a GitHub project board as an issue source #2 Follow-up); the board maps such an issue to its project through the checkout's origin, and starting and linking a thread for it must be checked the same way, because this fork's own board is the first one in daily use. Built in A triage playbook's classifier picks an issue's playbook #93: a playbook with choices is a triage playbook, whose prompt instructs a classifier and whose optional modelSelection names the classifier's model (else the text generation model); each choice is a playbook with a description and no rules, which rules never select. IssueTriage (apps/server/src/issue/IssueTriage.ts) classifies each entry into a triage playbook's selection once, at most two at a time, through the existing generateTranscriptionPostProcessing text-generation operation, behind a gate that allows only Claude or a text generator API (they run with no tools; Codex and OpenCode keep read tools) and calls that model directly so no fallback switches it; the prompt (triagePrompt.ts) frames the issue's fields, body and last 5 comments read through IssueService.detail, and an answer counts only when it names a listed choice. issue_playbook_entries.triage (an unnumbered step) records the triage playbook once playbook holds the choice, so every existing hold, start and draft works on the chosen playbook; waiting_since now strictly increases per entry and names the entry an answer is for. The later triage items build on this: nothing new (R80) would decide, from the entry and the issue's activity since its last thread, whether to call the classifier at all; Returned (R51) would count an issue's entries into the same playbook's selection on the same row; focus (R79) would add a field to the classifier's answer and to the record beside triage. Built in A returning issue is triaged only on activity newer than its earlier thread #100: the earlier thread is read by IssueThreadLinksRepository.earlierWork from the issue's thread links and the run projection, as the latest of its linked threads' first started turns (deleted threads and threads that never ran a turn left out); activity is a comment newer than that by anyone but me (getViewer), bots included, checked against the comments the classifier's issue read already returns; the classifier is still called and told that earlier work handled the issue's text and comments up to that time, and, when nothing is newer, that nothing new asks for an action; the choice is then stored in one update with the entry's try used (auto_tried) and the new column issue_playbook_entries.nothing_new_since (an unnumbered step), so every automatic start skips it while Start and drafts work, and a new entry clears both; when my account or the threads cannot be read, the classification fails with a fixed cause and Retry. T3 Code then recorded no playbook per thread, so A returning issue is triaged only on activity newer than its earlier thread #100's classifier line named none. Built in An issue back for the same playbook's work is marked Returned, with the count #102: each start's claim (IssuePlaybookEntriesRepository.claim) writes, in its transaction, a row of the fork-only table issue_playbook_starts (an unnumbered step) with the id of the prompt message the start sends, the issue's key and the playbook (a draft's send records its composer message and the playbook the draft took, use on issues.startPlaybookOnSend, resolved against playbooks.json before the prompt is placed; a triage issue records its chosen playbook); a thread is a playbook's when its first user message in the message projection is that playbook's start, so a later start into the thread, a restarted first turn or a thread from before An issue back for the same playbook's work is marked Returned, with the count #102 changes nothing; a thread counts for its issue and playbook when it is not deleted, still linked to the issue and ran a turn; IssueThreadLinksRepository.returns reads every count in one query from the start records (CROSS JOIN, so no board read scans the messages), IssueService reads it once per board read and refreshWaiting, and waitingFields gives each waiting entry returned: { count, lastAt } for the playbook it waits with, which the Waiting to start and Snoozed rows show as a return mark after the playbook badge; earlierWork also answers the earlier thread's playbook, which the classifier's line now names. returnOf (counting other playbooks' threads as returns) is not built.
  3. Start from an issue. Built in Start a playbook's thread from an issue #6: a playbook in playbooks.json has a prompt with {{issue.…}} fields (apps/server/src/issue/playbookPrompt.ts, each value framed as untrusted data) and optional modelSelection, runtimeMode and interactionMode. PlaybookStartService.start (issues.startPlaybook, the grant to run threads) resolves a project's defaults as the MCP launch does, launches through ThreadLaunchService.launch with the root workspace and links the thread with ThreadIssueService.link. Each board entry carries hasOpenThread, read from the thread projections (apps/server/src/persistence/IssueThreadLinks.ts), and the Issues page lists the selected issues without one under Waiting to start. Known gap for the items that build on it (Start a playbook's thread from an issue #6 Follow-up): a launch that fails after its thread exists leaves that thread unlinked. Built in Playbooks act when an issue enters their selection, not on every match #7: the fork-only table issue_playbook_entries keeps one row per board issue (the playbook whose selection it is in, and what started that entry); an issue waits once per entry into a selection, nothing changes while a board is off or unreadable or playbookErrors is not empty, each board entry carries waitingPlaybook, Start claims the entry (serializing two Starts) and sends the prompt to the issue's open thread when it has one. Built in Playbooks that start by themselves, with the boards read on a timer #10: a playbook with autoStart starts each entry once by itself, on a server timer (githubBoardReadInterval in settings.json, default 5 minutes, at least 10 s) or after any read; issue_playbook_entries.auto_tried keeps a failed try from repeating, and nothing starts while playbookErrors is not empty or from a board that is off or failed. Board reads are single-flight and published (issues.subscribeBoard), so the page joins a timer read, sees self-started threads without a reload, and reads again on open when the last read is over 30 s old. Built in A failed start shows its cause on the issue, with Retry #19: issue_playbook_entries.start_failure keeps the cause of an entry's last failed start, from Start or by itself, written when the start releases its claim and cleared when the entry resets; each waiting board entry carries it as startFailure, and the Waiting to start row shows it with Retry. Built in A start that fails once its thread exists stays with that thread #23: when a start fails or is interrupted, PlaybookStartService reads its command receipts (CommandReceiptStoreV2; ThreadLaunchError.threadId does not tell whether the thread exists): a prompt that reached its thread keeps the claim, the thread is linked, and a launch's stranded preparing run is failed with prepared-run.fail; an empty thread is linked and the entry waits with its cause, so Retry sends the prompt there; a thread that cannot be linked keeps the claim; no receipt, or one that cannot be read, releases as A failed start shows its cause on the issue, with Retry #19 does. Built in Start with guidance opens a draft thread instead of a dialog #35: Start with guidance… opens a draft thread (or the issue's open thread's composer) with the playbook's prompt, model, permission mode and folder from issues.preparePlaybookDraft; issues.startPlaybookOnSend names the thread when the prompt is placed (placeLinkedPrompt's optional beforePlace), and the server claims the entry and links the thread on that thread's next new user message from its committed events (PlaybookStartService.handleEvent); the record is in memory. IssueBoardResult.playbooks lists the playbooks for the menu's With another playbook; Start with guidance: add my instructions and choose another playbook for one start #26's dialog and its startWith and guidance inputs are gone. Built in A playbook's prompt wraps only the issue's free text as untrusted data #41: renderPlaybookPrompt puts the number, repository and URL in unframed only when each matches GitHub's form (digits; owner/name in GitHub's characters, not . or ..; exactly that issue's https://github.com/…/issues/<n>), frames everything else, and adds the untrusted-data note only when it framed a value; these are syntax checks, and the client-supplied entry of issues.startPlaybook and issues.preparePlaybookDraft is still rendered as sent (A playbook's prompt wraps only the issue's free text as untrusted data #41 Follow-up). The pool needs nothing more for GitHub: a playbook with the rule "assignee": "nobody" lists it. Built in At most a set number of issue threads run at once #76: at most maxRunningIssueThreads issue threads run at once (settings.json, 1 to 10, default 2). A thread holds a slot while it is open, linked to a board issue (a row in issue_playbook_entries), and its shell has a turn preparing, starting, running or waiting, with no pendingRuntimeRequest and no snooze (holdsSlot in apps/server/src/issue/IssueThreadSlots.ts). Start, Retry and a start by itself count under one in-memory lock and keep their slot as an in-flight reservation until their thread is linked and its run stored, so two starters cannot both take the last slot; drafts and my own messages are not limited. With no free slot, Start or Retry queues the issue on An issue with an open blocker waits to start #65's start_queued and a start by itself waits without spending its try; waiting issues start oldest first by issue_playbook_entries.waiting_since (an unnumbered step). The wake: PlaybookStartService.handleEvent wakes the starter only while a start waits, on any event that can free a slot (a run ending, a runtime request or waiting secret or link card, a snooze, settle, archive, delete, unlink or guest-share change), so a start follows a freed slot within seconds rather than at the next board read. Built in A waiting issue can be snoozed #86: a waiting issue with no open thread can be snoozed, as a third hold on the same record. issue_playbook_entries.snoozed_until (an unnumbered step) holds the wake as UTC ISO time, and nothing is written at the wake. Snooze, a new wake and Unsnooze are a third form of issues.startPlaybook, { playbook, snooze: entry, until } (until: null unsnoozes), under the start permission; an older server refuses it. The server decides from its own record inside the claim and queue transactions (claim and setQueued take now), and autoStartEntries skips a snoozed row. A snoozed issue is therefore neither started nor queued by Start, Retry or a start by itself, spends no try and keeps a queued Start. A draft's send still starts it, and the claim clears the snooze. A self-starting or queued issue starts at the next board read or freed slot after its wake, and Unsnooze republishes, so it starts at once. A new entry clears the snooze: a first sighting, leaving every selection, or a move to another playbook. A board change or a board that is off keeps it. The Issues page shows snoozed issues in a collapsed Snoozed group with the wake in the viewer's zone, reusing the thread snooze's presets, custom dialog and useSnoozeWakeClock.
  4. Worktrees. For the branch name and folder, try T3 Code's own per-project settings first (branchNamingMode, branchNamePrefix, branchNameInstructions, worktreesDirectory) and add only what they cannot express (operator's decision, 2026-11-10). Built in A playbook that needs a worktree gives its issue one, and later threads reuse it #31: a playbook with requiresWorktree launches an issue without a worktree in a new one from the project's default branch (chosen as scheduled tasks choose it, with the project's newWorktreesStartFromOrigin), and every later new thread for the issue, whichever playbook starts it, launches with existing_worktree on the worktree its latest linked thread recorded (IssueThreadLinksRepository.latestWorktree, settled threads included), while git worktree list still lists it (apps/server/src/issue/issueWorktree.ts). The worktree strategy creates the branch t3/<uuid> and renames it after the first message only while it is still temporary, by branchNamingMode (static, semantic, custom), branchNamePrefix and branchNameInstructions (packages/contracts/src/settings.ts, resolved per project); the strategy also takes an explicit branch (apps/server/src/orchestration-v2/ThreadLaunchService.ts). The folder is <worktreesDirectory>/<repo>/<branch>, and only the parent is configurable (apps/server/src/worktreesDirectory.ts). Jessy's t3.json already runs pnpm wt:adopt when T3 Code creates a worktree. T3 Code does not follow a worktree that an agent creates itself, so a skill such as Jessy's /init-worktree must not create one inside a thread that T3 Code launched; reuse goes through existing_worktree. Switchboard links worktrees by branchPattern ^(?:[a-z]+/)?(\d+)-. Built in An issue's worktree takes its branch name, folder and base branch from the project's settings #44: issueWorktrees in settings.json, keyed by repository, gives an issue's new worktree a branch and folder template ({{issue.type}} from a types label map, {{issue.number}}, {{issue.slug}}) and a baseBranch; the folder is an optional worktreePath on the worktree launch strategy, made only after IssueWorktrees.checkFolder (apps/server/src/issue/IssueWorktrees.ts) accepts it right before git worktree add (nothing there, parent a configured folder of the project's own repository or fork origin), and a draft's names come from startOnSend by thread id at launch. A worktree outside T3 Code's worktrees folder is not recreated when missing and automatic cleanup leaves it alone (An issue's worktree takes its branch name, folder and base branch from the project's settings #44 Follow-up). Built in An issue's existing worktree, found by its branch name, is reused #51: when none of an issue's threads has a worktree, IssueWorkspace.strategy (issueWorktree.ts) takes the project's worktree whose branch matches ^(?:[a-z]+/)?<n>-, read with GitVcsDriver.listRefs (refresh: true, which already leaves out prunable worktrees and missing folders; the project's own folder is left out by real path), and launches with existing_worktree on that branch, changing nothing in it but what the project's setup script does; only issues of the checkout's origin repository match in a fork checkout (repositoryGroupingKeyOf); several matches fail Start and a start by itself with a cause naming them, and Start with guidance then opens the draft in Local, whose branch picker binds the chosen worktree.
  5. Settle when the issue leaves. Extend PR-based settlement in ThreadSettlementService.ts rather than adding a second settler, and first check what its pull-request rule (autoSettleOnMerge) already settles in the operator's flow; settlesWhenTurnEnds covers a running turn. Built in A thread settles when its issue leaves every playbook's selection #57: issue_playbook_entries.left_at records when a board read finds an issue left every selection; the fork service IssueLeaveSettlement (apps/server/src/issue/IssueLeaveSettlement.ts) tells ThreadSettlementService which candidate threads to settle (an issue linked to the thread left after the link and after the thread's last un-settle, none of its issues is in a selection, and that issue's board decided the latest read), and resolveAutoSettlementAt settles them after isAutoSettlementCandidate, so the existing rules keep a thread open, a running turn settles when it ends, nothing settles while every automatic rule is off for the project, and Keep threads with a PR does not apply; a returning issue's new thread reuses its worktree through A playbook that needs a worktree gives its issue one, and later threads reuse it #31's latestWorktree.
  6. Wait for blockers. Built in An issue with an open blocker waits to start #65: the GitHub driver reads each issue's open blockers from its dependencies (blockedBy(first:50), GitHub's limit per type), and a board in githubBoards with "waitForBlockers": true holds each waiting issue that has one, decided from the server's latest read under IssueService.withLatestBoard; the hold keeps the issue in its selection, so the blocked rule and A thread settles when its issue leaves every playbook's selection #57's settlement are unchanged. A playbook that starts by itself skips a held issue without spending its try (Playbooks that start by themselves, with the boards read on a timer #10's autoStartEntries and automatic claim), and Start or Retry on a held issue sets issue_playbook_entries.start_queued (an unnumbered step), which the same starter, timer and claim start once a read shows no open blocker; Cancel start is the cancel form of issues.startPlaybook, and Start with guidance and With another playbook are refused while held.
  7. Stage. Claude and Codex todo lists are stored as todo_list plan artifacts (ClaudeAdapterV2.ts, CodexAdapterV2.ts), but OrchestrationV2ThreadShell, which the sidebar reads, has no todo or stage field. First try deriving one short string from the active todo item; add a set_thread_stage MCP tool only if todo lists do not give useful stages. Built in The sidebar row shows what a running thread is working on #73: the shell (OrchestrationV2ThreadShell) carries an optional stage, the first running step of the latest non-superseded todo_list plan of the thread's latest active run (silent compaction runs left out; lists ordered by their turn item's ordinal, since plan ids are not chronological), computed by one SQL column in ProjectionStore's shell query (apps/server/src/orchestration-v2/ThreadStage.ts, with the same rule for threadShellFromProjection); it travels with the shell stream, sending an update of its own only when the item's text changes, and the quiet shell ignores it while a run streams so only its row re-renders; card rows show it on the top line in place of the project name, and every row's hover card shows it in full (apps/web/src/components/sidebar/ThreadStage.tsx). In UAT, Claude Haiku 5.5 and Sonnet 5.5 sessions were offered neither TodoWrite nor TaskCreate/TaskUpdate (ToolSearch for them came back empty) and kept no list, and my database holds 1 Claude todo list in 89 Claude runs (2026-10-31 to 2026-11-09), so the stage shows for Codex and ACP agents but rarely for Claude until that is solved. Found in Claude threads keep a todo list, so their sidebar row shows a stage #74: Claude Code offers its task tools (TaskCreate, TaskGet, TaskUpdate, TaskList) to Claude 5 models only when the session's environment sets CLAUDE_CODE_ENABLE_TODO_TOOLS, which upstream deliberately leaves to the user (fix(server): Claude 5 task lists reach the tasks drawer pingdotgg/t3code#14964; docs/user/providers-claude.md § Task lists) and the fork does not set by default either; The sidebar row shows what a running thread is working on #73's dev server lacked it, while my install sets it, yet only 1 of the 9 Claude sessions I could read used the tools, and a changed provider variable reaches a thread only when its Claude session next starts. Built in An agent reports its thread's stage, and the sidebar row shows it #75: t3_thread_update takes action: "set_stage" with a one-line stage of at most 64 characters, called as t3_thread_update({ action: "set_stage", stage: "2/6 verifying findings" }) without threadId for the caller's own thread; ThreadMetadataMcpService binds it to the shell's activeRunId (refusing a thread with no running turn) and the existing thread.metadata.update command stores it as reportedStage: { runId, text } in the thread's payload (no table, and updatedAt unchanged), and ThreadStage.ts shows it while that run is active, ahead of the todo item, so it goes when the turn ends and never shows in a later one; my workflow skills still have to be pointed at it.

Deferred: Zoho Desk and DPAF

  • Two standalone bindings per project. issue_tracker_bindings has project_id TEXT PRIMARY KEY (apps/server/src/persistence/Migrations/unnumbered/IssueTrackerBindings.ts), and the contract holds one binding. Zoho and DPAF both serve tier3 (docs/architecture.md settings example in Switchboard; PRD "Zoho Desk and DPAF port the operator's T3 board in D:\git\tier3"). Change the key to (project_id, tracker) and the contract to an array. The table already exists on installed databases, so add an idempotent unnumbered step that rebuilds it with the new key.
  • Zoho Desk tracker (packages/issue-tracker-zoho), standalone, read-only. Scope: the Tier 3 escalation queue. probeCredential reads the agent from Desk with a token from the token command; getViewer returns it. Port packages/zoho from Switchboard (~600 lines) to Effect and HttpClient. Template: packages/issue-tracker-linear.
  • DPAF tracker (packages/issue-tracker-dpaf), standalone, read-only. The credential field is the forum user ID (configuration, not a secret). probeCredential runs one query through run-replica-sql.sh, confirming the ID and the VPN, and lists forums as scopes. getViewer returns the ID. The query command stays a driver default. An unreachable replica reports "check the VPN", never "no topics". Port packages/dpaf (~270 lines).
  • Register both in builtInIssueTrackers.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions