Repository navigation
Commit adf496d
fix(server): conversation forks keep their title, links, and children isolated (#1667)
## Problem
A conversation fork behaved like its source.
- **Title:** first send replaced it
- **Context:** agent got no fork notice
- **Links:** source PRs, issues, watches copied
- **Metadata:** pins, rollback, limits copied
- **Lineage:** source shown as just `Running`
## Change
| Area | Fix |
| --- | --- |
| Copy | `ThreadForkService` resets links, watches, and transient state |
| Title | Orchestrator skips initial title generation on forks |
| Context | First turn of a fresh native thread gets a fork notice: current ID, source ID, cutoff |
| Gate | Only `lineage.relationshipToParent: "fork"` gets the notice; subagents do not |
| Replay | Codex and Claude replay normalizers strip the notice |
| Children | Source subagents stay on the source; the notice forbids claiming them |
| Lineage | Parent row reads `Parent · <status>` |
Shared checkout and branch PR discovery stay unchanged.
## Scope and approval
Closes #1664, child of #1662.
## Close conditions
- [x] Title: manual/fork title survives send
- [x] Context: current/source IDs and cutoff
- [x] Links: no copied PR/issues or watches
- [x] Children: spawn/resume isolated both ways
- [x] Metadata: transient source state reset
- [x] Lineage: source clearly labelled parent
**Children** is proven by test, not live (see Limits).
## Verification
Head `97fd3e1`.
```text
vp test run ConversationFork.fork.test.ts → exit 0 (2 tests)
vp test run ProviderTurnStartService.memory.test.ts ConversationFork.fork.test.ts → exit 0 (6 tests, at 6aad3da)
vp test run src/orchestration-v2 → exit 0 (124 files, 1933 passed, 14 skipped, at 6aad3da)
vp test run ThreadRelationshipsControl → exit 0 (11 tests)
tsc --noEmit (server) → exit 0
vp lint conversationFork.fork.ts, ConversationFork.fork.test.ts → exit 0
vp run fork:ci → exit 0
```
`ConversationFork.fork.test.ts` forks a source holding a PR, an issue, a watch, transient state, and a running child.
| Asserted | Result |
| --- | --- |
| Links, transient state | reset |
| Title after first send | kept, with and without rename |
| Title effect | none queued |
| Source and its child | unchanged |
| Notice | IDs and cutoff present |
| Subagent (`forkedFrom.type: "node"`) | no notice |
| Child spawned by the fork | owned by the fork, not the source |
| Fork resumes a source child | refused |
### Recording
**Claim:** fork a finished thread, rename it, send once; the title holds, the agent sees the notice, Lineage shows `Parent`, and source children stay on the source.
| Field | Value |
| --- | --- |
| Build | `6aad3da`, dev server on copied data |
| Take | `rec-79ba`, 49.1s raw, 38.8s clip |
| Window | own Chrome window on a virtual monitor |
| Clip sha256 | `29d72b99…dbd7958` |
```text
donjor hypr record start --window 1800046b
donjor hypr record stop rec-79ba
donjor hypr record edit rec-79ba --cut 11.5-16.5 --cut 38.5-43.8 --out fork-evidence-6aad3da.mp4
```
| Span | Real | Clip |
| --- | --- | --- |
| rename textbox idle | 5.0s | cut |
| page reload splash | 5.3s | cut |
| Step | On screen |
| --- | --- |
| 1 | Source `Test T3 Delegation Evidence` |
| 2 | **Fork from this response** on its last reply |
| 3 | Rename to `Final-head fork (renamed)` |
| 4 | Send once; agent quotes the notice |
| 5 | Fork Lineage: one row, `Parent · Done` |
| 6 | Source Lineage: both forks, two children (finished, failed) |
| 7 | Reload fork: renamed title persists |
https://github.com/user-attachments/assets/0434c6aa-18c1-4607-a6bc-8c810364b4af
| Fork after send | Source children |
| --- | --- |
|  |  |
### Redactions
| Item | Handling |
| --- | --- |
| Sidebar | filtered to scratch project `t3-fork-evidence` |
| Pairing token | never on screen |
| Source setup | ran before the take |
The source spawned two `delegate_task` children before recording.
The first failed on provider API errors; the retry finished.
Neither was opened, resumed, or steered; the take only expands the list.
<details>
<summary>Fork notice transcript (Claude session for fork 87c411d9)</summary>
Native user turn at `2026-10-08T07:53:57.332Z`, verbatim:
```text
[T3 Code conversation fork: authoritative current-thread context]
Current thread ID: 87c411d9-de6b-46bf-bfff-d03f4f6cbb21
Source thread ID: 4dded66a-5c5a-4184-8523-f7ba6c068f42
Copied history cutoff: source run run:thread:4dded66a-5c5a-4184-8523-f7ba6c068f42:ordinal:4. Later source activity is not part of this fork.
Copied messages and tool results describe historical source activity. Their thread, run, task and child IDs are not the current thread's identity or owned work.
New children belong to the thread that creates them. Do not resume, poll, steer, interrupt or claim a source-owned child/task as this fork's work. Inspect current ownership before acting on historical IDs.
Conversation state is separate, but the filesystem is not cloned: the fork initially shares the source checkout and branch. Coordinate file and Git changes with other threads using that checkout.
Explicit issue/PR links and watches are not inherited; a PR discovered from the shared branch is a separate association.
[/T3 Code conversation fork]
User message:
hello. Quote verbatim the T3 Code conversation fork notice in your context, if any. Do not call tools.
```
The agent's reply at `07:54:00.235Z` quotes the same block.
Of the five native sessions in the scratch project, only this fork's carries `87c411d9`; the source sessions carry no notice.
</details>
### Limits
| Limit | Detail |
| --- | --- |
| Live fork-side spawn or resume | not performed |
| Live run | only shows source children staying on the source |
| `/compact` first turn | skips the notice |
| Legacy accepted attempts | `legacyInputRunIds` can suppress the notice after native-thread replacement |
| Replays | strip the notice, so they never prove delivery |
The `/compact` and legacy-attempt gaps continue in #1668.
### Head changes
| Head | Reason |
| --- | --- |
| `14a8944` | requested head |
| `3cb7ca0` | red replay CI; also gates the notice on lineage, closing the subagent finding |
| `6aad3da` | red `Test Server 1`: turn-start fixture passes a thread without lineage |
| `97fd3e1` | adds the fork-side child test; test-only |
The recording and transcript are from `6aad3da`; `97fd3e1` changes only the test, so they still match.
### Skill and handoff records
No timestamped evidence or posting receipts exist.
Skill loads are harness tool calls in the session log only: `hypr` 07:11:18Z, `chrome-debug` 07:11:26Z, `writing-md` and `gh-bot` 07:18:47Z, `gh-post` 07:18:51Z.
No handoff receipts: no peer did this work.
Claude Opus 5.5, Claude Code in T3 Code.
## Fork trailers
Squashes:
- a05ac5a fix(server): conversation forks keep their title, links, and children isolated (#1667) (#1667)
- e5105c8 fixup! fix(server): conversation forks keep their title, links, and children isolated (#1667) (#1667)
- 4cef406 fix(server): conversation forks keep their title, links, and children isolated (#1667) (#1667)
- c4bb096 fixup! fix(server): conversation forks keep their title, links, and children isolated (#1667) (#1667)
Fork-Domain: upstream-fixes
Fork-Tier: bugfix
Fork-Upstreamable: yes1 parent 4f18a87 commit adf496d
9 files changed
Lines changed: 505 additions & 2 deletions
File tree
- apps
- server/src/orchestration-v2
- Adapters
- web/src/components/chat
- packages/effect-codex-app-server/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
5293 | 5294 | | |
5294 | 5295 | | |
5295 | 5296 | | |
| 5297 | + | |
5296 | 5298 | | |
5297 | 5299 | | |
5298 | 5300 | | |
| |||
0 commit comments