Skip to content

Sync fork onto upstream's released orchestrator v2 #5

Description

@tannerpolley

Goal

Rebase this fork onto upstream T3 Code's released orchestrator v2 (squash de34391427, PR pingdotgg#2829, 2026-10-02) and the commits after it. Re-apply the fork's own work on top.

  • Fork base: an early snapshot of that PR (2341c5a680, ~2026-09-21) plus 163 fork commits (355 files, +40k/-3k).
  • Upstream reference: upstream/main at the time of planning was 51f7f77f87.

Decisions (2026-10-05)

  • Rebuild on upstream. Create the new branch sync/upstream-v2 from upstream/main. Port the fork's features back in priority batches and test each batch. The current fork build (v2.8.34.17) keeps running until the new build passes on a copy of the real database.
  • Upstream's version wins:
    • the shell code-block run button;
    • the "Working" sidebar section, which replaces the fork's needs-you-first switch.
  • The fork's version wins:
    • subagent and background rows stay in the sidebar;
    • the waiting spinner stays amber.
  • Pi is paused. Don't port the fork's Pi adapter work (per-turn usage, shared instructions, tool deferral, background jobs). Keep upstream's Pi as-is.
  • Turn off upstream update offers in fork builds.
  • Drop fork changes that upstream now covers:
    • servers kept out of the waiting state (upstream's backgroundWorkHoldsCompletion);
    • the restart/resume fixes;
    • failing a run when the provider never starts;
    • cross-project thread read and prompt;
    • the client half of background-work waiting.

Batches

0. Foundation (must land before any build touches real data)

  • Migration ledger. Rename the fork's 056_ProjectionMessagesLatestAssistant to 057. Extend the preview reconciler for the fork's exact ledger, in one transaction: move 56→57, 55→56 and 54→55, then apply upstream 054 AutoSettle. Reject unknown collisions. Add focused tests.
  • Keep fork-persisted fields that upstream's schemas would strip.
    • Thread fields: titleSource, titleEvaluation.
    • settledDeliveryCount.
    • Turn-item phase.
    • Project folder icon flag.
    • responseCapability: app_owned.
    • Notification source.nativeRef.
    • Background-task details (taskType, startedAt, commandKind), mapped onto upstream's kind union.
    • Server settings: modelRoles, idleAgentSessionMinutes.
    • Client settings: chatMath, projectsView, codexStyleSidebar, issuesPage, pluginSkills, lineageAutoClearMinutes.
  • Event-store growth.
    • Schedule compactEventStore hourly.
    • Keep only the first and newest turn-item.updated.
    • Prune superseded streaming snapshots.
    • Set a 1 s shell coalescing window.
  • Build. Disable the upstream auto-update feed. Make the Linux build produce an AppImage only (no .deb/fpm).
  • Rehearsal. Run migrations, a full event decode and a projection rebuild on a VACUUM INTO copy of the live statev2.sqlite.

1. Sidebar Projects view

Fork's version of each:

  • Sections and subsections, folder colours and icons, organize by folder, drag-to-chat, add/remove/new project, reveal the open thread, Back button.
  • Subagent and background rows, status marks, columns and times. These stay in the sidebar.
  • Top-level thread rows in the Projects view use the same tighter spacing as subagent rows.
  • Amber waiting spinner. Fix the failed turn that shows as "idle".
  • Lineage panel: model and effort, expandable rows, clear finished, shells, fork/parent rows. Reconcile with upstream's subagentDisplay.ts.

2. Chat and pages

  • LaTeX/KaTeX; fenced code blocks in the composer; host media display and limits; the "Worked for" fold keeping substantial messages (needs the phase field).
  • Usage: model share across limit windows, Limits page layout, sidebar daily meter. Adapt to upstream's UsagePage rewrite.
  • Issues browser ([Feature] GitHub Issues panel with milestone grouping #4). Add RPC scope entries.
  • Customizations page and plugins list.
  • Codex settings import in the welcome wizard.
  • Branch picker groups.
  • Plugin skills in the $ menu.
  • Answer questions from any thread, plus notification fixes.
  • Agent browser in the side panel.
  • Preview fixes: reload, 3-tab cap, preview_open by path, port scanner.
  • Short model names.
  • Title regeneration feedback.

3. Delegation and fixes

  • Model roles: settings, MCP and UI.
  • delegate_task worktree option. Adapt to the reshaped ThreadLaunchService.
  • Shared user-question tool (t3_request_user_input).
  • Child-question wake; waits return when a child asks a question.
  • A resumed delegated child reports back.
  • Held early steer.
  • Codex subagent wake, rebuilt on upstream's backgroundWorkNotification.
  • Shutdown signal (SIGTERM) handling.
  • Claude: context window from the fetched catalog; wake-turn leftovers. Port the tests first and keep only the code whose tests fail.
  • Delegated results after background wake turns (9f855bbbba), only if its tests fail on upstream.
  • Native-subagent child status, only if its tests fail on upstream.
  • Subagent effort label.
  • Auto-retitle.
  • Idle-session timeout setting; unload finished native Codex subagents.
  • Agent instruction text: images, document links, math.
  • Claude plugin skills and the health-check probe fix.

4. Background-work panel (later)

  • Task list with live output, terminal follow, Stop and usage, rebuilt on upstream's kind union and its existing Stop banner.

5. Cutover

  • Fresh rollback snapshot: database, settings, secrets, provider credentials, attachments and desktop profile.
  • Build v2.9.0, swap it in, verify.

Notes

  • Hot files rewritten upstream: Orchestrator.ts, ProjectionStore.ts, ws.ts, OrchestratorMcpService.ts, Sidebar.tsx, UsagePage.tsx. Port these by re-implementing the features, not by resolving conflict hunks.
  • Removed upstream:
    • v1 apps/server/src/orchestration/ and contracts/orchestration.ts.
    • About a dozen web helpers.
  • New upstream requirements:
    • Every RPC now needs a scope entry.
    • New shadcn lint rules restrict restyling components/ui.

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions