Skip to content

Next release: thread lifecycle, storage and source control #535

Description

@Tryanks

Plan of record for the next release: a real thread lifecycle and T3 Code's source-control integration, ported wholesale. Source of truth for every spec below is T3 Code's current code (commit 83a82a46b, Oct 2026); the issues are rewritten in place whenever the facts change, never annotated with history. On delivery each issue is closed; superseded ones are closed as not planned.

Decisions

  • Lifecycle: Settled is a real state with automatic settlement (inactivity after 3 days, linked PR terminal), exactly as upstream; idle auto-archive is removed; archive is always explicit. Pinned threads, with manual arrangement. Snooze is deferred. Settle detaches the provider session and closes idle terminals. Pinned threads are exempt from automatic settlement (upstream code, not its doc).
  • Sidebar: root threads and forks only; dispatched and native-subagent children live under the parent's Agents view.
  • Orchestrate: archive_on_complete and the archive tool are removed; the lead settles each dispatched child after accepting its result, and an unsettled child is not delivered.
  • Message origin is recorded explicitly (human, agent, server) from B1 on; historical top-level messages are human, messages in child threads are model-dispatched.
  • Source control: direct GitHub API with a header-driven quota ledger and a 10% background reserve (gh only for the token); durable thread ↔ PR links with batched sync and branch discovery; a host-owned PR watch that wakes the agent; five MCP tools with instructions injected visibly every turn; a complete PR client in Tcode's own model; GitHub native stacks in the data model from the start and stack actions later; media fetched by the host for the client; other hosts (Forgejo/Gitea, GitLab, Bitbucket, Azure DevOps) after GitHub is complete, by extracting the trait from the finished code. Policies, cadences, limits and TTLs are copied from upstream as-is. Two deliberate watcher deviations are recorded in Source control: pull request watch that wakes the agent (A3) #639.
  • Storage (shipped in feat: keep thread metadata and event logs in a Turso database #594, feat: keep Tcode's data in ~/.tcode on every platform #601): Turso database, one host writer; remaining compaction items deferred.

Phases (one PR each, in order)

Track B: lifecycle

Track A: source control

Later, not in this release

Closed as not planned

Coordination

Wire changes note themselves under PROTOCOL_VERSION and are bumped once at the release (CONTRIBUTING Principle 9). Both desktop and headless composition roots mount the new MCP server and start the host sweeps. Every phase runs the full CONTRIBUTING checks plus the live checks named in its issue.

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

    roadmapDirection and planning

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions