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
Make linked issues drive a thread's lifecycle, like linked pull requests do
#38691
A linked pull request already drives a thread's lifecycle: T3 Code keeps a snapshot of it fresh, settles the thread when the PR merges or closes, wakes the agent on checks and reviews, and shows a badge in the sidebar. Some threads exist to file, triage or manage an issue rather than ship a PR. Those threads have no equivalent: on main, a thread can link an issue, but the link stores only the title from link time and never changes the thread's state.
This proposes giving issue links the same lifecycle PR links have.
Where things stand (main @ 8cf97b5, nightly 0.1.11-nightly.20261118.4890)
The groundwork is already in: the list_issues, read_issue, create_issue, comment_on_issue, set_issue_state, link_issue, unlink_issue and list_thread_issues MCP tools; the thread.issue.link / thread.issue.unlink commands; ThreadIssueLink on thread.issues[]; GitHub and Linear behind one IssueTracker interface; and IssueDetail.linkedPullRequests with closesIssue.
What's missing is the lifecycle:
PR link
Issue link
Stored state
snapshot with state, checks, reviews (ThreadPullRequestLink.snapshot)
key, displayKey and title as of linking. ThreadIssueService.ts header: "nothing refreshes it"
Background refresh
2-minute sweep (PullRequestWatchReactor.ts, SWEEP_MINUTES = 2), plus a refresh after each push
none. thread.issue-synced fires only on link and unlink (Orchestrator.ts, around line 5260)
Settles the thread
pullRequestSettles (ThreadSettlementService.ts:138): close always settles, merge settles per sidebarAutoSettleOnMerge
no rule. ThreadSettlementService re-queues the thread on thread.issue-synced but never reads issue state
Agent watch
watch_pull_request wakes the agent on checks, remarks, conflicts
none
Sidebar badge
ThreadPullRequestBadgeControl in SidebarThreadRow.tsx and the mobile thread rows
none. Issues show only in ThreadDetailsIssueRows.tsx
Linked when created from the thread
yes (source: "created")
no. create_issue doesn't link, and ThreadIssueLinkSource is only manual or agent
Proposal
Store issue state on the link. Add a nullable snapshot to ThreadIssueLink: IssueState (category, name, closeReason), title, updatedAt, syncedAt, and a summary of linked PRs. Add a thread.issue-link.sync command, modelled on thread.pull-request-link.sync.
Refresh it in the background. Re-read open linked issues via IssueTracker.getIssue on the same cadence as PRs (a dedicated reactor, or the existing sweep). Because this goes through IssueTracker, it works for GitHub and Linear alike.
Settle the thread when its issue closes. Add an issueSettles rule next to pullRequestSettles: a linked issue closing after the thread's user anchor settles the thread, closeReason "not planned" included, behind a new sidebarAutoSettleOnIssueClose setting next to sidebarAutoSettleOnMerge.
Link issues and PRs automatically.
create_issue called from a thread links the new issue with a new source: "created".
When a PR linked to the thread has closesIssue references, those issues are linked too, with source: "pull-request".
Together these cover the whole arc in one thread: file the issue, open a PR, merge it, the issue closes, the thread settles.
Add watch_issue / unwatch_issue MCP tools, mirroring watch_pull_request. The agent wakes on new comments, state changes, assignment, and a closing PR being linked. This fits issue-triage and issue-management threads that have no PR.
Show issue state in the UI.
An issue badge next to the PR badge in the sidebar row (web and mobile), with colour from IssueStateCategory.
A live state pill in the thread details panel.
"Link issue" in the command palette.
Issue results in the thread composer's # menu.
Open question: threads with both an issue and a PR
Suggested rule: the thread settles only once every linked item is done (each issue closed, each PR merged or closed). Otherwise an issue closed by the thread's own merged PR would be settled twice by competing rules, and a thread could settle while its PR is still open.
Alternatives considered
Read issue state only when the issue is opened, which is how main works today. That keeps the sidebar and settlement unaware of it, which is the gap.
Settle from the PR alone. This covers threads that ship a fix, but not ones that triage, reproduce, or close an issue without a PR.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
A linked pull request already drives a thread's lifecycle: T3 Code keeps a snapshot of it fresh, settles the thread when the PR merges or closes, wakes the agent on checks and reviews, and shows a badge in the sidebar. Some threads exist to file, triage or manage an issue rather than ship a PR. Those threads have no equivalent: on
main, a thread can link an issue, but the link stores only the title from link time and never changes the thread's state.This proposes giving issue links the same lifecycle PR links have.
Where things stand (main @ 8cf97b5, nightly 0.1.11-nightly.20261118.4890)
The groundwork is already in: the
list_issues,read_issue,create_issue,comment_on_issue,set_issue_state,link_issue,unlink_issueandlist_thread_issuesMCP tools; thethread.issue.link/thread.issue.unlinkcommands;ThreadIssueLinkonthread.issues[]; GitHub and Linear behind oneIssueTrackerinterface; andIssueDetail.linkedPullRequestswithclosesIssue.What's missing is the lifecycle:
ThreadPullRequestLink.snapshot)ThreadIssueService.tsheader: "nothing refreshes it"PullRequestWatchReactor.ts,SWEEP_MINUTES = 2), plus a refresh after each pushthread.issue-syncedfires only on link and unlink (Orchestrator.ts, around line 5260)pullRequestSettles(ThreadSettlementService.ts:138): close always settles, merge settles persidebarAutoSettleOnMergeThreadSettlementServicere-queues the thread onthread.issue-syncedbut never reads issue statewatch_pull_requestwakes the agent on checks, remarks, conflictsThreadPullRequestBadgeControlinSidebarThreadRow.tsxand the mobile thread rowsThreadDetailsIssueRows.tsxsource: "created")create_issuedoesn't link, andThreadIssueLinkSourceis onlymanualoragentProposal
snapshottoThreadIssueLink:IssueState(category, name, closeReason), title,updatedAt,syncedAt, and a summary of linked PRs. Add athread.issue-link.synccommand, modelled onthread.pull-request-link.sync.IssueTracker.getIssueon the same cadence as PRs (a dedicated reactor, or the existing sweep). Because this goes throughIssueTracker, it works for GitHub and Linear alike.issueSettlesrule next topullRequestSettles: a linked issue closing after the thread's user anchor settles the thread,closeReason"not planned" included, behind a newsidebarAutoSettleOnIssueClosesetting next tosidebarAutoSettleOnMerge.create_issuecalled from a thread links the new issue with a newsource: "created".closesIssuereferences, those issues are linked too, withsource: "pull-request".watch_issue/unwatch_issueMCP tools, mirroringwatch_pull_request. The agent wakes on new comments, state changes, assignment, and a closing PR being linked. This fits issue-triage and issue-management threads that have no PR.IssueStateCategory.#menu.Open question: threads with both an issue and a PR
Suggested rule: the thread settles only once every linked item is done (each issue closed, each PR merged or closed). Otherwise an issue closed by the thread's own merged PR would be settled twice by competing rules, and a thread could settle while its PR is still open.
Alternatives considered
mainworks today. That keeps the sidebar and settlement unaware of it, which is the gap.Related
Drafted by Claude Opus 5.5 (
claude-opus-5-5) in a T3 Code triage session, from a read of themainsource.All reactions