@sema-agent/core 7.60.0 → 7.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/CHANGELOG.md +605 -0
  2. package/README.md +2 -2
  3. package/dist/agents/agent-transcript-tool.d.ts +2 -2
  4. package/dist/agents/agent-transcript-tool.js +1 -1
  5. package/dist/agents/cascade.d.ts +61 -10
  6. package/dist/agents/cascade.js +60 -20
  7. package/dist/agents/composition-allowance.d.ts +53 -0
  8. package/dist/agents/composition-allowance.js +49 -0
  9. package/dist/agents/composition-placement.d.ts +29 -0
  10. package/dist/agents/composition-placement.js +24 -0
  11. package/dist/agents/cumulative-stats.d.ts +4 -0
  12. package/dist/agents/cumulative-stats.js +3 -0
  13. package/dist/agents/inherited-tool-pool.d.ts +5 -3
  14. package/dist/agents/inherited-tool-pool.js +2 -2
  15. package/dist/agents/list-agents-tool.d.ts +1 -1
  16. package/dist/agents/peer-notice-route.d.ts +1 -1
  17. package/dist/agents/peer-notice-route.js +4 -3
  18. package/dist/agents/peer-notices.d.ts +4 -4
  19. package/dist/agents/peer-notices.js +8 -4
  20. package/dist/agents/peer-session-drain.d.ts +8 -1
  21. package/dist/agents/peer-session-drain.js +36 -7
  22. package/dist/agents/repair-loop.js +16 -6
  23. package/dist/agents/retain-ledger.js +3 -1
  24. package/dist/agents/roster-store.d.ts +1 -1
  25. package/dist/agents/roster-store.js +7 -4
  26. package/dist/agents/send-message-tool.d.ts +8 -10
  27. package/dist/agents/send-message-tool.js +43 -23
  28. package/dist/agents/subagent-completion-gate.d.ts +35 -0
  29. package/dist/agents/subagent-completion-gate.js +62 -0
  30. package/dist/agents/subagent-steps.d.ts +7 -6
  31. package/dist/agents/subagent.d.ts +30 -40
  32. package/dist/agents/subagent.js +187 -196
  33. package/dist/agents/suspend-guard.d.ts +9 -0
  34. package/dist/agents/suspend-guard.js +4 -0
  35. package/dist/agents/verify.d.ts +41 -14
  36. package/dist/agents/verify.js +37 -27
  37. package/dist/brain/anthropic.js +1 -0
  38. package/dist/brain/errors.d.ts +7 -1
  39. package/dist/brain/errors.js +6 -0
  40. package/dist/brain/failover.js +2 -1
  41. package/dist/brain/open-responses.js +1 -0
  42. package/dist/brain/openai.js +1 -0
  43. package/dist/brain/provider-dialect.d.ts +10 -0
  44. package/dist/brain/provider-dialect.js +13 -2
  45. package/dist/brain/stream-engine.d.ts +3 -0
  46. package/dist/brain/stream-engine.js +4 -0
  47. package/dist/core/agent-state.d.ts +1 -1
  48. package/dist/core/allow-entry.d.ts +59 -23
  49. package/dist/core/allow-entry.js +131 -38
  50. package/dist/core/ask-origin.d.ts +79 -0
  51. package/dist/core/ask-origin.js +76 -0
  52. package/dist/core/ask-question.d.ts +19 -13
  53. package/dist/core/ask-question.js +8 -2
  54. package/dist/core/auto-compaction.d.ts +2 -0
  55. package/dist/core/auto-compaction.js +2 -1
  56. package/dist/core/auto-mode.js +3 -5
  57. package/dist/core/background-agent-store.d.ts +7 -5
  58. package/dist/core/background-agent-store.js +12 -11
  59. package/dist/core/checkpoint-requirements.d.ts +24 -3
  60. package/dist/core/checkpoint-requirements.js +9 -1
  61. package/dist/core/checkpoint-store.d.ts +78 -19
  62. package/dist/core/checkpoint-store.js +8 -4
  63. package/dist/core/child-clamp-seats.d.ts +3 -2
  64. package/dist/core/child-clamp-seats.js +4 -3
  65. package/dist/core/closest-name.d.ts +13 -0
  66. package/dist/core/closest-name.js +35 -0
  67. package/dist/core/context-settings.js +3 -5
  68. package/dist/core/cross-boundary-taint.d.ts +1 -1
  69. package/dist/core/decision-receipt.d.ts +14 -1
  70. package/dist/core/decision-receipt.js +6 -3
  71. package/dist/core/delegation-frames.d.ts +13 -9
  72. package/dist/core/effective-path-target.js +2 -3
  73. package/dist/core/engine-attestation.d.ts +11 -1
  74. package/dist/core/engine-attestation.js +2 -0
  75. package/dist/core/engine-notice.d.ts +49 -18
  76. package/dist/core/file-history-retention.d.ts +8 -0
  77. package/dist/core/file-history-retention.js +14 -11
  78. package/dist/core/file-history-store.d.ts +31 -1
  79. package/dist/core/file-history-store.js +31 -2
  80. package/dist/core/frame-settlement.d.ts +10 -0
  81. package/dist/core/frame-settlement.js +6 -1
  82. package/dist/core/fs-write-gate-policy.d.ts +3 -3
  83. package/dist/core/fs-write-gate-policy.js +8 -7
  84. package/dist/core/gate-fold.js +2 -1
  85. package/dist/core/gate-lanes.js +7 -4
  86. package/dist/core/gate-outcome.d.ts +40 -1
  87. package/dist/core/gate-outcome.js +10 -0
  88. package/dist/core/git-worktree-env.d.ts +7 -3
  89. package/dist/core/git-worktree-env.js +16 -13
  90. package/dist/core/governance-codes.d.ts +12 -4
  91. package/dist/core/governance-codes.js +16 -4
  92. package/dist/core/hooks.d.ts +12 -4
  93. package/dist/core/hooks.js +11 -4
  94. package/dist/core/host-floor.js +3 -5
  95. package/dist/core/image-admission.d.ts +48 -8
  96. package/dist/core/image-admission.js +35 -4
  97. package/dist/core/input-author.d.ts +36 -0
  98. package/dist/core/input-author.js +39 -0
  99. package/dist/core/leg-identity.d.ts +62 -0
  100. package/dist/core/leg-identity.js +18 -0
  101. package/dist/core/locked-config.d.ts +2 -1
  102. package/dist/core/locked-config.js +5 -3
  103. package/dist/core/lsp.d.ts +5 -3
  104. package/dist/core/lsp.js +3 -2
  105. package/dist/core/mailbox-store.d.ts +85 -10
  106. package/dist/core/mailbox-store.js +31 -10
  107. package/dist/core/mcp-connection-pool.d.ts +6 -20
  108. package/dist/core/mcp-connection-pool.js +10 -28
  109. package/dist/core/mcp-failure.d.ts +76 -15
  110. package/dist/core/mcp-failure.js +60 -33
  111. package/dist/core/mcp-host-seat.d.ts +92 -53
  112. package/dist/core/mcp-host-seat.js +220 -46
  113. package/dist/core/mcp-probe.js +2 -2
  114. package/dist/core/mcp-server-link.d.ts +18 -6
  115. package/dist/core/mcp-server-link.js +19 -4
  116. package/dist/core/mcp-server-spec.d.ts +2 -1
  117. package/dist/core/mcp-session-end.d.ts +1 -2
  118. package/dist/core/mcp-session-end.js +1 -1
  119. package/dist/core/mcp.d.ts +6 -49
  120. package/dist/core/mcp.js +115 -111
  121. package/dist/core/media-byte-cap.d.ts +21 -46
  122. package/dist/core/media-byte-cap.js +55 -55
  123. package/dist/core/member-group.d.ts +7 -0
  124. package/dist/core/member-group.js +35 -0
  125. package/dist/core/memory-engine/consolidation.d.ts +1 -1
  126. package/dist/core/memory-engine/consolidation.js +7 -1
  127. package/dist/core/memory-engine/dual-root.d.ts +31 -0
  128. package/dist/core/memory-engine/dual-root.js +59 -11
  129. package/dist/core/memory-engine/engine.js +27 -24
  130. package/dist/core/memory-engine/file-backend.d.ts +13 -0
  131. package/dist/core/memory-engine/file-backend.js +35 -15
  132. package/dist/core/memory-engine/layout.d.ts +3 -0
  133. package/dist/core/memory-engine/layout.js +13 -3
  134. package/dist/core/memory-engine/memory-deployment.d.ts +110 -0
  135. package/dist/core/memory-engine/memory-deployment.js +182 -0
  136. package/dist/core/memory-engine/sync-client.d.ts +39 -18
  137. package/dist/core/memory-engine/sync-client.js +72 -14
  138. package/dist/core/memory-engine/sync-report.d.ts +7 -4
  139. package/dist/core/memory-engine/sync.d.ts +9 -1
  140. package/dist/core/mode-policy.d.ts +8 -8
  141. package/dist/core/mode-policy.js +7 -5
  142. package/dist/core/mods/agent-stations.d.ts +39 -4
  143. package/dist/core/mods/agent-stations.js +59 -10
  144. package/dist/core/mods/dollar.d.ts +62 -0
  145. package/dist/core/mods/extension-call.d.ts +15 -1
  146. package/dist/core/mods/extension-call.js +7 -2
  147. package/dist/core/mods/kernel/dispatch.d.ts +4 -3
  148. package/dist/core/mods/kernel/dispatch.js +4 -4
  149. package/dist/core/mods/kernel/events.d.ts +4 -1
  150. package/dist/core/mods/kernel/events.js +6 -6
  151. package/dist/core/mods/kernel/registration.d.ts +3 -0
  152. package/dist/core/mods/kernel/registration.js +5 -0
  153. package/dist/core/mods/kernel/site-rules.d.ts +6 -3
  154. package/dist/core/mods/kernel/site-rules.js +10 -2
  155. package/dist/core/mods/session-append.d.ts +115 -0
  156. package/dist/core/mods/session-append.js +311 -0
  157. package/dist/core/mods/session-compact.d.ts +48 -0
  158. package/dist/core/mods/session-compact.js +194 -0
  159. package/dist/core/mods/session-receive.d.ts +93 -0
  160. package/dist/core/mods/session-receive.js +141 -0
  161. package/dist/core/mods/session-send.d.ts +72 -0
  162. package/dist/core/mods/session-send.js +88 -0
  163. package/dist/core/mods/stations.d.ts +38 -16
  164. package/dist/core/mods/stations.js +25 -11
  165. package/dist/core/mods/tool-call.d.ts +2 -0
  166. package/dist/core/mods/tool-call.js +4 -4
  167. package/dist/core/output-style.js +3 -4
  168. package/dist/core/own-property-receipt.d.ts +61 -2
  169. package/dist/core/own-property-receipt.js +42 -2
  170. package/dist/core/park-selfcheck.js +4 -2
  171. package/dist/core/path-identity.d.ts +11 -0
  172. package/dist/core/path-identity.js +4 -0
  173. package/dist/core/path-rule-binding.d.ts +3 -1
  174. package/dist/core/path-rule-binding.js +3 -1
  175. package/dist/core/peer-seat.d.ts +3 -3
  176. package/dist/core/peer-seat.js +20 -8
  177. package/dist/core/permission-rule-consent.d.ts +21 -5
  178. package/dist/core/permission-rule-consent.js +21 -1
  179. package/dist/core/permission-rule-model.d.ts +34 -11
  180. package/dist/core/permission-rule-model.js +47 -10
  181. package/dist/core/permission-rule-org.d.ts +1 -1
  182. package/dist/core/permission-rule-provider.js +4 -1
  183. package/dist/core/permission-rules.d.ts +4 -0
  184. package/dist/core/permission-rules.js +11 -16
  185. package/dist/core/remote-env.d.ts +74 -26
  186. package/dist/core/remote-env.js +20 -0
  187. package/dist/core/retention-policy.d.ts +24 -23
  188. package/dist/core/retention-policy.js +36 -2
  189. package/dist/core/retention.d.ts +4 -1
  190. package/dist/core/retired-keys.d.ts +4 -4
  191. package/dist/core/row-admission.d.ts +10 -0
  192. package/dist/core/row-admission.js +5 -0
  193. package/dist/core/runner/advisor-instructions.d.ts +2 -1
  194. package/dist/core/runner/advisor-instructions.js +2 -1
  195. package/dist/core/runner/announce-once-ledger.d.ts +4 -4
  196. package/dist/core/runner/assemble-result.d.ts +13 -3
  197. package/dist/core/runner/assemble-result.js +12 -7
  198. package/dist/core/runner/caller-roster.d.ts +12 -9
  199. package/dist/core/runner/caller-roster.js +5 -2
  200. package/dist/core/runner/checkpoint-scope.d.ts +16 -1
  201. package/dist/core/runner/checkpoint-scope.js +21 -0
  202. package/dist/core/runner/compact-session.js +14 -2
  203. package/dist/core/runner/compaction-call-options.d.ts +1 -1
  204. package/dist/core/runner/compaction-restate.d.ts +2 -2
  205. package/dist/core/runner/compaction-restate.js +4 -3
  206. package/dist/core/runner/construction-doors.d.ts +2 -2
  207. package/dist/core/runner/construction-doors.js +2 -2
  208. package/dist/core/runner/contracts.d.ts +98 -26
  209. package/dist/core/runner/cross-boundary-lane.d.ts +1 -1
  210. package/dist/core/runner/decide-continuation.d.ts +4 -2
  211. package/dist/core/runner/decide-continuation.js +7 -4
  212. package/dist/core/runner/denial-limit-arms.d.ts +15 -21
  213. package/dist/core/runner/denial-limit-arms.js +17 -10
  214. package/dist/core/runner/expire-settle.d.ts +44 -0
  215. package/dist/core/runner/expire-settle.js +55 -0
  216. package/dist/core/runner/git-status-frame.d.ts +3 -3
  217. package/dist/core/runner/git-status-frame.js +2 -1
  218. package/dist/core/runner/halt-attribution.d.ts +2 -1
  219. package/dist/core/runner/halt-attribution.js +2 -1
  220. package/dist/core/runner/local-claims.d.ts +17 -0
  221. package/dist/core/runner/local-claims.js +18 -0
  222. package/dist/core/runner/media-removed-seat.d.ts +46 -0
  223. package/dist/core/runner/media-removed-seat.js +88 -0
  224. package/dist/core/runner/park-commit.d.ts +2 -2
  225. package/dist/core/runner/permission-rule-lanes.d.ts +5 -1
  226. package/dist/core/runner/permission-rule-lanes.js +28 -9
  227. package/dist/core/runner/person-path-rows.js +1 -1
  228. package/dist/core/runner/placement-fence.d.ts +26 -0
  229. package/dist/core/runner/placement-fence.js +38 -0
  230. package/dist/core/runner/prepare-ask-lane.d.ts +6 -12
  231. package/dist/core/runner/prepare-ask-lane.js +4 -4
  232. package/dist/core/runner/prepare-boundary-parks.d.ts +4 -1
  233. package/dist/core/runner/prepare-boundary-parks.js +2 -2
  234. package/dist/core/runner/prepare-caps-and-workflow.d.ts +2 -0
  235. package/dist/core/runner/prepare-caps-and-workflow.js +1 -0
  236. package/dist/core/runner/prepare-config-doors.js +16 -17
  237. package/dist/core/runner/prepare-context-lane.d.ts +6 -2
  238. package/dist/core/runner/prepare-context-lane.js +13 -13
  239. package/dist/core/runner/prepare-delegation-surface.d.ts +9 -9
  240. package/dist/core/runner/prepare-delegation-surface.js +4 -5
  241. package/dist/core/runner/prepare-execution-env.d.ts +5 -2
  242. package/dist/core/runner/prepare-execution-env.js +7 -4
  243. package/dist/core/runner/prepare-gate-stations.d.ts +19 -14
  244. package/dist/core/runner/prepare-gate-stations.js +6 -4
  245. package/dist/core/runner/prepare-hands-readface.d.ts +5 -5
  246. package/dist/core/runner/prepare-hands-readface.js +4 -4
  247. package/dist/core/runner/prepare-inherited-gate.d.ts +6 -0
  248. package/dist/core/runner/prepare-inherited-gate.js +3 -0
  249. package/dist/core/runner/prepare-lsp.d.ts +3 -0
  250. package/dist/core/runner/prepare-lsp.js +2 -2
  251. package/dist/core/runner/prepare-park-ask.d.ts +5 -2
  252. package/dist/core/runner/prepare-park-ask.js +4 -5
  253. package/dist/core/runner/prepare-policy-chain.d.ts +10 -21
  254. package/dist/core/runner/prepare-policy-chain.js +16 -25
  255. package/dist/core/runner/prepare-project-context.d.ts +2 -2
  256. package/dist/core/runner/prepare-prompt-inputs.d.ts +5 -4
  257. package/dist/core/runner/prepare-prompt-inputs.js +3 -2
  258. package/dist/core/runner/prepare-question-face.d.ts +6 -4
  259. package/dist/core/runner/prepare-question-face.js +2 -2
  260. package/dist/core/runner/prepare-run-refs.d.ts +3 -0
  261. package/dist/core/runner/prepare-run-refs.js +2 -2
  262. package/dist/core/runner/prepare-suspend-saga.d.ts +11 -7
  263. package/dist/core/runner/prepare-suspend-saga.js +17 -7
  264. package/dist/core/runner/prepare-task.d.ts +1 -1
  265. package/dist/core/runner/prepare-task.js +56 -28
  266. package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +6 -0
  267. package/dist/core/runner/prepare-tool-disclosure-mount.js +3 -1
  268. package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -0
  269. package/dist/core/runner/prepare-wiring-manifest.js +2 -1
  270. package/dist/core/runner/prepare-workspace-restore.d.ts +5 -0
  271. package/dist/core/runner/prepare-workspace-restore.js +10 -6
  272. package/dist/core/runner/read-root-grant.d.ts +1 -1
  273. package/dist/core/runner/read-root-grant.js +2 -1
  274. package/dist/core/runner/resume-admission.d.ts +5 -3
  275. package/dist/core/runner/resume-admission.js +17 -3
  276. package/dist/core/runner/resume-apply.js +3 -1
  277. package/dist/core/runner/resume-claim.d.ts +8 -3
  278. package/dist/core/runner/resume-claim.js +28 -12
  279. package/dist/core/runner/resume-internals-and-config.d.ts +2 -2
  280. package/dist/core/runner/resume-internals-and-config.js +10 -1
  281. package/dist/core/runner/resume-preflight.d.ts +3 -2
  282. package/dist/core/runner/resume-preflight.js +13 -26
  283. package/dist/core/runner/retired-runner-deps.js +2 -0
  284. package/dist/core/runner/run-git-lane.js +2 -1
  285. package/dist/core/runner/run-harness-handlers.js +2 -2
  286. package/dist/core/runner/run-identity-wiring.d.ts +2 -2
  287. package/dist/core/runner/run-identity-wiring.js +14 -5
  288. package/dist/core/runner/run-leg.d.ts +3 -3
  289. package/dist/core/runner/run-leg.js +40 -29
  290. package/dist/core/runner/run-notification-lane.js +20 -2
  291. package/dist/core/runner/run-recovery-lanes.js +3 -2
  292. package/dist/core/runner/run-settle-and-teardown.js +9 -7
  293. package/dist/core/runner/run-telemetry-and-budget-seats.d.ts +1 -1
  294. package/dist/core/runner/run-terminal-adoption.d.ts +1 -1
  295. package/dist/core/runner/run-terminal-adoption.js +26 -17
  296. package/dist/core/runner/run-turn-boundary.js +27 -14
  297. package/dist/core/runner/runtask.d.ts +18 -3
  298. package/dist/core/runner/runtask.js +27 -11
  299. package/dist/core/runner/session-rule-policy.d.ts +1 -1
  300. package/dist/core/runner/session-rule-policy.js +6 -1
  301. package/dist/core/runner/shell-env-withheld.d.ts +1 -1
  302. package/dist/core/runner/stream-halt-verbs.d.ts +1 -14
  303. package/dist/core/runner/stream-halt-verbs.js +4 -3
  304. package/dist/core/runner/stream-reap.d.ts +7 -6
  305. package/dist/core/runner/stream-reap.js +13 -16
  306. package/dist/core/runner/stream-settle-backstop.d.ts +3 -2
  307. package/dist/core/runner/stream-settle-backstop.js +5 -3
  308. package/dist/core/runner/stream-steer-verb.d.ts +5 -2
  309. package/dist/core/runner/stream-steer-verb.js +8 -7
  310. package/dist/core/runner/terminal-account.d.ts +11 -1
  311. package/dist/core/runner/terminal-account.js +20 -0
  312. package/dist/core/runner/terminal-projection.d.ts +8 -2
  313. package/dist/core/runner/terminal-projection.js +2 -2
  314. package/dist/core/runner/tool-disclosure.d.ts +3 -0
  315. package/dist/core/runner/tool-disclosure.js +5 -2
  316. package/dist/core/runner/tool-end-body.d.ts +3 -3
  317. package/dist/core/runner/tool-end-body.js +1 -1
  318. package/dist/core/runner/tool-output-projection.d.ts +3 -3
  319. package/dist/core/runner/tool-output-projection.js +7 -6
  320. package/dist/core/runner/tool-table-view.d.ts +56 -0
  321. package/dist/core/runner/tool-table-view.js +51 -0
  322. package/dist/core/runner/turn-attachments.d.ts +3 -2
  323. package/dist/core/runner/turn-attachments.js +1 -1
  324. package/dist/core/runner/void-verifier-pause.d.ts +33 -0
  325. package/dist/core/runner/void-verifier-pause.js +41 -0
  326. package/dist/core/runner-deps.d.ts +24 -25
  327. package/dist/core/secret-env.d.ts +11 -11
  328. package/dist/core/secret-env.js +8 -9
  329. package/dist/core/session-log-transfer.js +9 -10
  330. package/dist/core/session-policy-store.d.ts +1 -1
  331. package/dist/core/session-policy-store.js +5 -2
  332. package/dist/core/session-reconcile.d.ts +3 -2
  333. package/dist/core/session-reconcile.js +7 -4
  334. package/dist/core/session-store.d.ts +2 -0
  335. package/dist/core/session-store.js +5 -7
  336. package/dist/core/session.d.ts +2 -1
  337. package/dist/core/shell-confinement.d.ts +37 -0
  338. package/dist/core/shell-confinement.js +56 -0
  339. package/dist/core/skill-grant.js +1 -1
  340. package/dist/core/store-contracts/checkpoint-store-contract.d.ts +2 -2
  341. package/dist/core/store-contracts/checkpoint-store-contract.js +15 -2
  342. package/dist/core/store-contracts/file-history-store-contract.d.ts +5 -2
  343. package/dist/core/store-contracts/file-history-store-contract.js +25 -1
  344. package/dist/core/store-contracts/mailbox-store-contract.d.ts +12 -5
  345. package/dist/core/store-contracts/mailbox-store-contract.js +156 -9
  346. package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
  347. package/dist/core/store-contracts/tool-result-store-contract.js +30 -0
  348. package/dist/core/task-event.d.ts +17 -8
  349. package/dist/core/task-limits.d.ts +5 -0
  350. package/dist/core/task-notification.d.ts +89 -12
  351. package/dist/core/task-notification.js +87 -13
  352. package/dist/core/task-registry-agent.d.ts +5 -43
  353. package/dist/core/task-registry-agent.js +24 -51
  354. package/dist/core/task-registry-monitor.d.ts +1 -1
  355. package/dist/core/task-registry-monitor.js +15 -60
  356. package/dist/core/task-registry-shared.d.ts +15 -112
  357. package/dist/core/task-registry-shared.js +3 -41
  358. package/dist/core/task-registry-workflow.js +4 -21
  359. package/dist/core/task-registry.d.ts +19 -60
  360. package/dist/core/task-registry.js +19 -106
  361. package/dist/core/task-result.d.ts +24 -7
  362. package/dist/core/task-spec-members.d.ts +39 -0
  363. package/dist/core/task-spec-members.js +92 -0
  364. package/dist/core/task-spec.d.ts +10 -10
  365. package/dist/core/task-tool-shape.d.ts +7 -57
  366. package/dist/core/task-tool-shape.js +7 -66
  367. package/dist/core/terminal-cause.d.ts +30 -0
  368. package/dist/core/terminal-cause.js +1 -0
  369. package/dist/core/tool-catalog-entries.js +2 -5
  370. package/dist/core/tool-check-reading.js +16 -10
  371. package/dist/core/tool-conformance.js +1 -2
  372. package/dist/core/tool-errors.d.ts +6 -3
  373. package/dist/core/tool-errors.js +2 -0
  374. package/dist/core/tool-face-reader.js +3 -2
  375. package/dist/core/tool-face.d.ts +2 -3
  376. package/dist/core/tool-name-aliases.d.ts +5 -29
  377. package/dist/core/tool-name-aliases.js +9 -5
  378. package/dist/core/tool-name-readings.d.ts +14 -3
  379. package/dist/core/tool-name-readings.js +2 -0
  380. package/dist/core/tool-policy.d.ts +108 -18
  381. package/dist/core/tool-policy.js +84 -14
  382. package/dist/core/tool-result-store.d.ts +23 -0
  383. package/dist/core/tool-result-store.js +3 -2
  384. package/dist/core/tool-spec.d.ts +19 -6
  385. package/dist/core/trace.d.ts +18 -1
  386. package/dist/core/user-attachment.js +26 -21
  387. package/dist/core/workflow-journal-store.d.ts +1 -1
  388. package/dist/core/workflow-run-store.d.ts +2 -0
  389. package/dist/core/workflow-run-store.js +6 -5
  390. package/dist/core/workflow-settled-run.d.ts +5 -0
  391. package/dist/core/workflow-settled-run.js +7 -0
  392. package/dist/engine/execution-env/node-execution-env.d.ts +34 -9
  393. package/dist/engine/execution-env/node-execution-env.js +213 -21
  394. package/dist/engine/harness/agent-harness.d.ts +65 -18
  395. package/dist/engine/harness/agent-harness.js +90 -23
  396. package/dist/engine/harness/messages.d.ts +4 -3
  397. package/dist/engine/harness/messages.js +2 -2
  398. package/dist/engine/harness/types.d.ts +41 -7
  399. package/dist/engine/llm/media-removed.d.ts +14 -0
  400. package/dist/engine/llm/media-removed.js +9 -0
  401. package/dist/engine/llm/rejected-images.d.ts +35 -25
  402. package/dist/engine/llm/rejected-images.js +59 -10
  403. package/dist/engine/llm/types.d.ts +24 -3
  404. package/dist/engine/llm/types.js +7 -3
  405. package/dist/engine/loop/agent-loop.d.ts +6 -1
  406. package/dist/engine/loop/agent-loop.js +20 -11
  407. package/dist/engine/loop/types.d.ts +12 -3
  408. package/dist/engine/session/import-validate.js +7 -0
  409. package/dist/fixtures/index.d.ts +7 -5
  410. package/dist/fixtures/index.js +5 -3
  411. package/dist/index.d.ts +21 -11
  412. package/dist/index.js +15 -7
  413. package/dist/internal/harness-types.d.ts +2 -0
  414. package/dist/internal/llm.d.ts +2 -1
  415. package/dist/internal/llm.js +1 -0
  416. package/dist/orchestration/goal.d.ts +6 -2
  417. package/dist/orchestration/goal.js +6 -3
  418. package/dist/orchestration/run-workflow-tool.d.ts +11 -17
  419. package/dist/orchestration/run-workflow-tool.js +19 -42
  420. package/dist/orchestration/workflow-governance.d.ts +1 -1
  421. package/dist/orchestration/workflow-types.d.ts +2 -2
  422. package/dist/orchestration/workflow.d.ts +4 -0
  423. package/dist/orchestration/workflow.js +8 -5
  424. package/dist/stores/file/background-agent-store.js +18 -15
  425. package/dist/stores/file/checkpoint-store.js +7 -4
  426. package/dist/stores/file/file-history-store.js +3 -2
  427. package/dist/stores/file/index.d.ts +5 -3
  428. package/dist/stores/file/index.js +23 -8
  429. package/dist/stores/file/ledger-tuning.d.ts +23 -0
  430. package/dist/stores/file/ledger-tuning.js +21 -0
  431. package/dist/stores/file/mailbox-store.js +42 -22
  432. package/dist/stores/file/memory-store.js +3 -2
  433. package/dist/stores/file/permission-rule-adopt.js +24 -21
  434. package/dist/stores/file/permission-rule-store.js +6 -3
  435. package/dist/stores/file/session-policy-store.js +3 -2
  436. package/dist/stores/file/session-store.d.ts +16 -3
  437. package/dist/stores/file/session-store.js +21 -20
  438. package/dist/stores/file/tool-result-store.d.ts +11 -0
  439. package/dist/stores/file/tool-result-store.js +57 -3
  440. package/dist/stores/file/usage-window-store.js +3 -2
  441. package/dist/stores/file/workflow-journal-store.d.ts +0 -2
  442. package/dist/stores/file/workflow-journal-store.js +3 -18
  443. package/dist/stores/file/workflow-run-store.d.ts +1 -1
  444. package/dist/stores/file/workflow-run-store.js +15 -10
  445. package/dist/tools/fs/dead-cwd.d.ts +5 -5
  446. package/dist/tools/fs/dead-cwd.js +4 -11
  447. package/dist/tools/fs/fs-bash-background-text.d.ts +6 -0
  448. package/dist/tools/fs/fs-bash-background-text.js +6 -0
  449. package/dist/tools/fs/fs-bash.d.ts +3 -18
  450. package/dist/tools/fs/fs-bash.js +37 -124
  451. package/dist/tools/fs/fs-pdf.js +8 -6
  452. package/dist/tools/fs/fs-read.js +2 -2
  453. package/dist/tools/fs/fs-shared.d.ts +28 -3
  454. package/dist/tools/fs/fs-shared.js +15 -0
  455. package/dist/tools/fs/index.d.ts +1 -1
  456. package/dist/tools/fs/index.js +4 -14
  457. package/dist/tools/fs/pdf.d.ts +4 -4
  458. package/dist/tools/fs/pdf.js +6 -6
  459. package/dist/tools/fs/read-deny-home.js +8 -1
  460. package/dist/tools/fs/read-deny.d.ts +26 -2
  461. package/dist/tools/fs/read-deny.js +9 -2
  462. package/dist/tools/fs/read-floor.d.ts +13 -5
  463. package/dist/tools/fs/read-floor.js +206 -2
  464. package/dist/tools/fs/search.d.ts +3 -2
  465. package/dist/tools/fs/search.js +6 -6
  466. package/dist/tools/fs/shell-read-establish.js +3 -1
  467. package/dist/tools/fs/shell-read-identity.d.ts +3 -1
  468. package/dist/tools/fs/shell-read-identity.js +4 -2
  469. package/dist/tools/fs/shell-read-judge.d.ts +7 -1
  470. package/dist/tools/fs/shell-read-judge.js +1 -1
  471. package/dist/tools/monitor.d.ts +8 -7
  472. package/dist/tools/monitor.js +12 -10
  473. package/dist/tools/worktree.d.ts +5 -1
  474. package/dist/tools/worktree.js +20 -17
  475. package/package.json +6 -3
  476. package/test/export-surface.snapshot.json +92 -10
  477. package/wire-changes/core-stores-sql@7.61.0.json +480 -0
  478. package/wire-changes/core@7.61.0.json +4405 -0
  479. package/wire-changes/mods-kernel@7.61.0.json +65 -0
  480. package/wire-changes/primitives@7.61.0.json +30 -0
  481. package/dist/core/runner/image-removed-seat.d.ts +0 -12
  482. package/dist/core/runner/image-removed-seat.js +0 -19
package/CHANGELOG.md CHANGED
@@ -1,3 +1,608 @@
1
+ ## 7.61.0 — 2026-10-30
2
+
3
+ ### A placed row whose owner cell is damaged still says it is placed — `FileSessionRepo.placementOf` reads the placement cell by its own reader (#3215; behavior change)
4
+
5
+ - **Before.** `placementOf(id)` decoded the row's whole header and answered from it, so a placed sub-agent transcript whose owner cell was neither a principal nor anonymous made the probe throw `corrupt_session` — the same refusal the owner's readers give. A host store over the repo that falls back to "an ordinary row" when the probe throws would take the placed transcript for an ordinary one, and a whole-store swap could then replace a sub-agent's archive (the case a deployment's review disclosed).
6
+ - **Now.** The placement tuple has its own reader: the probe takes the tuple from the row's header record and decodes no other cell. A placed row with an unreadable owner cell answers its tuple; an unplaced one answers `undefined` (its tuple is not there). The readers of the owner — `open`, `headOf`, `exportEntries`, the listings — still refuse that row `corrupt_session` (an owner cell that is neither a principal nor anonymous is never read as anonymous), and a log that does not open with its header record is refused by the probe as by every reader. The header's first-record rule is one function now, shared by the whole-header decoding and the probe.
7
+ - **Behavior change.** For a row whose owner cell cannot be read, `placementOf` used to reject `corrupt_session` and now answers (the tuple, or `undefined`). `TtlSessionStore` over a `FileSessionRepo` is unaffected: its cold release and its owner-guarded delete read the row's head before they read its placement, and the head read refuses the row first, so a release of such a row is still refused and the row stays.
8
+ - **Consumers.** @server: S-2789 — the probe's answer for a row with an unreadable owner cell is its placement (or none), so a store that falls back to "ordinary row" only when the probe rejects no longer takes such a placed row for an ordinary one; a probe that rejects now means the header record cannot be read at all. @test: pins P2, P2b, P4 and P8 are the black-box faces (owner cell number / blank string / object / array / boolean).
9
+ - **Pins.** `test/backlog3215-placement-own-reader.test.ts` P2 (five unreadable owner forms on a placed row: the probe answers the tuple, `open` / `headOf` / `exportEntries` refuse) · P2b (no tuple ⇒ `undefined`) · P4 (a log with no header record ⇒ `corrupt_session`, as `open`) · P8 (the store's cold release of such a row is still refused and the row stays).
10
+
11
+ ### The File session repo's placement probe reads the row's header, not its transcript — `FileSessionRepo.placementOf` (#3079; performance)
12
+
13
+ - **Before.** `FileSessionRepo.placementOf(id)` answered one cell of the row's header by replaying the whole session log. A host that consults the probe on every execution-seat read or write, every warm-cache admission, every release and every sweep paid one more read of the transcript per call, growing with the conversation.
14
+ - **Now.** The probe reads the row's first record through the one descriptor read the row's other header-only readers take (`headOf`, the listings): one read block (64 KiB) whatever the log's size. The answers are the ones it gave: `undefined` for no file or an unplaced row, the tuple for a placed one, `corrupt_session` for a log that does not open with its header record. `listPlaced` was already header-only (one header read per row) and stays.
15
+ - **Also changed (not breaking).** The probe no longer reports an interior corrupt line through `onCorruptRead` (it reads none: a replay — `open`, `exportEntries` — still says them), and the `corrupt_session` it gives for a log with no header record does not word a count of skipped records (it reads no others).
16
+ - **Consumers.** @server: the per-call consults of the probe (execution-seat read / write, warm-cache admission, the swap gate, the reap) cost one header read now; nothing to change. @test: the byte count of a probe over a ≥ 1 MB placed log is one block, and the replay of the same file reads it whole.
17
+ - **Pins.** `test/backlog3079-placement-probe-reads.test.ts` P1 (a ≥ 1 MB placed log: ≤ 64 KiB read, no whole-file read; the replay reads the file whole) · P3 (absence) · P5 (the answer equals a restart's replay on seven header shapes) · P6 (`listPlaced` over a ≥ 1 MB placed log: no log read whole) · P7 (the probe discloses nothing a replay owns).
18
+
19
+ ### A verifier's own paused card says it is one — `compositionLeg.entry: "verify"` — and `Runner.voidVerifierPause(token)` voids it and unpins the verifier session (#3183 / #3224 / #3225; server S-2657; behavior change; behavior narrowing — an `entry` outside the closed set is refused, open to veto; hard-breaking: type-level — `CompositionLeg.entry` gains a member, three sentences below; closed sets: `CompositionLeg.entry` +1 `verify`, `CheckpointError.code` +1 `checkpoint.void_unpin_failed`; exports: none; members: +1 method `Runner.voidVerifierPause`, +1 optional `VerificationOutcome.verifierPause.checkpointId` (and on the `onVerifierPause` info; wire +1 optional key)) (@server @cli @client-core @test)
20
+
21
+ - **Before.** A verification gate's verifier runs in a session the gate mints. When it durably paused, its card recorded nothing about which composition it belonged to, so a host's pending table could not tell it from a background child's park (both are cards in a session the host's run does not own), a decision presented through the host's own resume chain was refused, and the card waited for the deadline reaper. `VerificationOutcome.verifierPause` carried the token, the gate, the status and the session, but not the card's non-secret `checkpointId`, so a host could not name the card where the token must not travel. The pause's documentation said to "cancel" it, and there was no verb: an expiry through the store left the verifier session pinned — the pin is released only when a resumed run ends.
22
+ - **Now.** The verifier leg is handed its composition identity — `{ entry: "verify", leg: <the round>, hostSessionId: <the implementation's session> }` — and the suspend mint stamps it on the card (`CheckpointState.compositionLeg`), the same seat and the same mint a cascade rung's card uses; a re-park after a resume keeps it. A host reads that member to judge the card: a `verify` card is a verifier's own pause. The pause carries `checkpointId` when the card has one. `Runner.voidVerifierPause(token)` reads the same member and voids only a `verify` card: the row ends `expired` — exactly what an expiry leaves on it, with the in-Runner settle's duty (the paused env this process holds destroyed, its parked-constraint entry evicted; the resume preflight's terminal arm and this verb share that one statement) — and then the verifier session is unpinned, the end state a resumed run's terminal leaves. Unpinned, not released: the transcript stays the session store's to evict. It answers `true` when it voided the card and `false` when another settler already had (nothing is touched then), and refuses a card that records no leg or another entry's (`resume.composition_mismatch`, the row untouched). `CompositionLeg.entry` is a closed set read in one place: a word outside it is refused with `config.invalid_argument` (`detail.field: "compositionLeg.entry"`) wherever the identity is read — a leg handed it, a resume handed it, a row recording it — instead of being stamped on a card.
23
+ - **Hard-breaking, three sentences.** *What*: `CompositionLeg.entry` was the one word `"cascade"`; it is now `"cascade" | "verify"`. *Who*: a host that switches over `entry` exhaustively, or narrows a card's leg to a cascade leg by its type (server's pending table and resume routing, client-core's projection, cli's card readers). *Compensation*: add the `verify` arm — route such a card to `Runner.voidVerifierPause` or to a plain `runner.resume` by its token, never to `resumeCascade` (which already refuses a non-cascade leg, `config.cascade_invalid`).
24
+ - **Consumers.** @server: the S-2657 transition arm (7.141.0, MIGRATION item 31) that voids the verifier card at settlement through the store's `expire` retires on arrival and is replaced by `Runner.voidVerifierPause(token)` — the same CAS, plus the session unpin and the paused-env destroy; no double reading stays behind. Its pending-table readings key on `compositionLeg.entry === "verify"` rather than on the pause's session. The held-park origin (a failed run's own card) keeps the store's `expire`: that card is in the run's own session and is not a verifier's. The credential seal is unchanged. @test: two black-box cells — a verifier's pause and a background child's park in one pending table are told apart by the card, and a voided verifier card is `expired` at once (no longer a 409 waiting thirty days for the reaper).
25
+ - **Also changed (not breaking).** The Runner's same-Runner settle claims are held per attempt (`src/core/runner/local-claims.ts`): an actor that loses its CAS closes only its own claim. Before, a loser cleared the token's one mark while the winner was still on its way to its duty, so a stream `destroy()` that lost its own expire next retired the paused-env record and nobody destroyed the env — reachable with two concurrent voids of one card, a void beside a resume, or two resumes. Now the winner finds the record and destroys the env once.
26
+ - **An expired row's paused env is destroyed by the Runner that holds it, whoever expired the row (behavior change).** The duty an expired row carries in a Runner — evict the token's parked-constraint entry, take its paused-env reap record, destroy the env (bounded) — is now keyed on the row, not on who won the expire: `expired` is terminal, and the reap record is the ownership token, so the env is destroyed once by whoever takes it. Before, only the CAS winner of THIS Runner destroyed; when another Runner (or the deployment reaper) expired the row, this Runner's stream `destroy()` and its own `voidVerifierPause` lost their CAS and left the env alive for good. Now a settle that loses its CAS reads the row and runs the same duty when it is `expired` (the void still answers `false` — it did not void the card), and so does a resume of this Runner that finds the row already expired — refused at its first read, or losing its CAS to the expire (`checkpoint.already_resolved` either way; the duty runs before the refusal); a row a resume resolved keeps its env. A losing stream reap retires the record only when the row was settled away from this Runner (resolved elsewhere, or gone) and no same-Runner claim was open at the loss or after the read; a row that reads `pending` (a resume failed and reopened it) keeps it for the next settle. The stream-side reap's destroy is bounded like the other settles'.
27
+ - **A failed unpin after a void is loud (behavior change).** When the card is voided but releasing the verifier session's pin throws or does not settle within the teardown bound, `voidVerifierPause` says it on `onError` and throws `CheckpointError` `checkpoint.void_unpin_failed` (the row IS expired and the env duty ran; the session stays pinned until it is unpinned). Before, it answered `true` and the failure reached only `onError`. The code joins the `CheckpointError.code` closed set (+1, wire-visible). @server: a caller that branches on the void's answer adds this code — the card is settled, the pin is the one thing left. @cli: a reader of the `CheckpointError` code set adds the member. @test: two black-box cells — a card voided by another Runner leaves no paused env behind once the holder settles it (its own void or its stream's `destroy()`), and a void whose unpin fails rejects with this code while the card reads `expired`.
28
+ - **Pins.** `test/backlog3183-verifier-pause-identity.test.ts` (⑭ another Runner voids this Runner's card ⇒ the holder's own void or stream reap destroys its env once; ⑭′ the same, then the holder resumes ⇒ `already_resolved` and the env destroyed once; ⑭″ the void lands between the holder's resume read and its CAS ⇒ the same; ⑭‴ the holder's env answers its `destroy` probe by throwing ⇒ the refusal keeps `already_resolved` and onError hears the failure once; ⑮ an unpin that throws or wedges ⇒ `checkpoint.void_unpin_failed`, onError once, the row expired; `test/design380-o2-resume-preflight.test.ts` ⑯ a losing stream reap whose row read overlaps a local resume that fails and reopens keeps the record, and the later terminal expiry destroys once; real lanes: the card records `{ verify, round, implementation session }` in the verifier's own session, round 2 after a fix leg, and through `runWithVerification`; `checkpointId` on the pause and the callback; only the verifier leg carries it — the fix leg forwards the caller's object, a caller's own identity never rides a verifier leg, and an implementation result with no session id mints none; a verifier card and a background child's park in one store read `verify` / absent and the verb takes the first and refuses the second; the verb voids, unpins once, answers `false` the second time and the token is spent; a voided twin and an expired twin change the same member (`status`) and refuse a later resume alike; the verb and the preflight's terminal arm each destroy their twin's paused env once, the verb alone unpins; a legacy or another entry's card is refused and stays pending; the resumed terminal still unpins; a contradicting live identity is refused pre-CAS and a plain resume's re-park keeps the identity; an out-of-set `entry` is refused on a leg, on a resume and on a row; a void whose expire answers late, beside a losing void and a losing stream reap, still destroys the paused env once).
29
+
30
+ ### Who asked about a call, and why, is a member of the approval request — `AskRequest.askReasons` — and the write gate's advisory suffix is gone (#3203; #3077 merged in; hard-breaking; exports: +1 root type `HookQuestionCause`, +1 root closed set `HOOK_QUESTION_CAUSES`)
31
+
32
+ - **Before.** A card's reason came from `AskRequest.message`, one sentence holding two kinds of text: an asker's own words (a deployment policy's ask sentence, a hook's or an extension's reason) and sentences the engine composes about a call from facts that already ride typed members. Who asked was named only inside that sentence (`asked by extension "<name>"`), so a surface could not render or filter askers without parsing text; a hook whose host could not read its verdict could say so only as prose in its answer's `message`; and every fs-write gate ask on an environment with no `writeFileGuarded` ended with ` (advisory adjudication: this environment provides no guarded write, so approval is judged before a separate, non-atomic write step)` — a fact of the environment that no person answering one card can act on.
33
+ - **Now.** One seat, `askReasons?: readonly AskReason[]`, on `AskRequest` and on the parked `tool_approval` row — one value, minted once and carried to both. An entry is one asker and its own words: `{ by, words }` for a policy chain's ask (`by` = the `AskOrigin` the ask's own members name, read where the ask is received), `{ by: "hook", registration?, cause, words? }` for a hook's or an extension's ask (`words` only when `cause` is `asked`). Entries join in fold order (the standing ask's first, then the one folded over it). A sentence the engine composes about a call whose fact rides a typed member is no entry: the write gate's default question (`approve write to "<path>"?`) and the plan mode's two sentences are recorded by the engine as its generic question and mint none while their text is unchanged — a layer that puts its own words over them gets an entry. Nobody states the seat: a policy result or a hook answer that hands `askReasons` is denied at the receipt (the gate writes it after a policy answers). `message` keeps its bytes everywhere (the classifier's input, the model's refusal sentences, the extension projections), except that the advisory suffix is gone. `AskCarry` (the park closure's structural seat, the thirteenth argument of `suspendAsk`) gains one optional member, `askReasons`, the same value the request carries, which the closure copies onto the row; its other members are unchanged.
34
+ - **Hard-breaking — the advisory suffix is retired.** *What changed:* no fs-write gate ask carries ` (advisory adjudication: …)` (the default question, the no-resolvable-target ask and the unresolvable-real-target ask); every other byte of those sentences is as it was (`requireGuardedWrite` still refuses such writes outright). *Who is affected:* code that matches the whole `message` of a write ask on an environment without `writeFileGuarded`; a matcher on the `approve write to "` prefix is not. *What to do:* drop the suffix from the expected text.
35
+ - **Hard-breaking — `message` is re-read.** *What changed:* `AskRequest.message` is the text for a reader that renders no seat (the model's refusal, the classifier, an extension's projection, a plain-text approver), each mint point's own sentence — not "the sentence on the card"; a structured approval surface renders `askReasons` and the typed members beside it and does not render `message`. The wire shape is unchanged. *Who is affected:* a surface whose reason line shows `message`. *What to do:* render the entries of `askReasons` (its `by`, a hook's `registration` and `cause`, the `words`) as the reason line; keep relaying `message` for plain-text consumers.
36
+ - **Hard-breaking (additive) — a hook answer may state why it asks.** *What changed:* a hook result's `ask` arm may carry `questionCause` — `asked` / `verdict_unreadable` / `verdict_unfinished` (`HOOK_QUESTION_CAUSES`, root export); on the two `verdict_*` words the answer's `message` is the host's account and no entry carries it; a word outside the set, or the member on another arm, is denied at the receipt. *Who is affected:* a hook host that asks because it could not read or finish a hook's verdict. *What to do:* state the cause instead of writing it as prose; an answer without the member still reads as `asked` with its `message` as the hook's words.
37
+ - **Hard-breaking — the write gate's `defaultAsk` callback is handed the call (#3203, open to veto).** *What changed:* `FsWriteGatePolicyOptions.defaultAsk` is `(path, note, call: ToolCallRequest) => PermissionResult` (was `(path, note)`): the gate hands its callback the call it answers, so a sentence the callback mints can carry the engine's record for that call (the plan mode's generic question). *Who is affected:* only code that calls `opts.defaultAsk` itself — the engine is its one caller; an implementation written with two parameters still compiles (zero hits for `defaultAsk` on server, cli and client-core main). *What to do:* nothing for an implementation; an implementation may take the third argument or ignore it.
38
+ - **Also.** #3077 (a structured "who asked" member for hook and extension asks) is merged in: the member is the hook entry's `by` / `registration`, minted at the two places the sentence was, and the sentence is derived from the entry (`extensionQuestionText`), so it is no second source.
39
+ - **Consumers.** @server: the run's approval frames relay `askReasons` beside `message` (the parked row carries the same value); the three places it mints a hook ask for an unreadable or unfinished verdict state `questionCause` instead of prose. @client-core: the reason line reads `askReasons`, not `message`; the path fallback from the `approve write to "` prefix is untouched. @cli: renders what the package renders. @test: the advisory suffix is gone from write asks on an environment without guarded writes; the reason line's source moved.
40
+ - **Known (stated).** The engine's own sentences outside the generic-question record (a tool mark's, an allow layer's shadow, a classifier's no-ruling) mint no entry and are read from their typed members; engine stations that ask in their own name are a later change (#3204).
41
+ - **Pins.** `test/backlog3203-ask-reasons.test.ts` 1–12, 10b and the receipt / fold pins (a real Runner: the plain write card, a hook's ask with and without a reason, the two `verdict_*` causes, a cause outside the set, a deployment policy and a classic `PreToolUse` ask folded, a composer stating the seat, the parked row against the live card, the inherited lane's ancestor sentence, a tighten that replaces an allow, the classifier's input unchanged, a policy and a `tool.check` ask).
42
+
43
+ ### A store's constructor options take the options it reads and nothing else — one door, one table per options interface; a retention policy and the session store's hooks pass the same door (#3201, #3186 slice 1; hard-breaking: three groups, open to veto; closed sets: none; exports: none) (@server @cli @client-core @test)
44
+
45
+ - **Before.** Twenty store constructors took an options bag, and none of them judged its keys: fifteen received it by the receipt law, five read the caller's bag directly (`InMemorySessionPolicyStore`, `InMemoryFileHistoryStore`, `FileWorkflowRunStore`, `MemoryRosterStore`, and `FileDurableRulePartitionProvider`'s third argument). A misspelled key built the store with that option's default, silently: `new FileMailboxStore(root, { fsynk: false })` fsyncs, a misspelled `maxTotalChars` leaves the tool-result store unbounded, `holderIsCurrent` leaves the checkpoint store without its holder fence, `onCorruptRead` leaves the disclosure seat unwired, `maxEntries` leaves the roster unbounded, and a misspelled `dataRoot` built a rule provider with no root-freeze gate. The retention policy (#3180) and the TTL store's hooks each kept a hand-written key check of their own; the retention one judged the caller's live bag and then read its knobs through the bag's prototype chain (#3130's two readings).
46
+ - **Now.** One primitive, `receiveMembers` (`src/core/own-property-receipt.ts`): the bag is received by the receipt law (a plain object, every own member read once off its own descriptor), every own string key of the copy must be in the door's table — enumerable or not, the names the receipt reads — every name — a symbol's too — is judged before any getter runs (#3202; this slice judged the string names on the copy), and ONE refusal (`config.invalid_argument`) names every stray key with its nearest taken name within two edits (`"fsynk" (did you mean "fsync"?)`) and the keys the door takes. A constructor's table is `optionKeys<T>()({ … })`, locked to its options interface both ways at compile time (a key missing, a key extra — fresh, through a variable, a spread, or a union whose arms each carry one — and a table of another interface do not compile; an interface with an index signature has no table), and `receiveOptions(given, owner, keys)` takes nothing else. The copy a door hands back is frozen: what was judged is what the store holds, and a callback the store calls on it (its `this`) cannot change a member. All twenty store constructors pass that door. `FileStorageBackend` receives its nested records — `checkpoint`, `fileHistory`, `sessionPolicy`, and the retention policy inside `fileHistory` (its keys and its value) — with their own tables before it resolves, locks or creates anything, and builds its stores from those copies (the caller's records are read once); `fileHistory` and `sessionPolicy` take no `onCorruptRead` (the backend's one sink). The retention reading (`reap`, `reapDurableAgents`, the file-history retention door) and the hooks door are calls of the same primitive: the two hand-written key checks are gone. The nearest-name reading is a leaf now (`src/core/closest-name.ts`; the skill grant and the agent-name refusal read it from there).
47
+ - **Hard-breaking — group 1, a stray option is refused.** *What changed:* the twenty store constructors, and `FileStorageBackend`'s `checkpoint` / `fileHistory` / `sessionPolicy` records, refuse a key their options interface does not name — `config.invalid_argument`, the sentence naming every stray key, the constructor (`FileStorageBackendOptions.<member>` for a nested record) and its table, with a near miss named. A file store and the backend refuse before any directory, lock or file exists. A misspelled `dataRoot` for `FileDurableRulePartitionProvider` is refused instead of building a provider without its root gate. *Who:* a host that passes a misspelled, retired or foreign key (a wider object spread in, a fixture cast with `as never`). *Migrate:* remove or correct the key; there is no engine switch — a new host on an older engine is refused loudly, which is the point.
48
+ - **Hard-breaking — group 2, a retention policy is received by the receipt law.** *What changed:* a `reap` / `reapDurableAgents` policy and a file-history `retention` policy that is a Proxy or has another prototype (a class instance, `Object.create(…)`) is refused whole (`config.invalid_argument`) — a bound it would inherit is no longer read (#3180's "an inherited bound is taken" is reversed); a non-enumerable own knob is read; a knob whose getter throws is the receipt's refusal (`config.invalid_argument`, its thrown value not quoted — it was `config.retention_policy_invalid` quoting it). A stray knob keeps `config.retention_policy_invalid`, in the primitive's sentence (`"maxAge" (did you mean "maxAgeMs"?) is not a retention knob it takes — the retention knobs it takes are "maxAgeMs"; …`), and so does every bad value. The joint reap's `now` is read off the same copy as its knobs. *Who:* a host that passes a class instance or an `Object.create(…)` object as a retention policy, or keys on the old sentence. *Migrate:* pass a plain object.
49
+ - **Hard-breaking — group 3, the in-memory roster holds its copy (a legal option's behavior changes, outside the key gate).** *What changed:* `MemoryRosterStore` held the caller's options bag and read `maxEntries`, `onNotifyError` and `onEvicted` from it on every write; it now holds the copy read at construction, as `FileRosterStore` already did. Changing the bag after construction changes nothing the store does. Every door's copy is frozen besides: the two rosters are the stores that hold their copy and call a callback as a method of it (`onEvicted`, whose `this` is the copy), and that callback can no longer write a member (setting `this.maxEntries = -1` emptied the next write's roster; `FileRosterStore`'s copy was open to that too). *Who:* a host that builds a `MemoryRosterStore` and then edits the same bag to retune it (none found at the server construction points; inferred none elsewhere), and a callback that writes to its `this` (it now meets a frozen object — a `TypeError` in strict code). *Migrate:* build a new store to change a bound or a sink; keep a callback's state outside its `this`.
50
+ - **Codes.** `config.invalid_argument` is the receipt's (the bag's shape: Proxy, prototype, a getter that throws, a stray option); `config.retention_policy_invalid` stays the retention family's (a stray retention knob, a bad bound) — the two never answer the same question.
51
+ - **Consumers.** @server: the literal construction points of the bundled stores name only keys in their tables (no change expected); your `reap` policies are literals (no change); a roster bag edited after construction no longer retunes it; a fixture that hands a store a key it does not take is refused now. @cli / @client-core: no direct construction point (cc). @test: black-box cells — a misspelled store option is refused at construction, naming the near miss; a retention policy built with `Object.create` is refused whole; a `FileStorageBackend` with a misspelled nested option leaves its root uncreated.
52
+ - **Known (stated), closed in this release by #3211 / #3209 / #3210 (the next entry).** KL-3201-a: the gate judges whether a key is in the table, not whether the constructor reads it — `FileStorageBackendOptions.checkpoint.sessionHeadOf` is a key of that table, and the backend always replaces it with its own session store's head read (the file session repo has one), so a host's value is accepted and unused; the same record's `onCorruptRead` is replaced when the backend has its own sink. KL-3201-b: `FileStorageBackendOptions.sessions` (the hooks face) is received by the TTL store, after the backend has taken its lock and created `sessions/`: a misspelled hook there is refused late (the lock is handed back) — the face is called with itself as `this`, so the backend cannot read a copy of it ahead without changing what a hook sees. KL-3201-c: the backend judges its nested records' keys ahead, and the file-history retention's value; the other nested values (`sessionPolicy.mountedToolNames`'s names, `checkpoint.compactEvery` / `fsync`) are judged by the store constructors after the root is locked — a bad nested value is refused late (the lock and the stores built so far are released).
53
+ - **Pins.** `test/backlog3186-store-options-gate.test.ts` P1–P11 (every door refuses a stray key and leaves its root uncreated; every key of every table constructs; near misses; prototype / null prototype / own `__proto__`; non-enumerable and symbol members, a getter deleting the symbol; the retention bag; the roster's key-then-value order; the twins; the backend's nested records before its root exists; an AST census of every options-bag constructor under `src/`; the roster's held copy, and a callback on it that cannot change it), `test/backlog3186-option-keys-exact.test.ts` P12 (the table's compile cells, a union table and an index-signature interface among them), `test/backlog2847-store-options-door.test.ts` (#2847's four hostile bags at all twenty doors), `test/backlog3180-retention-unknown-knob.test.ts` U6 reversed, `test/backlog3179-reap-reads-bound-once.test.ts` R3 and `test/backlog3148-write-faces.test.ts` (the receipt's code for a throwing knob).
54
+
55
+ ### Every hand-written unknown-key gate the slice names is one judgment now — thirteen seats, the memory-engine seats and four store-family function bags refuse a stray key by one law, each in its own words; the File stores' ledger tuning has one reader; the backend judges its session hooks and its nested values before it creates anything (#3202, #3186 slice 2, with #3209 / #3210 / #3211; ruled C-R1041 D6; behavior narrowing, open to veto; hard-breaking: two groups, three sentences each below, open to veto; closed sets: none; exports: none) (@server @cli @client-core @test)
56
+
57
+ - **Before.** Thirteen seats each spelled their own "is this key one I take?" over a caller's record — `declareWithheldEnv`'s table, the session log transfer's three records, `RunnerDeps.hostFloor`, a `toolFaces` face, the peer seat's answer, `RunnerDeps.autoMode.denialLimit`, a `contextSettings` overlay, a clamp record handed in, a user attachment (and its `lines`), `TaskSpec.outputStyle`, a host-supplied MCP transport, `TaskSpec.limits` and the `TaskSpec` itself (K6). They read different key sets — `Object.keys` (enumerable string keys only) at most, a key holding `undefined` read as absent at two (the clamp record, the host transport) — and five of them judged the caller's live object and read its values off it afterwards. The memory-engine seats (`MemoryEngine` and its `consolidation` record, `FileMemoryEngineBackend`, the sub-agent retain ledger) and four store-family function bags (`adoptFilePermissionRuleStore`, `effectivePermissionRules`, `reanchorMemoryStoreRoot`, `enqueueMemoryAnnouncement`) had no key judgment at all: a misspelled option ran with its default. The four File stores with a ledger (`FileCheckpointStore`, `FileMailboxStore`, `FileBackgroundAgentStore`, `FileWorkflowRunStore`) each read `compactEvery` with `?? <default>` and `fsync` with `!== false` and judged neither: `compactEvery: "abc"` or `NaN` built a store whose ledger never compacts, `0` or `-1` one that rewrites its ledger at every event, and `fsync: "no"` fsynced. `FileStorageBackend` judged its `sessions` hooks, `sessionPolicy.mountedToolNames` and `checkpoint`'s tuning only after it had locked its root (KL-3201-b / -c), and took `checkpoint.sessionHeadOf` / `onCorruptRead` although it always supplied its own (KL-3201-a).
58
+ - **Now.** One name judgment, three layers (`src/core/own-property-receipt.ts`): `strayMembersOf` (names only — a reader of a live object asks it: K6, the limits record, the peer answer, a clamp record), `refuseStrayMembers` (the receipt's admission, then names; throws — the backend's hooks face, judged and handed on uncopied because a hook runs with the face as its `this`), `receiveMembers` (that, then the receipt's frozen copy — every door that reads values reads them off the copy). Every own string key, enumerable or not, and every symbol key is a name, taken from one look at the object's own keys; a key holding `undefined` is a key; an inherited key is no own key; and on an own record the caller hands in directly, every door judges the names before any getter runs (slice 1 judged the string names on the copy, after the getters: a stray key's getter no longer runs; the `TaskSpec` read looks at its names before it reads a member) — except the three seats that judge a declaration receipt's copy (`RunnerDeps.hostFloor`, a `toolFaces` face, a host-supplied MCP transport; KL-3202-a below, until #3222). A stray name is shown as caller text — one line, at most 80 characters of it. Each seat keeps its own code and sentence: the judgment hands its refusal the stray names. The memory-engine seats and the four function bags take the receipt's door with a table (`config.invalid_argument`, the stray names, the nearest taken name, the table). A File store's ledger tuning has one reader (`src/stores/file/ledger-tuning.ts`): `compactEvery` a whole number of events of at least 1, `fsync` a boolean, absent ⇒ the store's default; the four store doors and the backend's pre-check read it, nothing else does. The backend runs, before it resolves, locks or creates anything: its nested records' keys (slice 1), the checkpoint tuning's values, the session-rules store's `mountedToolNames` judge (the store is built from the judged set), and the `sessions` hooks' names. `FileStorageBackendOptions.checkpoint` takes `fsync`, `compactEvery` and `holderIsCurrent` — the options the backend does not supply itself; its type and its table say the same. The hand-written gates left in `src/` are counted, file by file, by an AST census pin that only goes down (103 rows, each with its class: 35 of the same class this slice did not reach, 26 decoders of the engine's own bytes, 41 that are no gate, the primitive itself).
59
+ - **Behavior narrowing — a stray key holding `undefined` is refused at the two seats that read it as absent.** A clamp record (`createSubagentResume`'s `currentClamps`, the workflow tool's `parentClamps()`) and a host-supplied MCP transport (`{ kind: "host", url: undefined }`) are refused by the key's name, in their own sentence and code (`config.invalid_argument`); a key the seat takes, holding `undefined`, is still taken.
60
+ - **Behavior narrowing — a bad `compactEvery` / `fsync` at the four File stores is refused loudly (it was silent).** `new FileMailboxStore(root, { compactEvery: 0 })` and the same at `FileCheckpointStore`, `FileBackgroundAgentStore`, `FileWorkflowRunStore` and `FileStorageBackendOptions.checkpoint` are refused (`config.invalid_argument`, naming the store and the member) before any directory, lock or file exists, where the store used to be built with a threshold its ledger never reaches (`NaN`, a word) or reaches at every event (`0`, a negative); a non-boolean `fsync` is refused where it used to read as on. A numeric string such as `"100"` (compared as a number before) is refused too.
61
+ - **Behavior narrowing — the live readers count every own name (C-R996 addendum 1, open to veto).** `TaskSpec` (K6: `config.spec_unknown_key`), `TaskSpec.limits` (`config.limit_unknown_key`), the peer seat's answer and a clamp record now refuse a non-enumerable own stray key and a symbol-keyed member, which `Object.keys` did not see; an inherited key is still neither read nor refused. A spec handed in as a class instance, a Proxy, or an object carrying a symbol marker (a reactive framework's tag, for one) whose own keys include one the engine does not read is now refused at prepare, by that key's name, with zero model turns (it used to run, the key unread) — @server @cli @client-core, any host that builds its spec that way; the doors that now copy (the auto-mode denial limit, a `contextSettings` overlay, `TaskSpec.outputStyle`, a user attachment) refuse a Proxy, a class instance and a getter that throws by the receipt's refusal (`config.invalid_argument`), as every receipt door does. On a resume that refusal is the resume's one channel: `checkpoint.config_refused`, `detail.code: "config.invalid_argument"`, `detail.field: "taskConfig"`, the checkpoint pending and byte-identical — where a caller's `outputStyle` whose `name` getter threw used to reject the resume with the thrown value itself (#1285's channel takes its codes and nothing else; the getter is no longer outside it).
62
+ - **Hard-breaking — group 1, the memory-engine seats and four function bags refuse a stray option.** *What changed:* `new MemoryEngine(…)` (and its `consolidation` record), `new FileMemoryEngineBackend(dir, …)`, `TaskSpec.retainSubagentSessions` (its record), `adoptFilePermissionRuleStore`, `effectivePermissionRules`, `reanchorMemoryStoreRoot` and `enqueueMemoryAnnouncement` refuse a key their options type does not name, and a bag that is a Proxy or has another prototype (`config.invalid_argument`), before they read a file or a store. *Who:* a host that passes a misspelled, retired or foreign key to one of them, or a class instance as its options (none at the server construction points read for this change: they are object literals — inferred for the rest). *Migrate:* remove or correct the key; pass a plain object.
63
+ - **Hard-breaking — group 2, `FileStorageBackendOptions.checkpoint` no longer takes `sessionHeadOf` / `onCorruptRead`.** *What changed:* the record's type is `Omit<FileCheckpointStoreOptions, "onCorruptRead" | "sessionHeadOf">` and its table refuses both by name (`config.invalid_argument`) before the root exists — the backend always supplied its own session head read and its own sink, so a host's value was taken and never used. *Who:* a host that passes either through the backend (the server's backend construction passes no `checkpoint` — checked at its literal points). *Migrate:* drop the member; a `FileCheckpointStore` built directly still takes both.
64
+ - **Consumers.** @server: your store construction points — check that no `compactEvery` / `fsync` you pass is other than a whole number ≥ 1 / a boolean, and that no memory-engine seat or `checkpoint` record carries a key its type does not name (your literal points pass no `checkpoint`: no change expected). @cli / @client-core: a spec you build as a class instance or Proxy, or one a framework tags with a symbol, is refused if it carries an own key the engine does not read — build it as a plain object (no change expected for a literal spec). @test: black-box cells — a spec with a non-enumerable unknown key or a symbol key fails `config.spec_unknown_key` with zero model turns; `compactEvery: 0` at a File store is refused and leaves its root uncreated; `FileStorageBackend` with a misspelled `sessions` hook leaves its root uncreated, and its hook still runs with the caller's object as `this`; a clamp record with a stray key holding `undefined` is refused.
65
+ - **Known (stated).** KL-3202-a: three seats judge names on a copy the declaration receipt already made — `RunnerDeps.hostFloor` (received at the Runner's construction), a `toolFaces` face and a host-supplied MCP transport (records nested in one declaration) — and that receipt's walk (`DECLARATION_RECEIPT_MODE`, accessors called once) calls every getter before the seat judges a name and leaves symbol-keyed members out of its copy without a word (`src/core/mods/kernel/receive.ts`: the symbol check runs only when accessors are refused). So at those three seats a symbol key is dropped, not refused, and a stray string key's getter runs before its refusal; a stray string key, enumerable or not, is still refused. A transitional limit: the fix is the receipt's (one walk, every declaration reader — #3222: the declaration receipt judges names before getters at every level and refuses symbol-keyed members), not a seat's; this sentence retires when #3222 lands. KL-3202-b: the gates this slice did not reach (35 rows of the same class, counted by the ratchet pin) and about seventy store-family functions whose options bag has no key judgment keep their old readings.
66
+ - **Pins.** `test/backlog3202-store-options-gate-s2.test.ts` G1–G8 (each of the 13 gates: a stray key in its own code and sentence shape, and a control; key presence at the two seats; names before getters, a symbol named, a non-enumerable name at a live reader, a long name bounded; the memory-engine seats; the four function bags; the four File stores' bad tuning cell by cell and the backend's pre-check with no root and no LOCK; the session hooks before the root and their `this`; the checkpoint record's two refused members), `test/backlog3202-unknown-key-gate-ratchet.test.ts` (the AST census of hand-written gates, per file, only down), `test/backlog3186-store-options-gate.test.ts` P10 (the memory-engine seats keyed), `test/backlog2847-store-options-door.test.ts` R1 (the throwing getter sits on a taken option: names are judged first), `test/backlog3059-taskspec-read-once.test.ts` K6 (a non-enumerable and a symbol-keyed unknown key refused, an inherited one and a class's prototype methods not), `test/backlog1285-resume-doors-preclaim.test.ts` ⑦a (the throwing `outputStyle.name` getter on a resume: the channel's refusal, the row untouched) and ⑦b (an uncoded throw, and one whose `code` is no channel word, leave the channel as thrown).
67
+
68
+ ### A background sub-agent has one id — its registry task id (`a…`): its frames, its result, its extension events and its children's attribution now carry the string its row, launch card, notifications, `TaskStop` and `SendMessage` already used (#3193 = #3181 S1, ruled C-R1040 K1 / K2 / K3 / K5 / K6; aligned with Claude Code 2.1.309, whose one minted `agentId` (`h_`, cli309.js:251842) is the task id, the event key and the notification's `task-id`; hard-breaking: four, HB-1–HB-4 below, open to veto; divergence D-3181-a, open to veto; closed sets: +1 `RequirementWord` `row_task_id`; exports: none; members: +1 optional `RunInternals.rowTaskId`, +1 optional `CheckpointState.rowTaskId`) (@server @client-core @cli @test)
69
+
70
+ - **Before.** A background sub-agent had two identities. Its registry handle `a…` keyed its row, its launch card, its completion notification, `TaskStop`, `SendMessage`, the roster and the live-tail envelope; its leg's task id was its session uuid (`spec.taskId ?? sessionId`, and an engine-built child spec names no task id), and that is what its `task_progress` / `task_started` frames, its content events' `sourceTaskId`, its `TaskResult.taskId`, its trace frames, its `HookInvocationIdentity.taskId` and its extension events' `agentId` carried. A consumer joined the two through the fleet frame (`BackgroundChildEvent.transcriptId`), and every downstream view kept a map of its own. The leg's task id was also spelled inline in ten more places (the run layer, the result, the terminal adoption, the settle, the resume pre-screen, the throw backstop), each a copy of the rule.
71
+ - **Now — one mint.** A leg's task id is `legTaskIdOf(spec, internals, sessionId)` = `internals.rowTaskId ?? spec.taskId ?? sessionId`, minted once at prepare (`Prepared.taskId`) and read by every face; the background lanes (plain, fork, the retained continuation's snapshot, the revival) hand the row's handle on the trusted internals seat `RunInternals.rowTaskId` (one function, `backgroundLegFacts`), so the child's task id is the row's id. `spec.taskId` keeps its one meaning — the task id a host declared — and the env factory is still handed only that. The session id stays on `sessionId` / `transcriptId` as the transcript's address. A foreground child has no row: its task id (its `agentId`) is its session id (D-3181-a). A parked background sub-agent's checkpoint records the id (`CheckpointState.rowTaskId`, requirement word `row_task_id`), and a resume that hands no internals restores it, so the resumed leg keeps the id it parked under. `$.agent.spawn` answers with the id the delegation registered the subagent under (`ExtensionCall.launched` is written with it), the string `TaskStop` takes.
72
+ - **Hard-breaking, open to veto.** HB-1 (the frames' and the result's task id): A background sub-agent's own frames and results now carry its registry task id (`a…`, the string `task_notification.task_id`, `BackgroundChildEvent.taskId`, `TaskStop` and `SendMessage` take) as `task_progress.taskId`, `task_started.taskId`, `TaskEvent.sourceTaskId`, `TaskResult.taskId`, trace frames' `taskId` and `HookInvocationIdentity.taskId` — previously its session id. A consumer that joined a tick to its fleet row through `transcriptId` / `sessionId` / `progressTaskId` (the INTEGRATION-CORE id table's former contract ②) or through an in-memory uuid→handle map is affected; an approval-to-row association that equated `AskRequest.sourceTaskId` (the session id — renamed `sourceSessionId` in this version, #3212) with `task_progress.taskId` is affected too. Key a background agent's (`a*` row's) ticks by `taskId` directly — it is the row id; the session id stays on `sessionId` / `transcriptId` as the transcript address, and an approval is attributed to its row by its `agentId` (#3212, its own section). A `BackgroundChildEvent` tick's `progressTaskId` is the task id of the leg that minted the forwarded frame — the row's own id on its own ticks, a descendant's id on a nested one. Workflow-agent (`wa*`) rows are unchanged in this version: their ticks still join through `transcriptId`. HB-2 (the extension events' `agentId`): Every extension event raised on a background sub-agent's leg (`tool.call`, `turn.complete`, `session.end`, the classic family, …) and the `$.agent.spawn` answer now carry that registry task id as `agentId` — previously the child's session id. An extension that treated `agentId` as a session id is affected. Use `agentId` as the agent's address (`TaskStop`, `SendMessage`, the notification's `task_id` are the same string); a foreground child keeps its session id as `agentId` (it has no registry row). HB-3 (a grandchild's attribution): A grandchild spawned by a background sub-agent now carries the parent's registry task id as `parentTaskId` on its `task_progress` frames, and its `BackgroundChildEvent` spawn frame now carries `parentTaskId` (it was omitted, since the parent's task id equaled its session id). A nesting resolver that mapped the parent's session id to its row is affected. Nest by `parentTaskId` = the parent row's id. HB-4 (state across the upgrade): A background sub-agent parked before this version and resumed by its host with no engine internals (a host-driven `resume` of the checkpoint) resumes under its session id as its task id, since its checkpoint records no row id; revived through the engine's own lane (`SendMessage` revival) it resumes under its row id. The task-scoped rows a background sub-agent registered before this version (its own background tasks and its children, owned by its task id — `backgroundScope: "session"` rows are owned by the session and unchanged) stay owned by its session id and are not reachable from the same agent after it resumes under its row id. Let parked background sub-agents settle (or stop them) before upgrading; nothing in this version reads the old id as an alias. In the other direction, a checkpoint that records a row id carries the requirement word `row_task_id`, so a worker older than 7.61.0 refuses it (`version_newer`): finish the upgrade before such cards are resumed, or resume them on a 7.61.0 worker; rows without a row id are unchanged.
73
+ - **Also changed (not breaking).** A sub-agent's queued steer frame (`human_input`, `delivery: "queued"`) carries `sourceTaskId` — the leg's task id, what every other content event of that leg carries — where it carried none when the leg's spec named no task id (the replayed `applied` frame of a parked steer already carried it, so the two frames of one input now agree on every leg).
74
+ - **Who needs it.** A deployment that shows background agents (one row, one id: no tick→row map, no "two rows for one agent" when a tick arrives before the spawn frame, a stop button that sends the id the stop route accepts); an extension that starts a subagent and stops or messages it by the id it was answered.
75
+ - **Consumers.** @server: the run-leg tick→row yield keys on the tick's `taskId` (= the row id) — the claim table, the alias backfill and the uuid→handle branches of the `a*` lane can go; both lanes (the fleet frame lane and the run-leg tick lane) should upsert by the one row id (tick first / spawn first: one row either way); the approval→row association reads the ask's `agentId` (#3212); the live tail's frames now name the URL's handle; a worker on an engine before this version refuses a parked background sub-agent's checkpoint that records the row id — the row requires `row_task_id`, a word it does not know — with the requirement-word refusal it already has (`version_newer`), so a rollback lets such parks settle first, while a checkpoint of a leg on no row lane carries neither the member nor the word and an older worker reads it as before. @client-core: the panel record of an `a*` row keys on the tick's `taskId` (no first-tick freeze to the uuid, no binding queue); the stop key is the row id. @cli: the double-key handover of a background agent row can go. @test: #3058's S1 cell is turned (one id); this entry's criteria are the four sentences above. Wire: `RunInternals.rowTaskId` is present only on a leg a background lane runs; `CheckpointState.rowTaskId` only on such a leg's checkpoint; a host that sets the seat itself sets its own leg's task id (its own trust domain).
76
+ - **Pins.** `test/backlog3193-one-agent-one-id.test.ts` (real Runner lanes: P1 the `$.agent.spawn` answer = `turn.complete` / `session.end` `agentId` = the notification's `task_id` = the launch card's `task_id`, and `TaskStop` stops it by that id; P2 / P5 the plain and fork lanes' frames; P3 a grandchild's `parentTaskId`; P4 the result, the lifecycle identity, the trace frames, the content events; P6 a revival keeps the id; P7 a retained wake — background-born row id, synchronous-born session id; P8 a parked leg resumed with no internals keeps it; P9 a foreground child's session id; P10 the host's declared id and the env factory's ctx; P11 the single-mint row; P12 the ask's session id; P13 a checkpoint with no row id resumes under the session id with no internals, under the row id through the revival; P14 the spawn frame before the child's first frame; P15 the throw backstop; P16 the end-of-task and settle writers; P17 the resume pre-screen and the woken cycle's notification), `test/backlog3058-agent-spawn-entry.test.ts` S1 (turned), `test/backlog1273-live-steer-consumed.test.ts` ④ / ⑤ (the queued steer frame's `sourceTaskId`), and the re-pinned neighbours listed in the receipt.
77
+
78
+ ### The needs-authorization sentences name no settings page the engine cannot see, and the notice for the engine's own credential names no deployment it cannot see (#3200; user-visible wording; one reading each)
79
+
80
+ - **Before.** An MCP server that answered 401 — or whose seat answered "not authorized" — with no authorization address sent the user, in the model's needs-authorization arm, the call-time line and the `mcp.authorization_required` notice, "through the deployment's connector settings": a page a person who attached the server with a local `--mcp-config` does not have. And the notice that tells a person which variables their tool shell does not receive (`inherit_env.names_withheld`), its operator twin (`config.secret_env_scrubbed`) and the refusal of an `inheritEnv` list that names one called the credential a shell mints for an engine it starts itself "this deployment's own credential".
81
+ - **Now.** One predicate per sentence. A seat that gave an address: the sentences are as they were (`authorize … at <url>`). None given: they say only that — "(no authorization address was given)" — and name no place; over servers with and without an address the arm points at the address listed beside each and says the rest were given none. An entry of the engine's own environment is "the engine's own service credential" in all three sentences (one constant). No new member, no new key; every record (`authorization`, `detail.ownCredentials`, the notice's `detail`) is as it was.
82
+ - **Who needs it / who is hurt.** *Needs it:* a person who runs the engine from a shell — local MCP servers, a shell-started engine — whose sentence no longer points at settings that are not there. *Hurt:* a host that matched the old sentence text (`connector settings`, `this deployment's own credential`): read the records, not the words.
83
+ - **Consumers.** @cli @server @test: none — they render or read records that did not change; a host that wants to say where its user authorizes says it through the seat's `authorizeUrl`.
84
+ - **Pins.** `test/backlog2295-unauthorized.test.ts` W1 (no seat: the call-time line), F3 (a seat's address: the notice names it), F3b (a real Runner, no address: arm, notice and record), F3c (the arm over servers with and without an address); `test/backlog3200-own-credential-wording.test.ts` O1–O4 (the person's notice, the operator's notice, the refusal, one phrase); `test/backlog1753-own-credentials-withheld.test.ts` and `test/backlog1963-withheld-env-user-notice.test.ts` repinned to the new words.
85
+
86
+ ### A path rule anchored at a directory whose name holds `*` — or is `**` — reaches that directory, not its siblings (#3189; aligned with Claude Code 2.1.309, which keeps a rule's root apart from its pattern (`xUo` (cli309.js:258818) answers `{ root, pattern }`); behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
87
+
88
+ - **Before.** A rule's base — the declared or installed `root` for `/x`, the `home` for `~/x`, the `cwd` for a relative pattern — was joined to the rule's body and the whole string read as a pattern, so each `*` in the base's own directory names was a wildcard and a base segment named `**` spanned any depth. `Read(/secret/**)` on a task rooted at `/w/a*b` refused `/w/aXb/secret/…` too, an allow `Read(/secret/**)` there cleared reads of the sibling's files, and the row's head and confinement shape started at `/w` (the first segment carrying `*`).
89
+ - **Now.** One reading of a resolution (`resolvePathPattern`, `src/core/permission-rule-model.ts`): the segments the base contributed are a location read letter by letter by every reader — the reach, the head the deny tables judge links at, and the shape an OS confinement translates; only the rule's own body (and the whole of a `//abs` pattern, which has no base) carries `*` / `**`. A base with no `*` reads exactly as before.
90
+ - **Who needs it / who is hurt.** *Needs it:* a host whose task root, configuration directory or execution environment's home has a `*` in a directory name, and every rule anchored there. *Hurt:* a rule that used to reach a sibling of such a directory through that accident no longer does — a deny or ask stops guarding it, an allow stops clearing it. *Compensation:* none needed; a rule meant for the siblings is written with its own `*` in the body.
91
+ - **Consumers.** @server: the configuration root S-2767 anchors user-layer rules at (`SEMA_CONFIG_DIR` / `<home>/.sema`) is read letter by letter like the task root and the home — no host change. @cli: none. @test: a deny `Read(/secret/**)` with `root` = a directory named `a*b` (and one named `**`) refuses only that directory's `secret/`, for the Read tool and `cat` alike; an allow on a leg rooted at `a*b` clears only its own `secret/`.
92
+ - **Pins.** `test/backlog3188-3189-rule-roots.test.ts` ①–⑥ (a real Runner: roots `a*b` and `**`, the controls `a?b` and `[ab]`, the home and cwd words, the bound row's head and shape, an allow list on a leg rooted at `a*b`).
93
+
94
+ ### An allow list member may carry the anchors of its rule set — `{ rule, pathBases }`, the seat and the reading of a deny / ask set's `pathBases` — so a user layer's `/x` allow reaches `<config>/x` (#3188; aligned with Claude Code 2.1.309, which roots an allow rule at its settings layer as it roots a deny (`yHe` → `zBt` (cli309.js:258818)); behavior: none for a string member, and a behavior narrowing for a list with a hole in it (refused, three sentences below; open to veto); hard-breaking: the member type of `TaskSpec.allowedTools` and `RunnerDeps.allowedTools` widens (three sentences below); closed sets: none; exports: +1 root type `AllowListEntry`) (@server @client-core @cli @test)
95
+
96
+ - **Before.** A request's or a deployment's allow list was one set of rule strings read at the leg it was installed on, and nothing could say otherwise: a user settings layer's `Edit(/x/**)` handed in through `TaskSpec.allowedTools` cleared writes to `<task root>/x` and not to `<config>/x`, while a deny / ask rule set could declare its anchors (`PermissionRulePolicyOptions.pathBases`) and guard `<config>/x`.
97
+ - **Now.** A member is a rule string, or `{ rule, pathBases }`: the rule with the anchors of the set it belongs to, read the way a deny / ask set's declaration is read (`policyAnchors`: each word declared, else the leg's). The members declaring the same anchors are one set — one settings layer: `root` = the layer's root, `cwd` = the task root. A string declares nothing and reads as it always did, at the anchors the list was installed with as handed (every word, a `cwd` included). The same rule in two sets is two members: a hit's `clearedBy.positions` are that member's own indices in the list the run received — every index of the list is a member, so a hole in a sparse list is refused (`invalid.entry_type`), never compacted away. A delegated child holds the parent's members with their anchors (`ToolExecuteContext.activeRequestAllowedTools()` answers them), so it reads the rule where the parent did. Deny and ask still win. An anchored member is received by the engine's receipt law for a caller's object — a plain object of exactly `rule` (a string) and `pathBases` (at least one of `root` / `cwd` / `home`, each a string — `pathBases: {}` is refused: a member that declares nothing is the rule string), its own members only (a member a prototype supplies is no member, and the held anchors carry no prototype), refused otherwise with `config.invalid_argument` naming the member, never the value; a declared base a path rule cannot be read at (a relative spelling) is refused as a rule set's declaration is (`config.invalid_permission_rules`, issue `unsupported.path_base` — one judgment, `unusableDeclaredBase`, for both).
98
+ - **Hard-breaking — the members widen.** *What changed:* `TaskSpec.allowedTools` and `RunnerDeps.allowedTools` are `readonly AllowListEntry[]` (was `readonly string[]`), and so are `ToolExecuteContext.activeRequestAllowedTools()` and `RunInternals.inheritedAllowedTools`. *Who is affected:* code that READS one of these as a list of strings — a host that copies, filters or renders a spec's `allowedTools`, a delegation tool that forwards the capture — fails to compile, and a reader at runtime may meet an object; code that only writes strings is unaffected (server writes both lists and reads neither, origin/main `src/task-settings.ts` / `src/boot/runner-deps.ts`). *What to do:* read a member through `typeof m === "string" ? m : m.rule` for its text, and keep `pathBases` with it wherever the member is passed on.
99
+ - **Behavior narrowing — a hole in an allow list is refused (open to veto).** *What changed:* a list handed as `TaskSpec.allowedTools` or `RunnerDeps.allowedTools` with an empty slot (`[ , "Read"]`, an index assigned past the end) is refused with `config.invalid_permission_rules`, one `invalid.entry_type` issue per hole ("entry 0 of the request's allow list … (got undefined)"); 7.60.0 skipped the hole when it checked the list and carried `undefined` into the copy every later reader takes. *Who is affected:* a host that builds the list by writing members at computed indices — a projection of a settings `allow` list that leaves a slot unwritten for an entry it drops (@server, the `settings.permissions.allow` → `TaskSpec.allowedTools` projection; @client-core, an allow bucket it hands on) — now has the run refused instead of starting. *What to do:* build the list densely (`push`, `map`, `filter`), never by index past the end; a dropped entry is left out, not left as a hole — the positions a hit reports are the indices of the list as handed, so a dense list keeps them meaningful.
100
+ - **Consumers.** @server: S-2767's allow half — a `settings.permissions.allow` entry `{ rule, layer }` becomes `{ rule, pathBases: { root: <layer root>, cwd: <task root>, home } }` in `TaskSpec.allowedTools`, one member per entry in the entry's position (positions stay the settings list's indices); a plain string stays a string. @client-core: send the allow bucket's layered entries once the server's capability bit says so, as for deny / ask. @cli: none. @test: a user layer's `Edit(/secret/**)` clears `<config>/secret/…` and not `<task>/secret/…`; a project layer's (or a string) the reverse; a deny on `<config>/secret` still refuses; an object member with an unknown key, an unknown base word or a prototype-supplied member refuses the run.
101
+ - **Pins.** `test/backlog3188-3189-rule-roots.test.ts` ⑦–⑯ (a real Runner: the user and project layer sets and a plain string, deny over allow, positions of the same text in two sets, the delegated child's capture carrying the anchors and a leg seeded with it; the receipt's and the anchors' refusals, the frozen snapshot, the deployment's list; a string list installed with a distinct `cwd` (the exported session policy's deny list), own members against a polluted prototype, a sparse list, an empty declaration).
102
+
103
+ ### Every start a run makes carries the run's byte floor — the starts whose output never reaches the model too — and a floor names the compiled table it judges with (`ReadFloor.id`) (#3190; server S-2715 CA-1 / CA-2 / CA-3; behavior change on an environment that keeps the floor; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: none; members: +1 optional `ReadFloor.id`, +1 optional `ReadDenyMatcher.id` (wire +2 optional), +1 optional `AddWorktreeOptions.readFloor`, +1 optional `WorktreeToolsOptions.readFloor`, +1 optional trailing parameter each on `pruneWorktrees` and `gitCheckIgnoreFilter`) (@server @cli @test)
104
+
105
+ - **Before.** INTEGRATION-CORE §11.1 split the engine's starts by where their output went: the shell faces, the env facts probe, the git status frame and Grep's ripgrep carried `readFloor`; the starts whose output does not reach the model — a worktree's and a delegation's git bookkeeping, Grep's ripgrep version check and existence probe, Read's PDF renderer, the LSP's `git check-ignore`, a mod's `process.run` — carried none, so an environment that keeps the floor ran them unconfined (on macOS with `readFloorConfinement: "os"`, outside the profile) while the program they ran (a git hook, `core.fsmonitor`, a PDF) could be one the model wrote. A floor did not say which table it judged with; equal `rows` were the only handle a relay had.
106
+ - **Now.** One reading: the floor is the run's. Every start a run makes carries the floor of the table that start judges with — a call's start the call's own pinned table, every other start the run's table in force as it begins (one run seat, published by the prepare once the hands mount compiles the tables; `test/backlog2944-read-floor-kept.test.ts` J9 now checks every start site call by call, no `relays` column). A floor read from a live seat is pinned at the start: the start keeps that table's judgment for as long as it lives, a later start reads the newer table, and a start that is no call's reads its own floor as it begins (a worktree mint's or removal's git commands each read theirs). A seat that cannot answer now (a partition of the person's rows unread, the newest tables compiling) refuses the start — the floor read throws — where a no-call start used to run with a refuse-everything floor, or with none when the table it knew held no row. `ReadFloor.id` names the compiled table, minted once in `compileReadDeny` (`ReadDenyMatcher.id`, not enumerable — a spread copy that may judge otherwise has none; `carryHomeViews` keeps it): one `id` ⇒ one judgment, while two compiles of the same rows are two ids. §11.1 now states the floor's path semantics (an alias is judged by its own spelling) and the exec edge (KL-3190-a).
107
+ - **Hard-breaking — the floorless engine starts are gone.** *What changed:* `readFloor` is absent on a start exactly when that table holds no row or the start belongs to no run (`runExecGate`, the oracle's isolation probe, a host mount handed no seat); the starts listed under Before now carry it, so an environment that keeps the floor confines them, or refuses them when it cannot keep the table (`spawn_error`) — the caller then answers by the arm it has for a failed start (the frame degraded, the worktree kept, the PDF read refused). *Who is affected:* an environment adapter that keeps the floor (server's sandbox lane; a host on `readFloorConfinement: "os"`, whose git hooks and PDF renderer now run inside the profile), and an adapter that treated a floorless engine start as a case of its own. *What to do:* treat an absent floor as "no row, or no run's start"; nothing else changes for an environment that does not keep the floor.
108
+ - **Consumers.** @server: on arrival delete the transition arm that answers a floorless engine start with `spawn_error` — read absence as "the table holds no row, or the start is no run's"; a relay may keep what it derived from a floor across starts by `ReadFloor.id` (present ⇔ the floor judges with one compiled table; absent ⇒ derive per start), never by equal `rows`. `ReadDenyMatcher.id`: present on every table `compileReadDeny` returns and on the `carryHomeViews` copy; absent on a hand-built table and on a judge that reads another table at each judgment (`readDenyOver`). `AddWorktreeOptions.readFloor`: present ⇒ every start of the mint and of the tree's removal carries the floor it returns, read as that start begins — a read that throws is that step's failure (the add's refuses the mint before anything exists); absent ⇒ the starts carry none (a caller that holds no run). `WorktreeToolsOptions.readFloor`: present ⇒ every git start of an EnterWorktree / ExitWorktree call carries the floor it returns for that call's id; absent ⇒ none (the Runner always passes the run's). `pruneWorktrees`' trailing `readFloor` (a floor): present ⇒ the prune's start carries it; absent ⇒ none. `gitCheckIgnoreFilter`'s trailing `readFloor` (a reader — the filter lives as long as the language server): present ⇒ read as each check starts and carried by it, a read that throws counting as a failed check (nothing ignored); absent ⇒ none. One shape rule: a one-shot function takes the floor, a long-lived object takes a reader. @cli: no shell change; a host lane on `NodeExecutionEnv` keeps no floor and runs as before. @test: re-verify on macOS with `readFloorConfinement: "os"` that a repository's `post-checkout` hook run by a worktree mint cannot read a refused file, and that every start of a run carries one `ReadFloor.id`.
109
+ - **Known (stated).** KL-3190-a: a refused file the environment lets run gives out what running it reveals (a `#!` line's bytes, a self-printing binary) — the floor judges opens, not execs. KL-3190-b: a library-direct band's floor while its own placement is in flight names no table and judges live; a Runner run's starts never take that arm.
110
+ - **Pins.** `test/backlog3190-read-floor-contract.test.ts` R1–R12 (R1 a real Runner: the env facts probe, the git status snapshot and the model's command carry one floor — one id, the run's rows — and no start of the run is floorless; R2 EnterWorktree / ExitWorktree each carry their own call's floor, a mount handed no seat none; R3 call table vs run table; R4 / R5 one id ⇒ one judgment, a spread copy has none, two compiles two ids; R6 a start keeps the table it was pinned to; R7 a seat that cannot be judged refuses the start (the floor read throws), with or without rows it could cite; R8 a live band facade, no id; R9 path semantics: symlink alias, a refused name that links elsewhere, a hard link; R10 darwin real `sandbox-exec`: a worktree mint's `post-checkout` hook meets no refused byte, the floorless baseline does; R11 darwin: the exec edge; R12 a delegation's worktree mint and finish: every start carries the floor read as it began, a floor that cannot be read keeps the tree and starts nothing); `test/backlog2944-read-floor-kept.test.ts` J9 (every start site, call by call).
111
+
112
+ ### The settings import leaves a user layer's `/x` rule in the settings file instead of storing it as a rule read at every project's root — `CcImportLayer` is a union by `layer`, the user arm carries no `root` (#3191, #3182 S1; ruled C-R1038 K-1 / K-3 / K-6; aligned with Claude Code 2.1.309, which reads `/x` at the root of the rule's own settings layer (`zBt`, `cli309.js:258818`; the user layer at its configuration directory, `Le`, `cli309.js:251921`) and has no import — divergence D-3182-a, open to veto; behavior narrowing, open to veto; hard-breaking: the layer type, three sentences below; closed sets: none — `unsupported.layer_root:` is a new `skipped` reason prefix; exports: none — `CcImportLayer` keeps its name, an interface becomes a type) (@server @cli @client-core @test)
113
+
114
+ - **Before.** `prepareCcImport` stored a user-layer entry as a global row whatever its pattern. A global row reads `/x` at the chain's top leg's root — the task's project root — while the user layer reads it at its own directory (the configuration directory), so the same text guarded or opened another place once stored: a user-layer allow `Edit(/notes/**)` (meant for the configuration directory's `notes/`) let every project's `notes/` be edited with no question, and a deny `Read(/secret/**)` refused `<task>/secret` and not the configuration directory's. A one-step import (prepare → confirm → redeem with no preview shown) landed it silently. `CcImportLayer.root` was required on the user layer and never read.
115
+ - **Now.** A user-layer path pattern written from `/` (`ruleBasesNeeded` names `root`) is not a candidate in any behavior: it is in `preview.skipped` with a reason starting `unsupported.layer_root:` and stays in the settings file, the same law that keeps a bare tool name there (`unsupported.form:`). The reason names the settings layer, the configuration directory and the way to carry the rule (`//<directory>/…`, or `~/<path>` under the home), says that a directory whose name holds a glob character cannot be spelled that way, and prints no path. `//abs`, `~/`, relative and non-path entries of the user layer still import as global rules; every entry of a project or local layer imports as before, `/x` included, scoped to the layer's `root`. A JS host that hands a `root` on the user layer is refused before any layer is read (`config.invalid_argument`, `detail.field` `layers[<i>].root`, the value not echoed); a member holding `undefined` is absence. The store's anchors, the rule sets' `pathBases`, `RuleScope` and the sync wire are unchanged.
116
+ - **Hard-breaking — the layer type.** *What changed:* `CcImportLayer` is a union by `layer` — the `userSettings` arm has no `root` (it was required and never read; `root?: never`, so a root handed for it does not compile, also when the layer word is held as the whole union); a user-layer entry whose pattern reads at the layer's root (`/x`) is no longer a candidate but `skipped` with `unsupported.layer_root`. *Who is affected:* a host building core's `CcImportLayer` — server's HTTP mapping (`src/rules-consent.ts:1453-1458`, `root: l.root` on every layer at `:1456`) and its local-import carrier (`:1207-1211`, `root: "/"` on the user arm at `:1211`) stop compiling; client-core and cli build the sdk wire type, not this one, and see only the new skipped reason; an allow row imported before this version keeps granting at each project until its store's owner runs the one-time retirement (docs/INTEGRATION-CORE.md §5.14), and deny / ask rows keep the store's reading; server's local-import carrier skips its global `/x` rows unless it moves deny / ask to `addPersistedRule`. *What to do:* drop `root` on the user arm (keep it on the project and local arms); move the carrier's deny / ask to `addPersistedRule` in the same change; show the skipped entries; for an entry the person wants carried, spell its directory out (`//<dir>/x`, or `~/<path>` under the home) — a directory whose name holds `*`, `?`, `[`, `]`, `{` or `}` has no literal spelling in the path grammar and cannot be written this way.
117
+ - **An import record prepared before this version (behavior narrowing beside the hard break).** The same law holds where an import record's candidate lands (`redeemRuleTicket`, the boundary the batch walk takes too; one predicate, read by the door and by the landing): a record an earlier door prepared and that is confirmed or redeemed after the upgrade refuses its global `/x` candidates, every behavior, with the same `unsupported.layer_root:` prefix — so a refused deny or ask withholds the batch's allows (the existing batch law), and a dot recorded before the upgrade that never landed does not land on replay. A replay of a global `/x` dot that did land answers `refused`, the way the parser's re-read at the same boundary already answers for a spelling it no longer reads; the row it landed stays until the store's owner retires it. A project-scoped `/x` on such a record lands as before. *Who is affected:* a host that redeems import records it holds across the upgrade (@server, @cli through it): the person prepares the import again and sees the entry in `skipped`.
118
+ - **Rows stored before this version.** Core ships no migration and no read-time drop: the retirement predicate is one sentence in docs/INTEGRATION-CORE.md §5.14 (an add is retired when the row is an allow, the add's origin is `imported-cc`, the scope is global and `ruleBasesNeeded` names `root`; one observed-remove tombstone per row naming those adds, so a row that also holds a `user` add stays; idempotent, run at every start while a rollback to a core before 7.61.0 is supported; deny and ask adds are never retired), and the store's owner runs it (KNOWN-LIMITS KL-3182-a).
119
+ - **Divergence, open to veto.** D-3182-a: the reference computes a rule's root from the settings file it sits in and never moves rules between layers (`zBt`, `cli309.js:258818`); its one cross-root carry found in the corpus (MCP serve launch rules, `d`, `cli309.js:307359`) translates a pattern into an absolute one with its wildcards escaped and keeps the original. The import door here does not carry a user layer's `/x` into the store, and does not translate it: this path grammar has no escape (`src/core/permission-rule-model.ts`, `parsePathRuleContent`).
120
+ - **Who needs it / who is hurt / compensation.** *Needs it:* a person whose user-layer allow names a directory under the configuration directory — today it opens that path in every project, with no consent for that. *Hurt:* a person who wrote `/x` in the user layer meaning "in every project" loses that reading on a new import (the deny no longer refuses inside projects; the allow no longer clears the question); after the store's owner retires old allow rows, a project edit that passed yesterday asks today. *Compensation:* the skipped reason says how to write the rule so it carries; deny and ask rows already stored keep their reading.
121
+ - **Consumers.** @server: the two compile errors above; the one-time retirement by the predicate (idempotent, at every start, for your stated rollback window — two releases, 7.141.0 → 7.142.0), and the local-import carrier's deny / ask through `addPersistedRule` in the same pickup; your preview already hands `skipped` to the operator (`src/rules-consent.ts:391`, the per-row warning at `:1699`); whether the sdk wire's `layers[].root` keeps a user arm is yours — you retire it. @cli: the boot-time import says nothing about skipped entries today; show the `unsupported.layer_root` ones (one line each). @client-core: only the new reason prefix (classify by the first `:`). @test: on the deployment chain, a user-layer allow `Edit(/notes/**)` imported by the boot path leaves a project edit of `notes/a.md` asking; a deny / ask of the same form sent through the server's import body is skipped in the preview and neither refuses nor asks in a project; an allow stored before the upgrade asks once the server's retirement has run.
122
+ - **Pins.** `test/backlog3182-import-layer-root.test.ts` (① a user-layer deny and ask skipped with the prefix; ② the project and local arms unchanged; ③ `//`, `~/` and relative forms global; ④ an allow through prepare → confirm → redeem lands nothing, the rest of the batch lands; ⑤ a real Runner: the store of such an import plus the host's user-layer rule set refuses the configuration directory's `secret/` and reads the task's, a carried relative deny still guards `<task>/local`; ⑤′ no user-layer set: both read; ⑥ non-path rules unchanged, a bare name keeps `unsupported.form:`; ⑦ one file as user and project layer; ⑧ the type, literal and union-typed; ⑧′ the run-time refusal; ⑨ a host carrying its own global rows; ⑩ the reason's words and no path; ⑪–⑬ the retirement predicate on an in-memory store and the door that mints nothing it selects; ⑬′ ⑬″ an import record prepared before the upgrade: pending, confirmed, and a recorded dot that never landed).
123
+
124
+ ### The background Bash watcher takes its first beat at registration, so the output file the receipt names holds the first output at once (#3185; behavior change; hard-breaking: none; closed sets: none; exports: none) (@test)
125
+
126
+ - **Before.** The receipt of a background command says "full output is appended there — Read it any time". The registry watcher that mirrors the process output into that file took its first beat one second after registration, so a Read straight after the receipt — which already shows the output so far — found an empty file for that second (test's 12-of-12 runs).
127
+ - **Now.** The watcher polls once at registration, in the registration's own turn, and the one-second cadence follows; a slow first poll is not stacked by the cadence. The receipt does not wait for that poll (a slow environment must not hold the tool result), so the file can still trail the receipt by one poll round trip — milliseconds, far below a model round trip. Because that poll now runs at registration, a launch followed at once by TaskStop can meet it mid-append: the watcher re-checks the row after its append as it already did after its poll, so a stopped row stays stopped. A TaskStop inside the first second now also reports the output the first beat collected (its terminal frame's `result`), where it used to report nothing because no beat had yet consumed the environment's cursor. The receipt's sentence is unchanged: every receipt the engine mints is a watcher row (a launch registers with a completion sink or is refused before anything is spawned), so there is no receipt for a row without a watcher and no sentence for one. The Monitor's receipt is unchanged (its first beat is the 200 ms batch window).
128
+ - **Consumers.** @test: re-run the receipt-then-Read construct (core3185 / test) on this version: the file named by the receipt holds the first output within the first second. @server: no change; the notification and the file are written by the same watcher as before.
129
+ - **Pins.** `test/backlog3185-background-first-beat.test.ts` (a scripted environment: the file holds the first output before any timer advances and the cadence follows; through the Bash tool, with the cadence's timer held, the file the receipt names holds the output; a slow first poll is not stacked; a TaskStop landing while the first beat's append is in flight is not overwritten with `running`; a launch with no completion sink is refused and advertises no file). Two neighbouring pins are re-pinned: `test/backlog3025-command-record-gap.test.ts` C3 handed the same output to the registration beat and to the stop's drain (a real environment hands it once), and `test/r4a7-spool-disclosure-parity.test.ts` PIN 3b read "no beat before the stop" — the frame now carries the spooled output, the stop still drains and appends nothing.
130
+
131
+ ### A retention policy with a key its seam does not take is refused by name, before anything is judged or deleted (#3180; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
132
+
133
+ - **Before.** `reap(now, { maxAge: 1 })` — `maxAgeMs` misspelled — read as "no age bound": nothing was deleted and nothing was said. The mailbox, workflow-run, background-agent and tool-result sweeps and the durable-agent joint reap only judged the knobs they knew; a key they did not know passed. The file-history seam kept a key check of its own.
134
+ - **Now.** One gate: the retention reading refuses a key outside the list its seam takes (`config.retention_policy_invalid`, naming the key, the seam and the keys it takes). The knob table the validator reads is the single source and each seam names its knobs (mailbox: `maxAgeMs`; workflow-run: `maxAgeMs`, `keep`; background-agent and the durable-agent joint reap: `maxAgeMs`, `keep`, `staleRunningMaxAgeMs`; tool-result: `maxAgeMs`; file-history: `keep`, through the same gate — its own table and loop retire). A knob of the family a seam does not take is refused too. An explicit `undefined` for a knob is still "not applied".
135
+ - **Who needs it / who is affected / compensation.** *Needs it:* a deployment that configures retention from a loose config object. *Affected:* a sweep that carried a misspelled or foreign key and silently deleted nothing now throws; the deployment fixes the spelling. The joint reap's `now` is not a knob and is still taken beside them; its bounds are read off the caller's bag as before (an inherited or non-enumerable bound is taken, not dropped). *Compensation:* none needed beyond the spelling.
136
+ - **Consumers.** @server: your retention loop's policy objects are refused on a stray key (`maxAge`, a `keep` handed to a mailbox sweep). A store you implement yourself should refuse the same keys; the constructor options of the bundled stores pass the same gate now (#3201, above).
137
+ - **Pins.** `test/backlog3180-retention-unknown-knob.test.ts` (every seam refuses a misspelled knob and a foreign one, named and coded, with the rows untouched; each seam takes its own knobs, `undefined` included; the file-history door and the joint reap go through the same gate and sentence; the joint reap still takes an inherited and a non-enumerable bound).
138
+
139
+ ### Every retention sweep reads its policy bag once and deletes by the value it judged (#3179; behavior change; hard-breaking: none; closed sets: none; exports: none)
140
+
141
+ - **Before.** The `reap` of the bundled mailbox, workflow-run and background-agent stores (in memory and on files) and the durable-agent joint reap judged the caller's policy bag at the door and then read its members again inside the sweep (`opts.maxAgeMs`, `opts.keep`). A getter, or a bag its caller changed while the sweep ran, passed the door as one number and swept by another: valid at the door and NaN after kept every row; valid and then absent skipped the sweep.
142
+ - **Now.** One reading: each knob is read once off the caller's bag into a plain frozen copy, that copy is judged, and the sweep deletes by it (`receiveRetentionPolicy`, which `ageCutoff` already took the same way). Since #3201 (above) the bag is received by the receipt law: an inherited member refuses the bag whole and a member whose read throws is the receipt's refusal (`config.invalid_argument`). No valid bag changes what it deletes.
143
+ - **Consumers.** @server: a store you implement yourself should read its bag once the same way; the bundled stores no longer re-read it.
144
+ - **Pins.** `test/backlog3179-reap-reads-bound-once.test.ts` (every sweep seam: each knob is read at most once and the age bound exactly once; a bound valid once and garbage or absent after deletes by the valid one in the in-memory mailbox and workflow-run sweeps; a thrown read is refused at every seam; a plain bag sweeps as before).
145
+
146
+ ### The credential test a memory sync's names go through finds a URL's userinfo inside a value under another scheme, on all four names it judges (#3184; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
147
+
148
+ - **Before.** `carriesCredential` — the one test for a peer identity, a scope key, a store identity, a peer incarnation and the names the sync report carries — parsed the whole value as a URL. A value that wraps a URL under another scheme (`proj:https://user@host/…`) parses as an opaque path with no userinfo slot, so a bare user name there passed: it was shown verbatim in a refusal sentence and in `detail.want`, and a peer incarnation spelled that way rode the cursor and the next claim. A password in the same position was already caught by the egress pass; a bare user name was not.
149
+ - **Now.** The test also looks for a `scheme://` followed by a userinfo and `@` wherever the value holds one (up to the last `@` before a path, query, fragment or blank — and, under a special scheme, before a backslash, which the URL parser reads as a slash), so the four names read one answer, in one linear pass over the value. `proj:https://user@host/x`, `proj:https://user:pw@host/x`, `a/b:ssh://git@host/r`, `proj:smb://DOMAIN\user@host/share` and a second URL in a query (`…?next=https://u@h/`) carry a credential; an empty userinfo (`https://@host/`), an `@` in a path (`https://host/p@q`, `https://host\folder@name`), a scp-style name (`git@github.com:org/repo`) and a plain wrapped URL (`proj:https://host/x`) do not.
150
+ - **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose peer or scope names are built from a URL it then logs or reports. *Affected:* a sync whose peer or incarnation holds such a wrapped URL with a user name is now refused before any read or request, and a scope or store value that does is quoted as the credentials mark in the refusal; both synced as ordinary names before. *Compensation:* name the peer, scope or store without userinfo.
151
+ - **Consumers.** @server: the root export `carriesCredential` answers `true` for these names; a host that judges `target`, layer names or the centre's `peer` with it refuses them with no code change on its side.
152
+ - **Known (stated).** The same-principal egress pass (`redactSecrets`, #2570) still does not read a bare user name in a URL's userinfo as a secret (`https://alice@host/` passes it, and this test refuses it): the difference is recorded, not changed.
153
+ - **Pins.** `test/backlog3184-embedded-userinfo.test.ts` (the judge's table, wrapped forms and controls, and a linear-time pin on long runs of scheme characters and marks; each of the four names through a real `syncMemoryScope` — the peer and the incarnation refused before any request, the scope and the store quoted as the mark in the cursor-mismatch refusal; the report refuses the same names).
154
+
155
+ ### A composition's later leg reads a spend it cannot trust as no room, on every axis — not only cost (#3178; behavior change; hard-breaking: none; closed sets: none; exports: none)
156
+
157
+ - **Before.** The allowance a verification gate's fix leg or a repair loop's later attempt runs on (`laterLegAllowance`) subtracted the earlier legs' reported spend from the task's whole-task ceilings. Only the cost axis read a spend it could not know as "no room"; a negative token count raised the ceiling (a 100-token ceiling with −5 spent dispatched the next leg on 105), and a NaN one rode on to the engine's door as a `maxTokens: NaN` of the caller's own spec, refused there with a sentence that blamed the caller's configuration for a figure the legs reported.
158
+ - **Now.** One reading on all three axes: a spend that is absent, NaN, infinite or negative, held against an armed ceiling, is no room — the composition dispatches no further leg and names the axis (`allowanceExhausted: { axis }`, no `remaining`), as it already did for an unpriced leg under a cost ceiling. A readable spend (zero included) is subtracted exactly as before; an axis with no ceiling never reads its spend. The attribution order is unchanged (tokens, cost, turns).
159
+ - **Consumers.** @server @cli: `verification.allowanceExhausted` can now be `{ axis: "tokens" }` or `{ axis: "turns" }` without `remaining` — the member was already optional on the wire, and absent means the spend on that axis could not be known (never room to spend).
160
+ - **Pins.** `test/backlog3178-allowance-unreadable-spend.test.ts` (negative, NaN and infinite token spend, a negative or NaN turn spend, a negative or NaN priced spend and a suspendable task's `totalTokens` each stop with the axis named and no figure; the attribution order; controls: zero and ordinary spends subtract as before, an axis with no ceiling never reads its spend).
161
+
162
+ ### A write removes the staging files a killed process left beside its target and says how many — `fs.staging_file_swept` (#3160; behavior change; hard-breaking: none; closed sets: +1 `EngineNoticeCode` `fs.staging_file_swept`, audience operator, minter engine, open to veto; exports: none) (@server)
163
+
164
+ - **Before.** `NodeExecutionEnv.writeFile` stages `<name>.tmp.<pid>.<hex12>` beside its target and renames it over. Its cleanup runs in the process, so a process killed mid-write (`SIGKILL`, an out-of-memory kill, a container stop) left the staged file — empty, or up to the whole content — in the user's working tree, and nothing removed it or mentioned it: a later write of the same target did not look.
165
+ - **Now.** One reading of the staging name, written once and used by the minter and the sweep alike: a write of a target first removes the staged siblings of that same target whose pid is certainly gone (`ESRCH`), then says so once — `fs.staging_file_swept`, `detail: { count }`, a number and no names — on the env's `onNotice` seat. A name is claimed only when it is exactly the one this target's staging would carry (a long target's cut name included), the file is a plain file with one name (never a link, a directory or a hard-linked file), and its pid is gone: a running writer's staged file — this process's, so concurrent writes of one target, or another process's — is never touched, nor is the target itself (a long target whose own name spells its cut staging name), and the directory swept is the one the staged file lands in (a `..` after a link is the filesystem's to resolve, never folded). There is no start-up scan of the disk; the sweep happens only beside a target that is being written, and only on the staged path (a write that goes in place stages nothing and sweeps nothing).
166
+ - **Closed set +1, three sentences (open to veto).** *What changed:* `ENGINE_NOTICE_CODES` gains `fs.staging_file_swept` (audience `operator`, minter `engine`; 113 → 114; `detail: { count }`). *Who is affected:* @server — any reader that enumerates the notice codes or keeps a whitelist reads one more row (an unknown code reads as `operator`, the registry's default); nothing mints it unless a write found a dead process's staged file. *Compensation:* none needed beyond the new row; an environment with no notice seat sweeps all the same and says nothing.
167
+ - **Known limits.** The pid is read in this host's process table: a staged file written from another host or container through a shared mount carries a pid this host cannot see, and a write of the same target here would remove it while that write may still be running (its rename then fails and says so); a pid reused by an unrelated live process keeps a dead process's file until that process ends. `KL-3160a` / `KL-3160b`. A user's own file that is named exactly like this target's staging file and has a dead pid in its name is removed (claimed by spelling, as `KL-1105-c` states for the memory store); a link, a directory and a file with a second name are not.
168
+ - **Claude Code 2.1.309.** No sweep of this form: its recognizer of its own staging names (`/\.tmp\.(?:[0-9a-f]{8}|\d+\.[0-9a-f]{12})$/`, `cli309.js:252410` col 3095) is used to leave those names out of listings (`:268879` col 22371), and the one orphan cleanup in the corpus — the native installer's `Cleaned up orphaned temp install file` — reads another name family by age, not by whether the pid is alive (`:268681`, the name test at col 4375). A new behaviour, not a divergence from one.
169
+ - **Pins.** `test/backlog3160-dead-staging-sweep.test.ts` (an empty and a large dead-pid file removed with one notice and a count; a fresh create sweeps and a write with nothing to sweep is silent; no name in the sentence or the detail; no seat, no sound; this process's and its parent's staged files untouched; twelve concurrent writes of one target with one dead file; ten names the sweep must not claim; a directory, a link and a hard-linked file untouched; a cut long name; the target itself never swept; a `..` that walks back out of a link; a write through a link sweeps beside the real target; an aborted call sweeps nothing).
170
+
171
+ ### A directory-liveness probe no longer calls an unclassified answer "gone", and a looping link chain has its own file-error word, `symlink_loop` (#3157; behavior change; hard-breaking: type-level — `FileErrorCode` gains a member; closed sets: +1 `FileErrorCode` `symlink_loop`; exports: none) (@server @cli @client-core)
172
+
173
+ - **Before.** The tracked-cwd probe behind Bash's and Monitor's "your working directory is gone" diagnosis read the catch-all `unknown` as death at its link-resolution step (and, through the resolver, on its first stat), because the Node adapter landed a looping link chain (`ELOOP`) in that catch-all. A remote lane that could not even build its sandbox (a 403 on pod create, no CA) answered `unknown` to both probes, and the model was told "the task root directory no longer exists … likely deleted (e.g. rm -rf)" — a false cause that it relayed to the person.
174
+ - **Now.** One reading: death only from a code that says so. The Node adapter answers a looping chain (a link to itself, a cycle of links, a chain past the platform's follow limit) with its own word, `symlink_loop`; `isDeadCwd` reads `not_found`, `not_directory` and `symlink_loop` as an unusable directory at each of its three steps and never `unknown`. A probe that answers `unknown` leaves the command to run, and Bash reports the spawn's own error. The written exception and its second predicate are gone.
175
+ - **Not moved, on purpose.** `symlink_loop` is not an absence. The shell read station's door, its verdicts on a command that names a looping path (an approval card, as before), the deny rows and the link-chain walk all read a looping path exactly as they did when the adapter said `unknown`. Claude Code 2.1.309 resolves a looping path the same way — to *unresolved*, not to "nothing is there": its path walker `Ce` reports an absence only for `ENOENT` / `ENOTDIR` and hands every other errno (`ELOOP` included) to `nn`, which marks the ancestry unverified (`cli309.js:251972`: `nn` col 1736, its benign set at col 1881, `Ce`'s absence report col 5946 and its hand-off to `nn` col 6107), and its screen / permission resolver `En` answers `{ unresolved: true, reason: "past-a-link" }` for it (`:251972`: the explicit `ELOOP` flag `h` at col 15499, `B()` at col 15881 and 15972, the hand-off at col 16310).
176
+ - **Hard-breaking, three sentences (open to veto).** *What changed:* `FileErrorCode` gains `symlink_loop`, and the Node adapter's file operations answer it where they answered `unknown` for an `ELOOP` (`fileInfo`, `canonicalPath`, `listDir`, `readLink`, the reads). *Who is affected:* @server, @cli and @client-core — a type-level consumer with an exhaustive `switch` or a `Record<FileErrorCode, …>` over the union stops compiling until the word has a case, and code that matched the old `unknown` for a loop by code reads `symlink_loop`; nothing in this engine keyed on `unknown`. *Compensation:* read `symlink_loop` as `unknown` wherever the answer was a failure (that is what it was) and with `not_found` / `not_directory` only where the question is "is this a usable directory"; an adapter that never says it (a remote one) keeps working — its `unknown` now simply means "not dead".
177
+ - **Consumers.** @server: no change needed; a lane whose probes answer `unknown` now gets the spawn's own error through instead of the "no longer exists" sentence. @client-core: a `Record<FileErrorCode, …>` needs the new key. @cli: none beyond the type.
178
+ - **Pins.** `test/backlog3157-dead-cwd-certain-codes.test.ts` (the adapter's word over a leaf self-loop, a two-link cycle and an ancestor loop; `isDeadCwd` over the same real loops and every placement of `unknown` on scripted faces; the Bash sentence for the double-`unknown` face; and the stations that must not move — the door's record, eight verdicts on looping paths with the ENOTDIR control and the deny rows, the chain walk). `test/backlog1018-monitor-dead-cwd-preprobe.test.ts` re-pinned: its "`unknown` ⇒ dead" cells now read "not dead, the spawn runs"; loops read `symlink_loop`.
179
+
180
+ ### A PermissionRequest hook's refusal says a hook refused, instead of "this run has no interactive approval channel" — the approver names which machine seat answered with `decidedVia` (#3169; ruled C-R1024 R2, addendum 1; aligned with Claude Code 2.1.309, which hands the hook's message to the model as the refusal (`iPt`, `cli309.js:288208`; `runHooks`, `cli309.js:295883`) — the hook's words are fenced here, the existing divergence kept; behavior change; hard-breaking: none; closed sets: +1 new `DECIDED_VIA` (`policy`, `permission_request_hook`); exports: +1 root value `DECIDED_VIA`, +1 root type `DecidedVia`; members: +1 optional `AskOutcome.decidedVia`, +1 optional `HostDecisionFacts.decidedVia` (`hostDecision.decidedVia` on a decide; wire +1 optional key)) (@cli @client-core @server @test)
181
+
182
+ - **Before.** A refusal the approval channel reported as the deployment's policy (`settledBy: "policy"`, or a decide's `hostDecision.decidedBy: "policy"`) always read "approval required for `<tool>` but this run has no interactive approval channel … The deployment's policy declined this tool use … Action requires interactive approval and permission prompts are not available in this context", with the reason as a policy note. A shell that ran a PermissionRequest hook and got a deny could only report it that way, so under `-p` / the SDK the model was told nothing could answer, when a hook had answered, and its reason arrived as the deployment's note.
183
+ - **Now.** The outcome object (and the decide's facts) may name the seat: `decidedVia: "permission_request_hook"` makes the sentence "a PermissionRequest hook denied this call to `<tool>`[: <ask>]", then "The call did NOT run. Do not claim it succeeded and do not retry it unchanged; report what was blocked and why you needed it, then continue with the parts of the task it does not block.", and the hook's reason inside an `UNTRUSTED hook reason` fence (none ⇒ no fence). `"policy"`, or no member, keeps today's sentence byte for byte. On a durable resume the continuation reminder names the same decider ("was DENIED by a PermissionRequest hook, not by a person"). The record does not change: `policy_refused` / `policy_allowed`, `who.party: "policy"`. A value outside the set, or the member beside a person's word or an elapsed window, is refused loudly (synchronous: a fail-closed deny settled `approver_contract`; durable: pre-CAS `checkpoint.invalid_outcome`, `detail.field: "hostDecision"`); the refusal names the member, not the value. A plan pause's decide takes the member under the same screen and its reminder still names the party only (KL-3169-a).
184
+ - **Consumers.** @cli: the hook settle path (`settleCardHookResults`' deny arm) sends `decidedVia: "permission_request_hook"` beside `settledBy: "policy"` (L-2199); a hook's allow may carry it too — it is screened and not read. @client-core: the package's hook deny sends the same word (CC-1114); the member is +1 optional on the outcome type. @server: pass `hostDecision.decidedVia` through your decide door unchanged (+1 optional key; a door that copies `decidedBy` and `approver` member by member must copy it too, or the resumed leg reads the deployment's sentence). @test: the two sentence forms above, the byte-identical policy sentence, and the two loud refusals are the black-box surface.
185
+ - **Pins.** `test/backlog3169-decided-via-hook-refusal.test.ts` (both doors and the durable leg: a hook's deny with and without a reason, the fenced reason, the policy word and its absence byte-identical to the 1016 sentences, the continuation reminder naming the hook, the out-of-set value and the member beside a person / a timeout / a sweep refused on each door, the plan pause accepting it, the closed set at the package root).
186
+
187
+ ### A shell read through a link chain meets a deny rule on a directory the chain passes through, as the Read tool already did (#3168; aligned with Claude Code 2.1.309 `En` (cli309.js:251972), whose permission spellings carry each leaf link's target; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @test)
188
+
189
+ - **Before.** With `link → mid/hop` and `mid/hop → ../final/f.txt` and a deny `Read(/mid/**)`, `cat link` was judged on its spelling (`link`) and on where it lands (`final/f.txt`) only, so the file's content reached the model, while the Read tool on `link` was refused (the gate's reading of a call's target judges each hop of the leaf chain). The write face had the same gap: `echo x > link` under `Edit(/mid/**)` wrote `final/f.txt`.
190
+ - **Now.** One reading for both faces: the shell read station reads the target's leaf symlink chain through the reader a call's target reading uses (`symlinkChainHops`), behind the same gate (`leafChainMayHold`, `src/core/path-identity.ts`: only where a link may be on the way), and judges every hop as a deny view on the read and the write face. The gate also opens on a target that did not resolve as it is spelled — a leaf link whose own target does not exist yet (`mid/hop → ../final/new`) is a hop, so `echo payload > final/new; cat link` is refused before anything is created. The pre-spawn identity check compares the hops as well as the landing: a chain re-pointed through another directory onto the same terminal, between the approval and the spawn, is judged again rather than run. A chain the environment could not read is recorded at the station's door like any lookup that gave no answer (the command is `unanswered`); an environment that declares no chain reader adds no hop.
191
+ - **Not covered (stated).** A link in a PARENT directory of the target (`d/f.txt` with `d → mid/hop`) is not a hop of the leaf chain — the reference judges leaf hops only, and so do both lanes here.
192
+ - **Who needs it / who is hurt.** *Needs it:* a person whose deny names a directory that a link chain runs through. *Hurt:* a command that read or wrote through such a chain now stops with the read-deny sentence naming the hop; a shell operand that resolved through a link, climbs a `..`, or does not exist yet costs one chain read of the environment.
193
+ - **Consumers.** @cli: the acceptance's `cat link` construct (TRIAGE157-A side note d) is refused with the engine's read-deny sentence; no shell change. @test: re-verify `link → mid/hop → final/f.txt` × {Read, `cat`} under `Read(/mid/**)` — both refused — and a direct `final/f.txt` read under the same rule, which reads.
194
+ - **Pins.** `test/backlog3167-3168-layer-root-and-chain-hops.test.ts` ⑤–⑩ (a real Runner: the Read tool and `cat link` refused in `default` and `bypassPermissions`, `echo x > link` writes nothing; controls `cat final/f.txt`, `Read(/final/**)`, `Read(/link)`; an environment without a chain reader adds no hop, a plain operand costs no chain call; ⑨ an approved `cat link` whose chain is re-pointed through `mid/` before the spawn is refused; ⑩ a dangling chain through `mid/` is refused for `cat` and for a write-then-read, a plain missing file reads as before).
195
+
196
+ ### `pathBases` states how a settings layer's `/x` is anchored: one rule set per layer, `root` = the layer's root (#3167; docs and contract pins; behavior: none; hard-breaking: none) (@server @client-core @cli)
197
+
198
+ - **What.** Claude Code 2.1.309 reads a rule's `/x` at the root of the settings layer the rule came from (`zBt` (cli309.js:258818) → `ZLe` (cli309.js:253192) → `swn` (cli309.js:252700)): the user layer at its configuration directory, the project and local layers at the working directory; a relative pattern reads at the working directory, `~/` at the home. The engine's seat for that root is the rule set's declared `PermissionRulePolicyOptions.pathBases`, now stated on the option: one set per layer, `root` = the layer's root, `cwd` = the task root. Rules of several layers merged into one set read every `/x` at that one set's root — how a user-layer `Read(/secret/**)` came to guard `<task>/secret` and leave `<config>/secret` readable.
199
+ - **Consumers.** @server: build one rule-list policy per settings-layer root (`pathBases: { root: <layer root>, cwd: <task root>, home }`) instead of one policy over the merged list. @client-core: carry each rule's layer root to the server (CC-1113). @cli: L-2197 follows from those two; nothing in the engine changes.
200
+ - **Known (stated).** A rule imported from a user settings layer into the person's stored rows is anchored at the task root, not at the configuration directory (#3182) — from this release a user layer's `/x` is not imported (the section on the settings import above, #3191).
201
+ - **Pins.** `test/backlog3167-3168-layer-root-and-chain-hops.test.ts` ①–④ (a real Runner: one set at the task root guards only `<task>/secret`; one set per layer guards both directories for Read and `cat`; `//` and `~/` read alike under either root; a relative pattern reads at the declared `cwd`, else at the declared root).
202
+
203
+ ### The kernel contract number is 7 — a mod package written against contract 6 is refused (#3009, #3008, #3058; mods S3b; hard-breaking: yes, open to veto; closed sets: none of its own; exports: none — the value of `KERNEL_CONTRACT_VERSION` moves, its name does not) (@server @cli @client-core @test)
204
+
205
+ - **Hard-breaking, open to veto: a mod package written against contract 6 is refused (@server @cli @client-core @test).** What changed: `KERNEL_CONTRACT_VERSION` is 7 (7.60.0 shipped 6), raised once for this release's `MOD_EVENT_TABLE` changes — `session.receive`, `session.append`, `session.send` and `session.compact` have stations, and `agent.spawn`, `session.append`, `session.send` and `session.compact` have a `call` column, so a `$` call of each reaches the host's entry (the sections below); `loadModPackage` loads only a package whose `hooks.json` states `"contract": 7` (`src/core/mods/package.ts:72-73`), and `@sema-agent/mods-kernel`, which compiles the same source, answers the same number. Who is hurt: every mod package written for 7.60.0 — it states `"contract": 6` and is refused at load with a sentence naming both numbers (a deployment loading a real package, the CLI's package leg, test's real-package fixtures), and a host that compares two kernel copies for equality; a consumer that spells the number in a fixture or a pin raises it (this repo's three fixtures, `test/fixtures/mods/{diff,sec-default,telemetry}/hooks/hooks.json`, were raised to 7). What to do instead: set `"contract": 7`; contract 7 only adds the four stations and the `call` columns, so a package that names none of them needs no other change.
206
+ - **Pins.** `test/mods-real-e2e.test.ts` D3 (a package that states no number, the number minus one, the number plus one or the number spelled as a string is refused, naming the engine's number); `test/mods-kernel.layering.test.ts` and `test/backlog2104-mods-kernel-publish.test.ts` (the root export and the package copy answer one number); `test/backlog3009-session-receive-send-compact.test.ts`, `test/backlog3008-session-append.test.ts`, `test/backlog3058-agent-spawn-entry.test.ts` and `test/backlog2457-2458-mods-wave3-stations.test.ts` (the number is at least the one that carries their rows).
207
+
208
+ ### A frame the session receives, a message it sends and a compaction pass each pass one station — `session.receive`, `session.send` and `session.compact` have stations, and `$.session.send` / `$.session.compact` are callable (#3009; mods S3b-2, design/1398-s3b-s4 r1, C-R985; behavior change only where a handler hangs on one of the three; divergences D-S1 / D-S6 / D-S8 / D-S9 / D-S10, open to veto; hard-breaking: H-S1 — the injection outcome words gain `refused`, three sentences below; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` station rows +3 (`session.receive`; `session.send` and `session.compact`, each with a `call` column), `NOTIFICATION_INJECTION_OUTCOMES` +1 (`refused`), +2 new — `SESSION_RECEIVE_ORIGIN_KINDS` (5) and `SESSION_SEND_ORIGIN_KINDS` (2); exports: +2 root values `SESSION_RECEIVE_ORIGIN_KINDS`, `SESSION_SEND_ORIGIN_KINDS`, +4 root types `SessionReceiveOrigin`, `SessionSendOrigin`, `SessionSendAnswer`, `SessionCompactAnswer`; members: +1 optional `requestedBy` on `compacted` and on `compaction_outcome` (wire +1 optional key each)) (@server @cli @client-core @test)
209
+
210
+ - **Before.** `session.receive`, `session.send` and `session.compact` were names in the table with no station: a registration that selected one was refused at admission. A frame reached the model by three paths — pushed on the live lane (a task's notification, a teammate's message, a host's `notify`, a peer letter the session box injects), redelivered at a run's turn open, pulled by `ReadInbox` — and none of them had a place an extension could read, rewrite or hold it; SendMessage resolved and delivered with no extension asked; a compaction pass had `classic.PreCompact` / `classic.PostCompact` and no way for an extension to veto the pass, hand its own summary or ask for one.
211
+ - **Now — `session.receive`, one station for three faces.** The live lane's subscriber, the turn-open redelivery and the box's `ReadInbox` page (a held letter released onto it included) each hand the frame to the session's receiving station before the hand-over, once (`src/core/mods/session-receive.ts`). With a handler on the event the station raises it; with none — or before the leg's bus is bound — the frame passes as made and nothing is raised. `e = { origin, event, text, agentId? }` plus the identity envelope; `origin` (`SESSION_RECEIVE_ORIGIN_KINDS`: `{ kind: "task", taskType }`, `{ kind: "agent", from }`, `{ kind: "peer", from }`, `{ kind: "host", from? }`, `{ kind: "engine" }`), `event` (`{ taskId, taskType, status, seq? }`) and `agentId` are pinned and read off the frame's typed facts; `text` is what the model would read. `next({ ...e, text })` hands the frame over with that text (what comes up is `{ text }`); `{ consumed: <reason> }` keeps it from the model and it is not owed again — a peer letter's sender gets a `refused` delivery receipt naming the extension and its reason, a teammate's SendMessage reads "Message not delivered: … did not take it", a child's uplink to main reads the same, and the injector answers `refused`. A failure refuses: a handler that throws, runs past its budget or answers a form the station does not take (a blank text included) leaves the frame consumed (fail-closed). A cancel hands it over as made. Every consumed frame is said once on the leg's report sink (`onError`), whichever face it came by.
212
+ - **Now — `session.send`, raised once by SendMessage.** After its pre-delivery refusals (an empty message, `*`, an `@` address, an observer sender or target) and before it resolves the address, SendMessage raises `session.send` once (`src/core/mods/session-send.ts`): `e = { origin, to, text, agentId? }`, all four pinned: `origin` (`SESSION_SEND_ORIGIN_KINDS`: `{ kind: "model" }`, or `{ kind: "plugin", name }` when the call came from `$.session.send` / `$.tool.call`), `to` (the address as the model wrote it), `text`, `agentId`. `next(e)` lets the message go; `{ isDelivered: false, reason }` in place of next keeps it from going — the model reads "Message not sent: extension "x" refused this message before it went: <reason>" (`code: "send_refused"`). A delivery claimed by a handler (`{ isDelivered: true }`), a changed address and a failure before next refuse (fail-closed); a refusal after next is a violation and the message stands. With no handler nothing is raised.
213
+ - **Now — `$.session.send({ to, text })`.** The leg's SendMessage, run as the caller's own call through the leg's `$.tool.call` pipeline (the same gate, rules and approver as a model's call; the station sees `origin: { kind: "plugin", name }`). It answers `{ isDelivered: true }` or `{ isDelivered: false, reason }` (returned, not thrown); a leg with no SendMessage mounted answers "this session has no SendMessage tool (messaging between sessions and agents is not on here)". A key it does not take or a blank `to` / `text` is the caller's throw.
214
+ - **Now — `session.compact`, every pass through one station.** The turn boundary's pass (auto, manual, trim-forced), the prompt-too-long recovery's (forced), the end-of-task pass and `Runner.compactSession` all run through one station (`src/core/mods/session-compact.ts`), raised once where the pass is about to run — after the trigger gate and a valid cut point, where `classic.PreCompact` is raised; that hook is now the station's bottom, with the summary, the commit and `classic.PostCompact`. A pass that never wanted to run raises nothing; with no handler the pass is as it was. `e = { trigger, instructions?, agentId? }`, all pinned; `instructions` is the text a claimed manual request named, present only then. `next(e)` answers the pass's outcome once it has ended, `{ outcome, tokensBefore?, freedTokens? }`. In place of next: `{ skip: <reason> }` blocks the pass (`compaction_outcome` `blocked`); `{ summary: <text> }` is the pass's summary through the summary seat a deployment's provider answers — no model call, and neither `classic.PreCompact` nor `classic.PostCompact` is raised (a split turn or the provider's reuse cap bypasses the seat; the model summarizes and the report sink says the handler's summary was not used). A skip or a summary after next is a violation and the pass stands; one handed up from below — a handler under it answered it in place of its own next, so nothing ran — still stands in place of next. A failure before next blocks the pass, said on the report sink. On a `forced` pass every refusal is said and ignored, and the pass runs as with no handler.
215
+ - **Now — `$.session.compact({ instructions? })`.** From a handler of the boundary's `turn.complete` (any handler of its chain), called directly while that dispatch runs, it runs the boundary's own pass then and there as a manual request (it coalesces with any `compact()` request parked on the seat), under the caller's frames, and answers `{ outcome }`; the frame that ends the pass — `compacted`, or `compaction_outcome` — carries `requestedBy: { kind: "extension", name }`. Called anywhere else — a handler of an event raised while the turn runs, a call nested in another dispatch at the boundary — it throws "<name>: $.session.compact: not called from a turn.complete handler; the conversation compacts between turns, so call it from turn.complete or later", and the same sentence goes to the report sink. A call while the boundary's in-place pass runs is refused ("a compaction is already running at this boundary"); a call kept for after the dispatch ended (a timer, a later chain) is refused ("called after the turn.complete dispatch it was made in had ended; …", said on the sink too); a pass a handler started and did not await ends before the boundary moves on. It is not on `$` of `Runner.compactSession` (there is no turn).
216
+ - **Hard-breaking (H-S1) — `refused` is an injection outcome.** *What changed:* `NotificationInjectionOutcome` / `NOTIFICATION_INJECTION_OUTCOMES` gain `refused` (and `NotificationDisposition` with it): the engine's injector answers it for a pushed frame the receiving station consumed, and `deliverToRunningAgent`'s `ok: false` reasons gain it. *Who is affected:* a host that switches exhaustively over the outcome words (a TypeScript `never` check) or mirrors them in a table — server, cli and client-core origin/main read none of them (no `NotificationInjectionOutcome`, `NOTIFICATION_INJECTION_OUTCOMES`, `parked_durably` or `dropped_duplicate` outside their docs); a host-wired injector (`TaskRegistry`'s notify seat) is not asked to answer it. *What to do:* add an arm for `refused` (the frame was not handed to the model and is not owed again; the receipt names who) — `isNotificationInjectionOutcome` already accepts it.
217
+ - **Divergences, open to veto.** D-S1: a `session.receive` handler's failure consumes the frame; Claude Code 2.1.309 skips a failed handler and consumes only a frame it could not give its hooks (`ee` (cli309.js:256939)) — an input station that can keep a frame from the model fails closed here. D-S6: `{ summary }` is a text through the existing summary seat; the reference takes replacement messages (`Fu` (cli309.js:255554)). D-S8: `e.instructions` is pinned and carries only the claimed manual request's text — the one door for a pass's instructions stays `classic.PreCompact`'s `additionalInstructions`; the reference lets a handler change them (`Fu` (cli309.js:255554)). D-S9: `$.session.compact` runs in place only when called directly from a `turn.complete` handler and is refused anywhere else, with the reference's sentence; the reference compacts from any point outside a held turn (`jPo` (cli309.js:263417), `turnHeld` (cli309.js:266857)); a compaction switched off answers `{ outcome: "disabled" }` here where the reference throws. D-S10: `session.send` is raised once, before the address is resolved, and `to` is the address the model wrote; the reference raises after resolution (`qa` (cli309.js:288155)) — SendMessage resolves on three arms (a peer session, `main`, the task registry), each on its own, so there is no single point after resolution.
218
+ - **Who needs it / who is affected / compensation.** *Needs it:* a deployment that holds or scrubs what reaches the model from outside the conversation (a webhook's text, a peer's letter), that gates which sessions and agents a run may message, or that shapes or vetoes compaction (its own summarizer, a quiet window). *Affected:* a run with a handler on one of the three — a frame it consumed is on the host's stream (the `task_notification` event is emitted when the frame arrives, before the station answers; KL-3009-a) and not in the conversation; a message it refused is not sent; a pass it skipped does not run. *Compensation:* the report sink names every consumed frame and every refusal nothing else says; with no handler nothing is raised and nothing changes.
219
+ - **Consumers.** @server: `compacted` / `compaction_outcome` may carry `requestedBy` (an object `{ kind: "extension", name }`) — the two projections name their keys (`src/trace/project.ts`'s compacted mint, `compactionOutcomeEventData`) and `src/trace/core-keyset-guard.ts` reads the core key sets, so the key is +1 on each to project or list as dropped; a peer letter's `refused` delivery receipt may now name an extension in its `detail`; the H-S1 arm above. @cli: render `requestedBy` on the compaction divider or drop it; a teammate receipt can read "Message not delivered: … did not take it"; the H-S1 arm. @client-core: the two origin closed sets are the shapes `e.origin` takes; `requestedBy` is attribution; the H-S1 arm. @test: the three rows, the two closed sets, the outcome word and the answer forms above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `Prepared.receiveSeat` / `turnOpenRedelivery` / `compactStation`, `FrameSettlement.consumed`, `ToolExecuteContext.sendStation`, `LegFacadeSeats.sessionSend` / `sessionCompact`, `TaskNotificationPayload.received` (the station's copy of a frame it rewrote — engine-internal, never on the wire).
220
+ - **Pins.** `test/backlog3009-session-receive-send-compact.test.ts` (K the three rows, the closed sets and the contract number; P6 a real Runner: a host notify consumed, rewritten, failed and with no handler, and a session box's pushed and pulled letters consumed — neither read by the model, both out of the box, the sender told `refused` naming the extension — and rewritten on the pull; P7 SendMessage with the station: a refusal in place of next, the go-ahead and `e`, a claimed delivery, a changed address, a refusal after next, no handler, `$.session.send` through `$.tool.call` and with no SendMessage mounted on a real Runner; P8 `Runner.compactSession` with a skip, a summary (no model call, no classic hooks), a skip after next, a throw, a bad form, next's outcome and no handler; `$.session.compact` in place from `turn.complete` on a real Runner — the outcome, `requestedBy`, `e.instructions` and the summary request carrying them — with compaction off, from a handler mid-turn and nested in the pass (refused, said on the sink), from a handler below one that forwards next (runs), kept for after the dispatch ended (refused, said, no pass) and not awaited (the next model request comes after the pass), and with a bad argument; P6i a held letter approved and then pulled passes the station; P8k a summary or a skip handed up through a forwarding handler stands). `test/mods-kernel-296.test.ts` counts the three stations and `test/mods-kernel-wave2.test.ts` the two `call` columns. Q: an unheard seat — unbound, or no handler on its event — adds no suspension point of its own (each of the three entries, and `session.append`'s, reads one predicate first and synchronously; the compaction entry hands back the lane's own pass); the one hop a run with no handler gains is the boundary's call of its compaction section, now one function the boundary and `$.session.compact` in place both run (`test/forward-subagent-events-drain.test.ts` 62 → 63).
221
+
222
+ ### A run whose model kept sending unparseable tool calls, or kept hitting the output cap, now ends `failed` with a code and a sentence instead of an empty `completed` (#3165; behavior change; hard-breaking: none; closed sets: the failed terminal's `errorCode` values +2 — `model.malformed_tool_use_exhausted`, `model.truncated_output_exhausted` — and `errorClassOf`'s exact `output` rows +2; exports: none) (@server @cli @client-core @test)
223
+
224
+ - **Before.** When every tool call of the model's turns arrived unparseable until the engine's retry budget ran out (two retries), or the model's answer kept ending at the output cap until the continue budget ran out (three continues), the loop stopped on its own exit word — but the run's result was read off the last message alone, so it ended `completed`, often with an empty result, no error code and nothing on screen to say the work never finished.
225
+ - **Now.** One rule: the word the loop's last exit named reaches the run's terminal. Those two exits end the run `failed`, with `errorCode` `model.malformed_tool_use_exhausted` and the message "The model's tool call could not be parsed (retry also failed)." (Claude Code 2.1.309's sentence, `cli309.js` L273678), or `model.truncated_output_exhausted` and "The model's response exceeded the output token maximum (continuing also failed)."; the text the model reached stays in `result`. Every other exit reads as before; a streak the model recovers from still completes. `errorClassOf` reads both codes as `output`.
226
+ - **Wire, three sentences.** *What*: a failed terminal can carry two new `errorCode` values, `model.malformed_tool_use_exhausted` and `model.truncated_output_exhausted`, on runs that used to report `completed`. *Who*: hosts and projections that route a failed run by code or show its message. *How*: no key changes shape; a consumer that pins a closed set of `errorCode` values adds these two, and one that keeps a default arm for unknown codes shows the message as given.
227
+ - **Consumers.** @server: the run's status projects from the terminal as it does for every failed run, so a run that used to end `completed` now ends `failed` with `model.malformed_tool_use_exhausted` or `model.truncated_output_exhausted`; add both to any `errorCode` closed set or error-mapping table you pin. @cli: such a run reaches you as any failed run does, with the sentence as its message; add both codes to any `errorCode` closed set you pin. @client-core: the failed terminal reaches your projection the same way; add both codes to any `errorCode` closed set or code switch you pin (a switch with a default arm needs nothing). @test: the s139d malformed-turn cell (Anthropic route) now reads `failed` with `model.malformed_tool_use_exhausted`, and an output-cap streak reads `failed` with `model.truncated_output_exhausted`; both join the expected `errorCode` set.
228
+ - **Pins.** `test/backlog3165-loop-exhaustion-terminal.test.ts` (a scripted brain through the real Runner: each exhaustion fails with its code, sentence and request count; a recovered malformed streak, a recovered output-cap streak and a plain empty `stop` complete; the real Anthropic lane over SSE: an unnamed `tool_use` every turn, a `max_tokens` stop every turn; the class fold).
229
+
230
+ ### A classifier seat retired for its rate limit is now told to the person, as `classifier.unavailable` is (#3166; ruled C-R1020 A; behavior change; hard-breaking: none; closed sets: none; exports: none)
231
+
232
+ - **Before.** When the auto-mode classifier model was rate limited on several classifications in a row and stopped being asked for the rest of the run, `classifier.seat_rate_limited` went to the operator only: every later gated call in the person's run was judged by the main model instead, and the person was not told.
233
+ - **Now.** The notice's audience is `user` — the same as `classifier.unavailable`, which tells the same consequence (the classifier is not the one ruling). It still carries `sessionId` at the top level and in `detail`, and the operator still hears it through the notice sink.
234
+ - **Consumers.** @server: `noticeAudienceOf("classifier.seat_rate_limited")` now reads `user`; your engine-notice wire gate will ask you to enroll the code (it is in your rejected table today with the reason "core reads operator") — enrolling it puts the line on the session's event stream; nothing else changes. @test: the core3166 check (the run event stream's `engine_notice` with `sessionId`, the `-p` lane's `_sema_engine_notice`, the TUI fallback line) can run once the server enrolls the code.
235
+ - **Pins.** `test/backlog3166-seat-rate-limited-audience.test.ts` (the audience row reads `user`, as `classifier.unavailable`'s; the notice minted on a real Runner carries the run's `sessionId` at the top level and in `detail`; the contract sentence names `sessionId?`).
236
+
237
+ ### Every conversation row passes one admission seat at its first commit point, and an extension can rewrite its text there — `session.append` has a station, and `$.session.append` adds an extension's own note (#3008, #1933; mods S3b-1, design/1398-s3b-s4 r1, C-R985; behavior change only where a handler hangs on `session.append`; divergences D-3008-a / b / c / e, open to veto; hard-breaking: none; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` station rows +1 (`session.append`, with a `call` column), +2 new — `SESSION_APPEND_DOORS` (6) and `SESSION_APPEND_ORIGIN_KINDS` (5); exports: +2 root values `SESSION_APPEND_DOORS`, `SESSION_APPEND_ORIGIN_KINDS`, +4 root types `SessionAppendDoor`, `SessionAppendOrigin`, `SessionAppendAnswer`, `RowRewrittenBy`) (@server @cli @client-core @test)
238
+
239
+ - **Before.** `session.append` was a name in the table with no station: a registration that selected it was refused at admission. A row reached the conversation through about two dozen write points — the harness's commit of a row the loop ended, its API-failure record, its port, and each of the runner's direct writers (the restated postures and styles, the advisor's restate, the git lane's notes, the interruption reconcile and marker, the compaction's restore frames) — and none of them had a place an extension could read or scrub a row before the model and the store kept it.
240
+ - **Now — one seat.** Each writer calls the seat once at its first commit point: the harness for the rows it commits, every direct writer through one helper (`appendAdmittedRow`, `src/core/row-admission.ts`). With a handler on `session.append` the seat raises the event once per row; with none — or before the leg's bus is bound — the row passes as made and nothing is raised. `e = { door, origin, agentId?, message }` plus the identity envelope; `door`, `origin` and `agentId` are pinned and read off the row's own typed facts (no writer names them): `door` ∈ `prompt` / `note` / `delivery` / `attachment` / `response` / `tool-result`, `origin` ∈ `host` / `engine` / `model {model}` / `tool {tool}` / `plugin {name}`.
241
+ - **Now — a rewrite is text, in place.** `next({ ...e, message })` with changed text keeps the row with that text: a text block's text or a string content changes; every other block stays (the same blocks in the same order) and every member beside `content` is pinned. The change is made on the row itself, so the live context, the next request, the stored row, a frame's settlement and the prompt's receipt all read the same object; the row gains `rewrittenBy` (the extensions whose `next` handed a change on). A rewrite of a pinned part, a blank text, a change of the content's form (a string stays a string, a list of blocks a list), or a rewrite of a row whose content another reader holds by its exact text (a prompt carrying the engine's frames, a row the engine minted, an attachment's row) is not kept: the row is kept as made and the leg's report sink (`onError`, `phase: "hook"`) says why. A rewritten tool result is a host-side decision of what the model reads — the same settlement as a host's `updatedOutput`: a `ReadInbox` record the rewrite took out is withheld by the host side and not delivered again.
242
+ - **Now — what is a violation.** A changed `message.role` or naming member (`toolCallId`, `toolName`, `customType`), an answer without `next`, a row other than what `next` answered, a deny after `next`, a deny of an engine row, a deny without a reason — each is said on the report sink and the row is kept as made. A failing handler is skipped: before its `next` the row is kept as made, after it the row as kept stands. No engine row is dropped, none is kept twice.
243
+ - **Now — `$.session.append({ message: { role: "user", content }, agentId? })`.** An extension's own note: minted as an engine-note user row, handed to the leg's harness through its own port, raised under the caller's frames (door `note`, origin `{ kind: "plugin", name }`, the caller's own handlers out). It answers `{ message }` (the note as admitted) or `{ deny }` (a handler's deny before `next`; nothing is kept). `{ message }` means the note is in the conversation the leg goes on with: stored at once when no turn runs and nothing is held before it, else at the run's next serialization point (the next request reads it); a leg that parks durably before that point carries it on its checkpoint and the resumed leg stores it once, and once the park is taken the call is refused (#3217, its own section). A system row, a non-text block, a blank text, another leg's `agentId` or a key it does not take is the caller's throw.
244
+ - **Divergences, open to veto.** D-3008-a: `uuid` is not on `e` (a sema row has no id before it is kept). D-3008-b: a note whose handler fails is kept; Claude Code 2.1.309 refuses it (`ee` (cli309.js:256939)) — dropping an engine-minted row would leave a hole in the transcript, and the note is the extension's own act (KL-3008-a). D-3008-c: a prompt carrying the engine's frames, a row the engine minted and an attachment's row keep their content (the frame receipts and the attachment record read it by its exact text; KL-3008-c); a tool result's `isError` is pinned. D-3008-e: six doors, not the reference's twelve (`P` (cli309.js:296238)) — the doors this version's commit points produce (a compaction's summary is its own entry, not a conversation row; the engine writes no command row; hook context rides the prompt's frames; the queue door arrives with #3010). A door is added to the closed set (+1) in the version whose raise produces it.
245
+ - **Who needs it / who is affected / compensation.** *Needs it:* a deployment that scrubs credentials or personal data out of what the model and the transcript keep, and an extension that leaves a note for the model. *Affected:* a run with a handler on `session.append` — its rows may carry rewritten text and `rewrittenBy`, and a handler that fails leaves the row as made (KL-3008-a); the stream a host reads before the commit point (a reply's deltas, a tool's end frame) carries the row as made (KL-3008-b). *Compensation:* the report sink names every row not kept as handed on; with no handler nothing changes — no row gains a member and no event is raised.
246
+ - **Consumers.** @server @cli @client-core: `SESSION_APPEND_DOORS` is six words; a reader that switches on `door` closes over these six, and a door added later arrives as closed set +1 in the version that raises it. @server: a stored row may carry `rewrittenBy` (an array of extension names); pass it through like any optional member — no key is required. @client-core: `rewrittenBy` is attribution for a row's text; render or drop it, the row's meaning is unchanged. @cli: no wire word changes; an extension's note is an engine-note user row (rendered like the engine's own notes). @test: the station's row, the two closed sets and the answer forms above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `Prepared.admitRows`, `LegMods.report`, `LegFacadeSeats.sessionAppend`, and `reconcileInterruptedSession`'s optional fifth argument (the seat; a root export — callers that pass four arguments are unchanged).
247
+ - **Pins.** `test/backlog3008-session-append.test.ts` (K the station's row and the closed sets; P1 a real Runner scrubbing the model's turn, the tool's result and the prompt — stored, read by the next request, `rewrittenBy` — and the rewrite made in place; P2 the doors and origins of a real run and of each typed fact; P3 the violations and the rows whose content is held, a failure before and after `next`; P4 `$.session.append` kept, denied, and refused arguments on a real Runner; P5 no handler ⇒ the same rows, a direct writer's row through the seat, and the census of every raw `.appendMessage(` as a commit point that calls the seat; P6 a real package read by `loadModPackage`; P7 a rewrite that changes the content's form is not kept, an extension that erases a `ReadInbox` result's frames settles them as the host's decision (disclosed once, not handed over again); a note admitted before a durable park is #3217's pins). `test/mods-kernel-296.test.ts` counts the new station and `test/mods-kernel-wave2.test.ts` its `call` column; `test/backlog7300-fix-1-readinbox-hook-receipt.test.ts` reads the host-withheld disclosure's wider wording ("as the host side rewrote it (a postToolUse hook or an extension's session.append handler …"); `test/module-size-ratchet.test.ts` raises five runner modules by the seat's lines (contracts +2, prepare-task +4, run-git-lane +1, run-leg +1, run-terminal-adoption +6; the split is #2979).
248
+
249
+ ### An extension can start a subagent — `$.agent.spawn({ prompt, ... })` runs the delegation tool's own pipeline as the extension's call, with the subagent in the background, and answers `{ model, agentId }` once it started (#3058 = #2904 S1, ruled C-R995 K1–K7; aligned with Claude Code 2.1.309 `MH.spawn` / `Md` (cli309.js:256893); new capability; behavior change where an extension declares `agent.spawn` in `uses.calls`: the offer is not its boundary, and its spawns share the tree's bound; divergences D-2904-a / b / c, open to veto; hard-breaking: none; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` `agent.spawn` gains a `call` column (callable engine events +1); exports: +1 root type `AgentSpawnAnswer`; members: `EngineDollar.agent.spawn`) (@server @cli @client-core @test)
250
+
251
+ - **Before.** `agent.spawn` had a station but no `call` column: `$.agent.spawn` threw `not callable on the engine bus in this version`, and `$.tool.call({ tool: "Agent" })` was refused naming `$.agent.spawn` — a door that did not exist. An extension had no way to start a subagent.
252
+ - **Now — one pipeline.** The entry (`createAgentSpawnEntry`, `src/core/mods/agent-stations.ts`) runs the leg's one delegation tool through the same per-call pipeline `$.tool.call` runs: the whole gate (`Agent(<type>)` rules, the mode, `classic.PreToolUse`, `tool.check`, an ask in-stream or not at all — never parked), `tool.call`, the delegation with its `agent.spawn` station, the post-execution stations; every event under the caller's frames, the caller's own handlers out. Its input is the delegation tool's own: `prompt`, `description` (absent: the prompt's first five words), `subagent_type` from `subagentType`, `model`, `name`, `cwd`, `run_in_background: true`. It throws on an empty prompt, outside a running prompt, and when the run mounts no delegation tool or more than one (named).
253
+ - **Now — "started" is one fact, written where the subagent is let run.** The delegation writes `{ agentId, model }` on the extension call's record (`ExtensionCall.launched`) at its two background launch points; the entry answers off that record: `{ model, agentId }` once started (also when a post-execution station withheld the result), `{ deny: <reason> }` when nothing started (the gate's, an extension's, or the delegation's own `Sub-agent not started: …`), `{ model }` without `agentId` when an extension answered the call in place of its body. `agentId` is the id the subagent's events carry (`turn.complete`, `session.end`) — its leg's task id (one reading, `legTaskIdOf`, the one prepare mints a leg's identity by), which for a background subagent is the row's handle the launch card, the completion notification, `TaskStop` and `SendMessage` name (#3193, its own section); `model` is `agent.spawn`'s bottom answer (`inherit` when the child's prepare decides). The result is never read for it.
254
+ - **Now — background or nothing.** An extension's spawn that the delegation would run in the foreground — no background lane on this delegation tool here, or the call as the gate let it go asks for the foreground (a `classic.PreToolUse` rewrite) — is refused before anything is allocated: `Sub-agent not started: an extension's spawn runs in the background, and this one would hold the foreground (…)`, `details.error: "mods.spawn_foreground"`.
255
+ - **Now — one door.** An extension's spawn is a call `$.agent.spawn` made (the call's record names its door, `ExtensionCall.door`): a host tool an extension calls with `$.tool.call` whose body runs the delegation itself is that tool's call, and the delegation runs as it would for the model — the foreground allowed, the offer read.
256
+ - **Behavior changes (@server @cli @client-core).** ① **The offer is not the boundary.** `agent.offer` is what the model is offered; a type it hides is still started by an extension that declared `agent.spawn` in `uses.calls` — the gate and `agent.spawn` handlers still judge it. ② **The tree's bound is shared.** An extension's spawn takes a slot of `RunnerDeps.delegationEntryCaps.maxConcurrent` when its subagent is registered, like the model's own: an extension that starts many can be why the model's next delegation is refused (`delegation.concurrency_cap`), and a full tree refuses the extension's spawn with the same sentence.
257
+ - **Divergences, open to veto.** D-2904-a (K2): the reference runs a foreground spawn and answers after it ends; here it is refused — the reference's own contract says the spawn resolves once the subagent started, and an answer after the child's `turn.complete` leaves a handler that waits on the id with nothing to wait for. D-2904-b (K3): the reference skips the offer for a plugin's spawn on the main loop only; here an extension's spawn is no offer on every leg (one fact: who asked). D-2904-c (K4): the reference counts each plugin's spawns at once on a counter of its own (`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS ?? 20`); here they share the tree's one bound, whose number the deployment sets (it may be above 20) and which counts a spawn when its subagent is registered, not while its call waits at the gate or at a handler.
258
+ - **Who needs it / who is affected / compensation.** *Needs it:* an extension that delegates work to a subagent of its own (a reviewer, a background check). *Affected:* a deployment that hides types with `agent.offer` and admits an extension declaring `agent.spawn` (①); a tree whose bound an extension's spawns fill (②). *Compensation:* the gate still judges every spawn (`Agent(<type>)` deny / ask rules, the mode), and an `agent.spawn` handler can refuse by `e` (the spawn's arguments) and `next.origin` (who asked).
259
+ - **Not covered (stated).** The answer arrives once the delegation call has passed its post-execution stations: a fast subagent can complete a turn — or end — before the extension holds its id, and `turn.complete` / `session.end` are raised once. A handler that waits on them records them by `agentId` as they come and reads the record before it waits (`docs/INTEGRATION-CORE.md` §10.13 shows the form); the engine keeps no copy of a completion for a later reader (KL-3058-a). A `SkillSpec` registration hangs `classic.*` events only and is not handed to a child, so it cannot see the events of a subagent it started (KL-3058-b).
260
+ - **Consumers.** @server: a contract-7 package may declare `agent.spawn` in `uses.calls`; the delegation tool's frames for such a call carry `requestedBy: { kind: "extension", name }` and an `ext-` call id, and a refusal reads `details.error: "mods.spawn_foreground"` when the lane is missing. @cli: no wire word changes; a background agent an extension started is an ordinary background agent row. @client-core: the kernel table gains one callable engine event, `agent.spawn` (beside `tool.call`, `session.append` and this version's `session.send` / `session.compact`). @test: the answer forms, the three rules and the throws above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `LegFacadeSeats.agentSpawn`, `AgentStations.extensionSpawn`, `ExtensionCall.launched`, `ExtensionCall.door`.
261
+ - **Pins.** `test/backlog3058-agent-spawn-entry.test.ts` (K the row's `call` column and the contract number; S1 a real Runner: the answer `{ model, agentId }` and `agentId` = the subagent's `turn.complete.agentId`; S2 the caller's own `agent.spawn` handler skipped, another's deny ⇒ `{ deny }` and no child; S3 a type `agent.offer` hides is started; S4 no background lane, and another registration's PreToolUse rewrite to the foreground, ⇒ `{ deny }` with no child; S5 a gate ask with a durable approval lane and no live approver ⇒ `{ deny }`, nothing parked; S6 a full tree ⇒ `{ deny }` with the concurrency sentence; S7 an empty prompt throws, two delegation tools throw naming both; S8 a PostToolUse that fails after the spawn withholds the result and the answer is still `{ model, agentId }`; S9 a slow PostToolUse and a fast subagent: the record-then-read form gets the answer; S10 an extension answering the call in place of its body ⇒ `{ model }`, no child; S11 `$.tool.call` of a host tool whose body runs the delegation is no spawn: the foreground runs and the offer is read). `test/mods-dollar-tool-call.test.ts` reads the Workflow door's sentence in the tree's bound wording; `test/mods-kernel-wave2.test.ts` counts the callable engine events.
262
+
263
+ ### A tool the run's deny rules refuse every call of is not in the model's tools block (#3126, ruled C-R219 A; aligned with Claude Code 2.1.309 `aJ`, `cli309.js:262013`; behavior narrowing of the model's view, open to veto; hard-breaking: none; closed sets: none) (@test @cli @server)
264
+
265
+ - **Before.** A `deny` that names a tool whole — an MCP tool (`mcp__srv__tool`), a whole server (`mcp__srv`), `Bash(*)`, a built-in (`Read`) — left the tool in every main request's tools block. The model saw it, planned around it and called it, and only then met the rule's refusal.
266
+ - **Now.** One rule: a tool whose every call the run's deny rules refuse is not shown. Each face that refuses a model's call answers by the whole-tool reading its refusal already takes — the leg's effective policy (the caller's policy, the session's rules, the ancestors' rules and the inherited parent policies, through the new carried member `ToolPolicy.wholeToolRefusals`), the person's persisted rows, the org's rows (an org `Read` / `Edit` row, which the org layer reads at its strictest over the read and write faces, hides every tool whose declared path target is on those faces — its gate refuses every call of them). The faces are read once per main request, the person's rows and the org's from one store read; each face's reading settles on its own, bounded: one that throws or does not answer in time refuses nothing here (its calls still meet the gate) and the others stand. A rule changed mid-run (a session row, a stored row, an org snapshot) binds the next request, and a lifted rule shows the tool again. A rule about some calls of a tool (`Bash(rm:*)`, `Read(./secret/**)`, an org `Bash(echo hi)`) leaves it shown. An ask or an allow hides nothing; a deny wins over an allow, as in the reference.
267
+ - **The gate is unchanged.** The tool stays mounted: a call the model makes anyway (a name it learned earlier in the transcript) meets the gate and the rule's own refusal sentence. ToolSearch searches what the model is shown: a hidden deferred tool is "Not found", and a hidden direct tool is never "Already available". The cache fingerprint and the turn snapshot name the tools actually sent.
268
+ - **Who needs it.** A person or a deployment that denied a tool: the model no longer spends a turn calling it, and the reference shows the same tools for the same rules. **Who is hurt.** A host that read the tools block of a request to learn what the leg mounts sees fewer tools when a whole-tool deny stands (the mount itself — `wiring_manifest`, `Prepared.tools` — is unchanged); a test that pinned a denied tool in a request's tools reads it absent. A permission-rule store, and a session-policy store, counted in reads sees one more read per main request on a leg that wires it — the view's, which lands in the run's reads like any other (a permission-rule store that cannot be read is announced once per run, as before; when a request's view is the first read to meet the outage, the notice still says "for a call"). The read's latency is the request's: a slow store slows every main request, and a store that does not answer holds each main request for the read's bound (14 s for the person's and the org's rows) before the request goes out, as it already held each call. **Compensation.** Read the mount, not the request, for what is mounted; read the request for what the model was shown. A test that scripts a store by read number counts the view's read: on a hands leg with one call per turn the prepare read is read 1, request k's view read is read 2k, call k's read is read 2k + 1.
269
+ - **Not covered (stated).** A skill's `disallowed-tools`, a session's `toolAllow` narrowing and `allowDirs`, an allow list's misses (`createAllowDenyPolicy({ allow })`), and a frozen constraint projection (`{ check }` alone) refuse at the gate as before and keep their tools shown: they carry no whole-tool reading. The deferred-tools boundary reminder (opt-in) still lists a hidden deferred name. A rule changed between a request and a ToolSearch call is read at the next request.
270
+ - **Consumers.** @test: #1303 (e) re-verify — a tool a whole-tool deny names is absent from every main request's tools block, a direct call of it is still refused with the rule's sentence. @cli: the shell renders nothing new (zero change). @server: a projection of the tools a request sent (`lastSentRequest`) reads the view; the mount is unchanged.
271
+ - **Pins.** `test/backlog3126-deny-tools-out-of-table.test.ts` (a real Runner and a real stdio MCP server: the policy face's MCP / server / `Bash(*)` / built-in rules hide, a direct call is refused and the server receives nothing, the ask-ruled and content-ruled tools stay, an ask beside a deny hides nothing, a deny reaches a tool under an alias it answers to; an allow / deny list; session rules written and lifted mid-run; persisted rows and an org snapshot, with a mid-run change; an org `Read` row hiding the path tools on its faces; one store read per request for the person's rows and the org's, each reading settling on its own when the other never answers; ToolSearch's search space; the view's prefix seats, the turn snapshot without a cache fingerprint, and its faces that throw or never answer, inside a fold and a fold of folds; the fold's carry, the approval policy's deny list included; a delegated child's tools block under the parent's deny). Re-pinned (each request's view read counted): `test/backlog1293b-person-path-rows.test.ts` G18 / G19 / G24 / G25 (the store scripted by read number), `test/backlog978-session-rules-every-gate.test.ts` G9 (the session store's reads per run), `test/backlog2265-principal-name-one-judge.test.ts` h1 (the buckets read per run), `test/backlog1022-rewrite-recheck.test.ts` R13 / R15 (the person's store reads per run), `test/backlog7340rj-unread-path-rows.test.ts` ① / ② (the failing reads include the first request's), `test/design389-unified-store.test.ts` §4 (the org fetches per run), `test/permission-rule-v2-wiring.test.ts` design/182 §7 live gate (the time budget under an org source that never answers: each request's read waits its bound).
272
+
273
+ ### The TaskOutput tool is removed — a background command's output is its output file (Read), a background agent's or workflow's result is its completion notification (and the `ReadToolResult` ref it names when cut); a background launch — command, watch, workflow, agent or continuation — is admitted only where its completion can come back (#3026 = #1608 C2, the deletion step of design/1056 §1.5 / §2.5, with its R1 admission finished in #3071; ruled C-R675 / C-R976; aligned with Claude Code, which removed the tool — `cli309.js:200080`, retired-name set `:264190`; hard-breaking: yes, three sentences each below, open to veto; closed sets: the tool roster −1 (`TaskOutput`), the catalog −3 rows (`task-output`, `task-output-hands`, `task-stop-hands`), the card vocabulary −1 (`task-output`), `RETIRED_TOOL_NAMES` +3 (`TaskOutput`, `TeamCreate`, `TeamDelete`); exports: −1 root value `createTaskOutputTool`; members: below) (@server @cli @client-core @test)
274
+
275
+ - **Before.** The model could poll any background task with `TaskOutput({ task_id, block, timeout, filter })`; a hand band built without a task registry mounted an env-direct `TaskOutput` / `TaskStop` pair polling the environment by shell id; a Bash started in the background on a mount with no completion sink told the model to poll `TaskOutput`; a Monitor watch's rolled-off spool middle was spilled to the offload store as a ref chain, and a clipped background-agent result was spilled at poll time; a workflow poll that served a terminal state fired the deployment's `ackServed`; `BashOutput` / `AgentOutput` / `AgentOutputTool` / `BashOutputTool` answered `renamed "TaskOutput"` and `WorkflowStatus` `folded into "TaskOutput"`; `TeamCreate` / `TeamDelete` were unknown names.
276
+ - **Now.** No roster carries `TaskOutput`. A call to it, or to any of its earlier names, gets the roster miss plus one removal line: "removed — read a background command's output file with Read (its launch receipt and completion notification name the path); a background agent's or workflow's result arrives in its completion notification (read the full text with ReadToolResult and the ref it names when the notification clips it)"; `TeamCreate` / `TeamDelete` answer "removed — the session has one implicit team: …". A deny or ask list naming any of them refuses the run (`config.legacy_tool_name`); an allow list naming them is reported by the `config.toolpolicy.unmatched_names` advisory (C-R976). Bash offers `run_in_background` (schema and description) only on a mount with a task registry on an environment that runs background processes, and starts one — or adopts a running command — only when a completion sink resolves for the call; otherwise the call is refused before anything starts: "Error (Bash): run_in_background is not available here — …". The background receipts carry no poll sentence; a missing output file is said once ("its completion notification says whether any of its output was kept and how to read it"). A hand band without a registry mounts no `TaskStop`. A Monitor's suppression and storm-kill frames name the watch's output file; a one-shot run's Monitor receipt carries the process-lane sentence the background-command receipt carries. A background agent's report is stored as its result artifact whatever its length (it was stored only when the frame cut it), so a task table or a lost-notification line names a read handle for a short report too — the store is written once per completion. A cut report's frame waits for that write (its cut line names the ref); a report the frame carries whole does not — its ref becomes the row's read handle when the write lands, and only while the row still holds the settle the report belongs to (a revival since, or a re-registration of the same id, keeps its own); a write that fails reaches the deployment's notifier channel (#3071). A background agent's terminal frame names, in `completionId`, the settle its own leg made, read in that settle's step: a leg whose settle was refused because its row was revived since names none (it used to read the row after its awaits and could carry the newer cycle's id, or record its report under it) (#3071). Where nothing stores a cut report (no offload store, or an unconfirmed write) the cut line says it is not readable in this session and points at `SendMessage`; a workflow's unstored record says the same. Every background producer applies the same call-time admission (`admitsBackgroundLaunch` over the one completion-sink resolution, #3071): with no sink for the call — and, for a workflow, no deployment notifier; for a SendMessage continuation, no `notificationWired` channel — a Monitor watch and a workflow run are refused before anything starts, an Agent runs synchronously and says so ("note: this agent ran synchronously — no completion would come back from a background agent on this mount, …"), and a revival or a SendMessage continuation of a finished agent is refused (`revive.no_background`) before the admission charge, the claim and the resume. No face carries a mount-time sentence about a missing sink any more (they used to say the result "is not delivered on this mount"). The host task-handle read face (`TaskRegistry.pollTask`, the server's HTTP read leg) keeps its options, its `details` and its headings (`REPLAY_FACE`); its body's untrusted fence is labelled `task <id>` and its refusals `Error (task poll): …` (they named the removed tool: `TaskOutput <id>` / `Error (TaskOutput): …`). The noun names `UnifiedTaskOutput` / `TaskOutputReplay` / `clipTaskOutput` stay.
277
+ - **Hard-breaking — `createTaskOutputTool` and the two catalog rows.** *What changed:* the root export `createTaskOutputTool` and the `task-output` catalog row (card word `task-output`) are gone; nothing mounts a TaskOutput tool. *Who is affected:* a host that mounts it in `spec.tools` or names it in `excludeTools` / a policy; client-core's `scripts/run-terminal-table-provenance-test.mjs:560` (calls it) and `src/generated/engineFactTables.ts:99` (`"task-output"` card word; the vocabulary floor is bidirectional); a client rendering the `task-output` card. *What to do:* drop the mount and the card arm; read a task through `TaskRegistry.pollTask` (unchanged), drop `TaskOutput` from deny / ask lists.
278
+ - **Hard-breaking — the env-direct band.** *What changed:* `createEnvTaskOutputTool` / `createEnvTaskStopTool` (no root export) and their catalog rows `task-output-hands` / `task-stop-hands` are gone: `createHandsToolkit` without a `taskRegistry` mounts no background-task tool, and its Bash neither offers nor runs `run_in_background`. *Who is affected:* a library caller that built a hand band without a registry and started background commands through it (server, cli and client-core origin/main build none). *What to do:* pass `taskRegistry` and a `taskNotification` sink, or run the command in the foreground.
279
+ - **Hard-breaking — Bash background admission.** *What changed:* a background start or adoption needs a completion sink (the call's run lane, else the mount's `onTaskNotification` / `taskNotification`); without one the call is refused before it starts. *Who is affected:* a library mount with a registry but no sink, run outside a Runner (its receipts used to say "Use TaskOutput … to read output"). *What to do:* wire a sink; inside a Runner the run lane is always there.
280
+ - **Behavior narrowing — the same admission on Monitor, Workflow, Agent and SendMessage continuation (#3071).** *What changed:* where no completion sink resolves for the call (and no deployment channel is wired: a workflow's `notifier`, SendMessage's `notificationWired`), a Monitor watch and a `RunWorkflow` call are refused before anything is spawned or registered, a background-eligible Agent call runs synchronously with one note line, and reviving or continuing a finished agent is refused with `revive.no_background` before its admission charge, claim or resume — they used to start the work and say its result would not reach the model. *Who is affected:* a library mount built outside a Runner with none of the three wired, the operator continuation verb `createAgentContinuationVerb` included (it routes through the SendMessage face; server, cli and client-core origin/main build none of these outside a Runner and call no such verb; inside a Runner the run lane is always there); a fixture that mounted a background Agent or Monitor without a sink and expected a launch receipt. *What to do:* wire the sink (`onTaskNotification` / `taskNotification` / `background.notify` / `notify`) or the deployment channel; a library caller that wants the old start-and-forget shape has none — its result reached nobody.
281
+ - **Hard-breaking — `TaskRegistry.recordArtifactRef` names a settle, not a cycle (#3071).** *What changed:* the third parameter is the row's `completionId` for the settle the stored result belongs to (`string | undefined`, read with `getCompletionId` when that settle ran — every terminal frame carries it), not a revive-cycle number; the write records only while the row still holds that settle, so a late write lands nothing on a row revived since or re-registered under the same id, and a write naming no settle records nothing (the cycle-number reading is gone). *Who is affected:* a host that records a stored ref on a registry row itself — server, cli and client-core origin/main call it nowhere. *What to do:* pass `registry.getCompletionId(id)` read in the same synchronous step as the row's settle — before any await (or the terminal frame's `completionId`) instead of the cycle number.
282
+ - **Hard-breaking — five members.** *What changed:* `WorkflowCompletionNotifier.ackServed` and `RegisterWorkflowInput.onServedTerminal` (the poll-served dedup acknowledgement — only a TaskOutput poll fired it), `TaskPollOptions.toolResultStore` (the poll-time agent spill), `RegisterMonitorInput.toolResultStore` / `MonitorToolOptions.toolResultStore` (the Monitor spill chain; the output file is the full record), and `TaskToolOptions.deadlineMs` / `.notificationWired` / `.toolResultStore` / `.checkpointSeat` (`createTaskStopTool` keeps `registry`, `owner`, `scope`, `sessionId`, `workflowStore`, `agentStore`) are removed, as are `TaskRegistry.markStopSourceByShellId` / `.clearPendingStopSourceByShellId` (only the env-direct TaskStop called them). *Who is affected:* server's `src/boot/runner-deps.ts:865` (`ackServed` in an object literal typed `WorkflowCompletionNotifier` ⇒ excess-property error) and its tests passing `onServedTerminal` (`test/subagent-steer.test.ts:555`, `test/task-handle-verbs.test.ts:144,484`); any caller passing one of the others in an object literal. *What to do:* delete the member — the behavior it fed no longer exists (the completion-inbox entry is the delivery, not a poll's echo).
283
+ - **Retirement lines.** RL-1608 ×9 are deleted with their faces (`createTaskOutputTool`, `createEnvTaskOutputTool`, the two catalog rows, the five earlier-name hints).
284
+ - **Consumers.** @server: the HTTP task-handle read leg's body now opens its fence with `task <id>` (was `TaskOutput <id>`) — a test or a UI matching the old label reads the new one; delete `ackServed` (`runner-deps.ts:865`) and the `onServedTerminal` test seams; `capabilities/hands-lane.ts:133` `HANDS_DUAL_USE_TOOL_NAMES` −`TaskOutput` (the band already filters by roster); `http/route-ctx.ts:793`'s "use the TaskOutput tool" pointer; the SDK's `oneShot` contract text; the completion-inbox journal's `diagnostics: "drop"` (`orchestration/workflow-notify-journal.ts:56,72`) now drops a workflow's only model reader of its record ref. @client-core: `engineFactTables.ts:99` and the vocabulary-floor script, the poll-body fixtures spelling the old fence label (`scripts/run-client-core-diff-test.mjs:730`, `run-client-core-pure-test.mjs:6339,7245`), `run-terminal-table-provenance-test.mjs:560`, `liveInitToolFace.ts` −1, the `task-output` card arms in `toolResult.ts`; the three `planReviewWire.ts` sentences. @cli: the defer-name table / seam query card word; the fence-label fixture in `src/components/tasks/asyncAgentDetailSettledSupply.test.tsx:440`; its own CC port of TaskOutput is its own. @test: the shapes below are the black-box ones; `TaskOutput`, `TeamCreate`, `TeamDelete` are expected-absent names now.
285
+ - **Pins.** `test/backlog3026-taskoutput-retired.test.ts` T1–T12 (the three removal lines on a real Runner; the five earlier names judged retired with the one line; allow → advisory / deny → `config.legacy_tool_name`; the hand band with and without a registry; the sink-less and registry-less background refusals with nothing spawned; a rolled watch's poll body and output file; the one-shot Monitor receipt; the real Runner lane reading a cut report by its ref with no TaskOutput in any roster; the unstored cut sentence); 28 test files moved from the TaskOutput tool to `TaskRegistry.pollTask`.
286
+ - **Known limits.** `KL-1060b` (C-R976): a durable background-agent row a previous process left has no model reader (the host's HTTP read leg reads it). `KL-3026-a` is closed by #3071 (the one call-time admission above). The bare-primitive / frozen-throw gap this settle fence opened on a workflow row is closed in this release by #3155 (below), so it ships as no limit. A one-shot wait the walltime or the ceiling ends still names no owed task (`KL-3025-a`).
287
+
288
+ ### A failed workflow's settle id and record reach its task row and its frame whatever the script threw (#3155; behavior change; hard-breaking: none; closed sets: none; exports: none; members: none)
289
+
290
+ - **Before.** A rejection hands its observers only the thrown value. The task row of a `RunWorkflow` run and the run's failure frame read the run's settle id (and the frame its record) off a `workflowRun` property the engine pins on an extensible thrown object, else from the run store. A script that threw a bare primitive (`throw 42`, `throw "s"`) or a frozen object pinned nothing: the frame carried no `completionId`, the row learned no settle id — so under the settle fence above (#3071) the run record's ref was not recorded on the row and a later list named no read handle for it (7.60.0 recorded it) — and with no run store the frame said no record is kept. A frozen throw carrying a `workflowRun` of the script's own making set the row's settle id to the script's value.
291
+ - **Now.** The run is bound to its `done` promise when it starts (`src/core/workflow-settled-run.ts`, one binding in `startWorkflow`); the row's reject leg and the tool's failure leg read the run through the handle, never the throw. Every throw shape: the row holds the run's own settle id (the run still mints it once), the record's ref is recorded on the row, the frame carries the same `completionId`, and the frame names the run's own record with or without a run store. The `workflowRun` property on an extensible thrown object stays for a direct `runWorkflow` caller, who holds no handle.
292
+ - **Wire, three sentences.** *What*: a failed `RunWorkflow` completion frame now carries `completionId` and a record ref on every throw shape (it lacked the id for a bare or frozen throw, and the ref without a run store), and the row's later-list read handle names that record. *Who*: hosts and tests that read a workflow failure frame or a task row's read handle. *Compensation*: none needed — the keys are the ones the other throw shapes always carried.
293
+ - **Who is hurt.** A test that pinned the old store-less sentence ("This failure carries no record of the run's agents and no run store holds one.") — the sentence is gone, the frame names the record.
294
+ - **Consumers.** @server: nothing to change; a failed workflow's frame may now carry `completionId` where it had none. @test: build the bare-throw shapes black-box — a workflow script that throws `42`, `"s"`, `Object.freeze({})` and a frozen object carrying `workflowRun: { completionId: "x" }`: the row's read handle names the frame's record ref, and the frame's `completionId` equals the durable run's.
295
+ - **Pins.** `test/backlog3155-workflow-reject-settle-id.test.ts` (a real Runner, the repo's vm script runner, the real tool, registry and stores: the three throw shapes each record the ref on the row for the run's own settle; a thrown Error unchanged; a forged frozen `workflowRun` names neither the settle nor the record; one settle id across row, frame, durable run and poll; the store-less run names and records its record; the background-agent fence unchanged), `test/run-workflow-tool.test.ts` R4e re-pinned (the store-less bare throw names the run's record).
296
+ - **Known limits.** `KL-3071-a` is deleted (closed by this change).
297
+
298
+ ### A resumed leg that ended before its approved action started says what became of its checkpoint (`failed.unstartedRow`), and a cascade no longer re-runs the task from scratch on the next rung while that card waits for the same approval (#3163; behavior change; hard-breaking: none; closed sets: new `unstartedRow` words `reopened` / `declined` / `unknown`; exports: none; members: +1 `TerminalCause` failed `unstartedRow?` (wire +1 optional key)) (@server @cli @client-core @test)
299
+
300
+ - **Before.** Whether a resumed leg's approval still stood was said only in the failure's sentence; the code said it only when the leg had no code of its own (`resume.reopened_unstarted` / `resume.reopen_failed_unstarted` fill an empty code seat). A resume with no wall clock left kept `limits.max_walltime_exceeded`, a rebuilt env whose restore failed kept `resume.env_failed` — the card pending again in both. So `resumeCascade` treated such a rung as an ordinary failed rung: the gate failed it, its session was released and the next rung re-ran the whole task cold while the card still waited for the same approval, and resuming that token later could do the work twice. The workflow lane's park rule read the same two codes and settled those legs as consumed work.
301
+ - **Now.** Both exits that compensate an unstarted resume — the settled result and the thrown leg — state the store's outcome on the failed terminal, `unstartedRow: "reopened" | "declined" | "unknown"`, beside the leg's own code, which still names what ended it. One predicate reads it for both orchestrators (`resumeNeverStarted`, `src/agents/suspend-guard.ts`): a cascade stops at that rung the way it stops at a durable park — no gate, no escalation, no session release, `cascadeOutcome: "exhausted"`, the rung's result handed back unchanged and the same token resuming it again — and a workflow drive re-parks on the prior token. The two-code reading in the workflow lane is retired.
302
+ - **Wire, three sentences.** *What*: one new optional key on a failed terminal, `unstartedRow`, present only on a resumed leg that ended before its approved action started. *Who*: hosts and projections that route a failed resume (server error mapping, client-core projection, cli wording, test criteria). *Compensation*: read `unstartedRow` to tell "the approval still stands, resume the same token" from "the action ran" — the codes are unchanged, and nothing that read them breaks.
303
+ - **Who is hurt.** A host that reads `cascadeOutcome` / `finalRung` after such a resume now sees `exhausted` at the resumed rung instead of a later rung's result; nothing could rely on that escalation, since the card it left behind was still live.
304
+ - **Pins.** `test/backlog3110-cascade-park-seat.test.ts` (#3163, real lanes: the settle exit — resumed with no wall clock left — and the throw exit — the env's restore fails — each stop with `unstartedRow: "reopened"`, no further dispatch, no model request, no session release, the card pending, and the same token then redeems and the ladder climbs on; control: a resumed rung that ran the approved action and then failed carries no `unstartedRow` and escalates); `test/backlog642-workflow-park-lane.test.ts` (a drive failed with `resume.env_failed` and `unstartedRow` re-parks; control: the never-started code with no row outcome settles as its own failed row); `test/gate-outcome-adversarial.test.ts` (`amendTerminal` states the row outcome beside a kept code).
305
+
306
+ ### One way media leaves what the model sees — `context.media_removed` — and one request media budget, in base64 characters, trimmed the way Claude Code trims it (#2988, C-R974 S2 — §3.3, Q1 A, Q2, Q4, Q5's request rows, addendum 1; with #3073; behavior change; divergence D-2871-a, open to veto; hard-breaking: ① the notice code and ② the budget knob and its exports, three sentences each below, open to veto; closed sets: `EngineNoticeCode` `context.image_removed` renamed `context.media_removed` (count unchanged), its `detail.reason` pair `MEDIA_REMOVED_REASONS`; exports: −3 root `capAggregateMediaBytes`, `AGGREGATE_MEDIA_BUDGET_BYTES`, type `MediaStripInfo`; members: −2 `RunnerDeps.mediaByteCapBytes`, `RunnerDeps.onMediaStripped`, +1 `RunnerDeps.mediaBudgetBase64Chars`, +1 `IMAGE_ADMISSION.request`, `IMAGE_ADMISSION.hard.readBytes.withoutProcessor` 5 MiB → 3,932,160) (@server @client-core @cli @test)
307
+
308
+ - **Before.** The request strip summed decoded bytes (default 30 MiB, `RunnerDeps.mediaByteCapBytes`) and cut the oldest images to just under it — once over, the next request that added an image cut again — counted no blocks, and told the person nothing: the fact went to the optional `RunnerDeps.onMediaStripped` callback. A provider refusal was `context.image_removed`, its placeholder from a second constructor. The `tool_end.output` projection spent the decoded budget × 4/3. Without an image processor an image was read up to 5 MiB raw and measured a second time against the 5 MiB base64 limit.
309
+ - **Now.** One trim in Claude Code 2.1.309 `eSn`'s scan shape: the media blocks of a request (images and documents together) are walked oldest first. Past `IMAGE_ADMISSION.request.maxItems` — 100, or 600 for a model whose context window is at least 1,000,000 tokens — the oldest go until `maxItems - margin` (80) remain: one cut takes 21 and the next comes 21 blocks later. Past the budget — `budgetBase64Chars`, 40 MiB of base64, the old 30 MiB decoded — the oldest go until `hysteresisBase64Chars` (10 MiB) is left under it, so the next cut waits until that much more has been added. A block cut once stays cut as the conversation grows, so the cached prefix moves only at a cut. Every removal, the trim's and a provider refusal's, becomes one placeholder line from one constructor (`[image N removed: <why>]`) and one code, `context.media_removed` with `detail { reason, images, documents, sessionId, runId }`: `rejected_by_provider` once per run per refusal; `media_budget` once per session per block, the block's identity being the digest of its bytes (a compaction, a resume or a rewind does not change it). That record rides the session's announced record (its advisory arm, bounded at 200 digests), best effort: a lost or evicted record means a block is told again, never not told. A request view the trim cut also emits a `context.media_removed` trace frame with the request's numbers; frame and tell are delivered from the context hook, so a view a later guard refuses or an abort stops before dispatch is accounted too (KL-2988-a, until #3128). With no `RunnerDeps.onNotice`, both reasons take the engine's console fallback (before, a provider refusal's notice was dropped silently). `tool_end.output` reads the same budget in the same unit, with no × 4/3. The input's own `human_input` account is unchanged (Q4 A): it counts what was admitted, not what a request carried.
310
+ - **Hard-breaking ① — the notice code (open to veto).** *What changed*: `context.image_removed` is renamed `context.media_removed`, gains `detail.reason` and `detail.documents`, and also carries the request budget's removals; the old code is no longer minted. *Who is hurt*: @server — a pass-through, filter or store keyed on the old code; @client-core — the notice projection's code table, and a seat policy keyed on it (if that policy is derived from the engine's `NOTICE_AUDIENCE` table it follows the table; if not, it is the client's own policy and is registered as such); @cli — the renderer of the old code (L-2122 waits for this ticket); @test — #2935 B3 and SIDE1's re-read cell. *What to read instead*: `context.media_removed`, branching on `detail.reason` (`MEDIA_REMOVED_REASONS`); `images` and `documents` count what left the model's view in that one notice.
311
+ - **Hard-breaking ② — the budget knob and its exports (open to veto).** *What changed*: `RunnerDeps.mediaByteCapBytes` (decoded bytes) and `RunnerDeps.onMediaStripped` are retired — refused at `new Runner` with `config.deps_retired_key`, naming the replacement — and the root exports `capAggregateMediaBytes`, `AGGREGATE_MEDIA_BUDGET_BYTES` and the type `MediaStripInfo` are removed. *Who is hurt*: a deployment that set the knob (the unit changed) or passed the callback; @server — an entry that forwards a budget or a strip observer; any importer of the three names. *What to read instead*: `RunnerDeps.mediaBudgetBase64Chars` — base64 characters; absent ⇒ the default; `0` or `Infinity` ⇒ no budget; otherwise a whole number of at least 20,971,520 (twice the hysteresis) — anything else is refused at `new Runner` with `config.invalid_argument`, never read as a default; the fact the callback carried is the `context.media_removed` notice and its trace frame; the numbers are `IMAGE_ADMISSION.request`.
312
+ - **Divergence D-2871-a, open to veto (Q1 A).** Claude Code 2.1.309 trims a request's media silently; sema tells the person once per session per block, because the session still holds the image or document the model no longer sees.
313
+ - **Not Claude Code's 24 MiB (Q5).** The default budget is 40 MiB, not Claude Code's first-party 24 MiB: a sema deployment mostly serves endpoints Claude Code treats as third-party, for which its own budget is 75 MiB. There is no document-only budget — Claude Code holds one for its first-party endpoint alone.
314
+ - **Behavior change (#3073).** Without an image processor the raw read cap is 3,932,160 bytes, the raw size whose base64 fits the 5 MiB single-image limit: one ruler. An image between that and 5 MiB raw is refused `raw_too_large`, naming that cap (before: read, then refused `base64_too_large`, or `dimensions_too_large` when its header stated over 2000 px). On the Read tool that is the "too large to read" refusal (before: "too large to send"); an MCP image block in that range is spilled to disk naming the read cap whatever its bytes (before: one whose bytes were not the image it claimed stayed an image block for the tool-result seat's placeholder).
315
+ - **Rules.** Placeholder constructors 2 → 1; budget units 2 (decoded bytes on the request, × 4/3 on the event) → 1 (base64 characters); the fact's outlets 2 (an opt-in callback, and nothing for the person) → 1 notice plus its trace frame; rulers without a processor 2 (the raw cap, the base64 limit) → 1; the trim reads each block once. The once-per-session record is no new ledger: it is the announced record's advisory arm the withheld-env and capability-withheld notices already use.
316
+
317
+ ### A revived background agent is a continuation: SendMessage to a stopped child counts in its tree's delegation pool but is no longer refused by a full one (#3055, ruled C-R994 A; security widening — fan-out, open to veto; hard-breaking: none; closed sets: none; exports: none)
318
+
319
+ - **Before.** A tier-3 revival (SendMessage to a stopped child known only by its durable row) passed the spawn door's concurrency verdict: at a full pool it was refused with `delegation.concurrency_cap` and the row's claim was rolled back, while a retained child woken in this process (#2998) only occupied a slot. Two continuations, two readings.
320
+ - **Now.** One rule: a spawn passes the door (`admit` = the concurrency and cumulative verdicts in front of the pool's reservation); a continuation — a revival or a wake — only `occupy`s. The revived row is re-registered as a running agent of its tree, so it counts toward every later spawn's verdict until it settles; it is never refused and its claim stays.
321
+ - **Security widening, open to veto.** *Who needs it*: a deployment that messages a stopped teammate while its tree is at `maxConcurrent` (the message used to bounce and the claim was undone). *Who is affected*: a tree's running count can now pass `maxConcurrent` by the number of revivals in flight. A revival creates no row — it continues one the tree already retains, one claim at a time — so the excess stays bounded by the tree's retained rows, which `maxCumulativePerSession` caps for spawns. *Compensation*: a spawn into an over-full pool is still refused, and the refusal counts the revived children. Aligned with Claude Code 2.1.309 (a resume takes a concurrency slot without reading the cap; only the launch path checks it). `delegation.concurrency_cap` is still reachable on the Agent launch path; only the revival path no longer reaches it. This answers the 7.60.0 note under #2998 ("A tier-3 revival of the same row is refused at a full pool today").
322
+ - **Reach.** Every revival lane takes the rule: the SendMessage revival and a parked child driven from its durable row (`reviveClaim.parkedResume`, @server's decide path) both continue on the background lane and are no longer refused at a full pool. A revival claim handed to the synchronous lane registers no row, so it starts like a spawn and passes the full door.
323
+ - **Consumers.** @server: a decide or a SendMessage on a stopped agent at a full tree now runs instead of returning `delegation.concurrency_cap`; a fresh Agent spawn in that tree is refused until the count falls below the cap. @cli @client-core: both read the code wherever it arrives (cli's tool-end guidance, client-core's cap-code disposition); its spelling and meaning are unchanged — a SendMessage revival just no longer carries it, so no change is needed.
324
+ - **Pins.** `test/backlog3055-revival-occupies-pool.test.ts` (a real background registry and File store: a revival at a full pool runs, its row stays `running`, the tree counts one over the cap and a fresh spawn is refused naming that count; the revived child alone keeps a cap-1 pool full until it settles; one revival adds exactly one to the count and leaves no local residue). Re-pinned: `test/delegation-entry-caps.test.ts` "revival: occupies a CONCURRENCY slot …" (was "refused at a full pool, row rolled back").
325
+
326
+ ### A rule's content reaches a call only through the tool whose grammar it is written in: an allow's content is a grant for the tool that runs, a deny's or an ask's reaches every name the call answers to, and the two lists handed in at launch grant the wire name only (#2478, #1444; C-R782 ②, C-R799 ③ T-2 / ④ b, C-R1008; behavior narrowing, open to veto; divergence `shell-name-wearer-reaches-content-rules` kept, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core)
327
+
328
+ - **Before.** A caller's tool that declares an engine tool's name as an alias (`Upload` with `aliases: ["Bash"]`, on a leg where the engine's shell does not mount) was judged under `Bash` by every rule lane in both directions. A person's stored `Bash(npm test:*)` allow, the request's or the deployment's `allowedTools` entry `Bash(npm test:*)`, and an active skill's `allowed-tools` entry ran `Upload` with no card, though `Upload` is not the engine's shell. A whole-tool `Bash` entry on `TaskSpec.allowedTools` / `RunnerDeps.allowedTools` granted it too.
329
+ - **Now.** A rule reaches a call under the names its direction reads. A deny or ask content (`Bash(rm:*)`) reaches the call under every name it answers to, as before. An allow content (`Bash(npm test:*)`, `Skill(x)`, `WebFetch(domain:…)`) reaches it only under its wire name's own grammar word. The engine's shell and `Monitor` keep every `Bash(…)` grant; `Upload` takes none and is asked. A whole-tool rule (`Bash`) still reaches every call that answers to it in every direction — a stored row, a skill's list, a session's list. The exception is the two lists handed in at launch, `TaskSpec.allowedTools` and `RunnerDeps.allowedTools`: their entries reach the wire name only (Claude Code 2.1.309 does not expand a CLI-argument rule through an alias). A session's `toolAllow` narrowing reads the same way: a `Bash(npm test:*)` entry no longer admits `Upload`. A person's stored `Read(…)` / `Edit(…)` face rows still meet a call on that face by its declared target, whatever names it wears (a face is not an alias). Claude Code 2.1.309 (`cli309.js:258668`) lets an alias-wearing tool meet a deny / ask content only when the content is whole-tool shaped; sema reaches every deny / ask content — stricter, divergence `shell-name-wearer-reaches-content-rules`, open to veto.
330
+ - **Who needs it / who is affected / compensation (open to veto).** *Needs it:* a person who approved `npm test` for the engine's shell has not approved it for every tool that borrows the shell's name. *Affected:* a deployment that mounts a caller tool under an engine tool's name and relied on a `Bash(…)` (or `Read(…)`, `Skill(…)`, `WebFetch(…)`) allow, or on a launch-list `Bash` entry, to run it unasked: that call is now asked (or, under a session narrowing, refused). *Compensation:* write the grant on the wire name — `Upload` on the allow list, or answer the card once. Deny and ask rules are not changed.
331
+ - **Consumers.** @server: its own code declares no aliased tool, so the reach changes only for an embedder that mounts one through the spec seat. A deployment whose `TaskSpec.allowedTools` (or `APPROVAL_GRANT` → `RunnerDeps.allowedTools`) names an alias, or a `Bash(…)` grant meant for an aliased tool, now grants the wire name only: write the wire name. @cli: the lists the shell hands in at launch are this source; an entry there grants the tool whose wire name it is, a person's stored rows and a skill's list keep reaching an alias by a whole-tool name. @client-core: nothing new to render — the rule text, the card and the frames are unchanged. The one place one entry reads two ways — a whole-tool entry naming an alias, granted from a skill's list and not from a launch list — is the reference's own split (it does not expand a CLI-argument rule through an alias; C-R1008).
332
+ - **Pins.** `test/backlog2478-content-rule-reach.test.ts` (P1 the wearer under a stored row, the request's, the deployment's and a skill's `Bash(npm test:*)` allow, and a session narrowing; P2 a `Bash(rm:*)` deny / ask; P3 a whole-tool `Bash` deny / ask / allow and a skill's whole-tool allow; P4 the engine's shell and `Monitor`; P5 the launch lists; P6 the readings table). `test/name-readings-oracle.test.ts` gains the two rows `policy.persistedGrammar.grant` and `allowEntry.launchListNames` (both `wire`). `test/backlog1327-allow-entry-unit.test.ts` ⑳ (#1327) now reads "one entry, one reading within one source" and pins the one cell where the source decides.
333
+
334
+ ### A person's bare "no" on a resumed leg ends the turn awaiting the user: rejecting a plan pause — or a parked call — with no note sends no further model request (#3089, C-R401 F-2; aligned with Claude Code 2.1.309 `cli309.js:295883`; behavior change open to veto)
335
+
336
+ - **Before.** A durable resume always owed the model a turn: the resumed leg delivered its continuation and the loop forced one more provider request whatever the decision. A person who rejected a plan (the `plan_review` pause) with no note got one more model request — a re-plan or a new question. A bare refusal of a parked tool call halted the parked batch's siblings and stamped the result, but the run still asked the model once more. A live turn already stopped there.
337
+ - **Now.** One judgment, a person's refusal (`deniedBy: ask_resolution`, a `human_refused` settlement) that carried no note on a leg that is not a delegated child, decides every halt on a person's "no": a live batch's, a parked call's resume, a plan pause's resume. When it holds, the resumed leg records the decision (the tool result carrying the refusal sentence) and requests nothing more. The run completes with `haltedOnUserRejection: true`, and its `result` is the transcript's last assistant message (the plan request, or the parked call's message) — the same answer a halted live batch gives; empty when the transcript has no answer yet (a host-minted pause before any model output). The user's next message continues the session as usual.
338
+ - **Unchanged.** These keep their turn, and the model reads the refusal and adapts or reports: a refusal with a note (any non-empty text, whitespace included — the reference treats only empty feedback as none), a policy / hook / classifier deny, and every delegated child (forks included). A resumed leg that delivers a parked steer along with the refusal also still asks the model: the steer is the user's input, the same way queued input continues a live halted run.
339
+ - **Reach, stated.** This is not a plan-mode rule. The judgment reads only who refused, whether a note came with it and whether the leg is a delegated child, so it holds on every resumed leg in every permission mode: a parked tool approval under either approval arm — `human`, and the non-budgetable `irreversible_ask` (a delete card, an egress call) — whatever card it shows (the plan card of `ExitPlanMode` included), and the `plan_review` pause. *Who needs it*: a person declining any parked action, not only a plan; the reference aborts the turn on every feedback-less rejection, on a tool call's card and the plan card alike (one handler, `yyr` (cli309.js:295883)). *Who is hurt*: a host or a test that declines a parked call with a bare deny in order to walk the model on to its next call — a second park of the same tool, a re-issued call, a deny chain run to the restart-loop cap; it now gets a completed run with the halt stamp at the first decline. *Compensation*: send the deny with a `reason` (any non-empty text) and the turn goes on exactly as before; a policy's deny keeps the turn as well.
340
+ - **Behavior change, open to veto.** *Who needs it*: a person rejecting a plan or an action; the reference stops and waits. *Who is affected*: a host that relied on the extra model turn after a bare refusal on a resumed leg (a re-plan, a follow-up question); it now gets a completed run with the halt stamp. That includes a parked tool call: a person's bare "deny" of a parked `policy_ask` call (`decidedBy: "person"`, no `reason` or an empty one) ends the turn the same way, so a chain of such denies against a model that re-issues the same call no longer runs on to the restart-loop cap — the first one completes the run with the stamp and leaves no row, where the run used to fail with `suspend.loop` after the cap's worth of parks. *Compensation*: a refusal with a note keeps the old behavior, and the cap still bounds the chains whose refusals keep the turn (a person's deny with a `reason`, a policy's deny).
341
+ - Hard-breaking: none. Closed sets: none. Exports: none (`TaskResult.haltedOnUserRejection`'s contract now names the plan pause and the resumed leg; the internal halt fact's `rejectedToolCallId` is optional, because a plan pause row without a recorded requester has none).
342
+ - **Known limit (stated, KL-3089-a).** Two post-run passes are not turns and still run after the halt, on the live leg and the resumed leg alike: the end-of-task compaction when the transcript is over its threshold, and `suggestNextPrompts` when a deployment enables it. Each can make one provider request.
343
+ - **Consumers.** @test: after a bare plan rejection the resumed leg makes 0 model-turn requests (count the leg's calls after the decide; under the compaction threshold and without `suggestNextPrompts` that is every provider call), and the result is `completed` with `haltedOnUserRejection: true`; a note keeps 1 request. @test: a cell that declines a parked call to reach what comes after it (the next park's card, a deny chain's cap, the re-issued call) sends the deny with a `reason`; with a bare deny the run completes at the first decline. @cli: a bare "No" on the plan card ends the run awaiting the next message, with no re-plan streamed; on a parked call's card the run ends the same way, with the result shape a halted live batch already has (`completed`, `haltedOnUserRejection: true`), so the shell needs no new rendering.
344
+ - **Pins.** `test/backlog3089-plan-bare-reject-ends-turn.test.ts` (a real Runner over the in-memory checkpoint store: a bare plan rejection — no reason, empty reason — makes 0 requests and 0 summary calls, completes with the stamp and leaves no row; the next message sees the stop sentence and the plan, and the answer is the plan request; a reason or a whitespace reason makes 1; a deployment policy's bare rejection makes 1; a parked call's bare refusal makes 0 and a noted one 1; a delegated child makes 1 with no stamp; a compacted park makes 0; 600 s of fake time after the leg settles makes 0; a parked steer makes 1 and carries the steer; a host-minted plan pause over a transcript with no answer yet completes with the stamp and an empty result, not a failed run), `test/backlog1624-plan-rejected-stop-and-wait.test.ts` R1 / H1 / B1–B3 re-pinned (the bare shapes ask nothing on the resumed leg and the settled records are read at the person's next message; a delegated child still asks), `test/plan-review-gate.test.ts` (the lying-decision cell reads the recorded verdict the same way), `test/backlog554-resume-batch-settlement.test.ts` (structural pin follows the halt-fact site), `test/durable-checkpoint.test.ts` (#3125: the restart-loop cap's negative control now runs the two chains that keep the turn — a person's deny with a note, a policy's deny — and both still trip `suspend.loop`; a person's bare deny — no reason, or an empty one — ends the chain at the first park: completed with the stamp, no request after it, no row; delivered with a parked steer it keeps the turn and the model answers the steer), and the cells whose decline is only the way on (#3142: the deny now carries a note, every assertion unchanged) — `test/backlog1414-approval-card.test.ts` (the re-entry park on every card arm, `human` and `irreversible_ask`, the plan card included; B7's two declines), `test/durable-resume-loop.test.ts` and `test/rb471-suspend-loop-negative-decision.test.ts` (the restart-loop cap's deny chains), `test/backlog1974b-keyless-and-unreadable-resume.test.ts` ⑤ (the deny beside an unreadable edit, then the re-issued call).
345
+
346
+ ### One placement fence: `ExecutionEnvFactoryContext.placementTarget` tells the env factory where EVERY handed-off leg must be minted — spawned, woken, resumed or a composition's later leg — and one receipt refuses a leg minted elsewhere (#2990, design/2884 S1, C-R975 K1–K4 / K6; hard-breaking: 2; closed sets: +1 `config.placement_not_honored`; exports: +1 type `PlacementTarget`) (@server @computer-use @test)
347
+
348
+ - **Before.** Only a durable resume leg told the factory where to mint (`resumeWorkspace`, a frozen copy of the whole checkpointed handle). A delegated child, a woken retained agent, a workflow agent and a cascade / verification gate's later leg carried only the tree's `placementRootSessionId`, so a target-bound factory chose their device by the current binding — after a re-bind mid-run a child, a verifier or a later rung ran on another device than the work it continues — and the engine checked nothing about them.
349
+ - **Now.** `placementTarget: Readonly<{ provider; deviceId? }>` is the one answer. Every leg reads its own target once, when its workspace settles (its env's `workspaceHandle()` projected; none when the env is not remote or cannot answer yet), and that value fences every leg it hands work to: each agent it spawns or wakes (a retained snapshot keeps no target — the waker's is handed, the same answer a tier-3 revival gets) and, for `runCascade` / `runWithVerification` / `resumeWithVerification`, every later leg (the first leg's target, learned through `onWorkspaceResolved`, whose `ResolvedWorkspace` now carries `target?`). A resume leg's fence is folded member by member: the row's `provider` / `deviceId` win, a member the row lacks (a row older than `deviceId`) is the waking leg's. One receipt (`placementHonored`) checks every fenced leg: a leg restoring a checkpointed workspace keeps `resume.env_failed`, now against the folded fence — at the restore and again where its workspace settles (an env that moved during re-initialization is caught there); any other fenced leg whose env does not name the fenced device is refused `config.placement_not_honored` before it runs (its env torn down). A `RunInternals.placementTarget` the engine cannot read (no non-empty string `provider`, a non-string `deviceId`) is refused the same code before the factory is asked. Rules: two (one contract, one receipt) where the additive form needed four (a second contract, and every target-bound factory writing its own precedence).
350
+ - **Hard-breaking (@server), open to veto.** ① *What*: `ExecutionEnvFactoryContext.resumeWorkspace` is removed, no alias; `placementTarget` takes its place on resume legs and is now also present on every handed-off leg. *Who*: a target-bound factory reading `ctx.resumeWorkspace` (server `remote-env-device.ts:1446`). *Compensation*: read `ctx.placementTarget?.deviceId` and drop any `resumeWorkspace ?? placement…` precedence (the engine folds it once); restore facts stay on `VmLifecycleOptions.priorHandle` / `ResumePreflightInfo.workspaceHandle`; the contract sentence changed from "MUST NOT look the current binding up afresh" to "MUST NOT choose the target by the current binding — it may read it only to find that it differs from the fence, and then refuse". ② *What*: a new refusal code `config.placement_not_honored` (a fresh fenced leg minted on another device; an unreadable handed fence). *Who*: closed-set consumers of refusal codes (server error mapping, cli rendering, test criteria). *Compensation*: add the word; a factory that honors the fence never triggers it.
351
+ - **Also changed (not breaking).** The composition entries now dispatch their first leg with a shallow copy of the caller's internals whose `onWorkspaceResolved` records the target and then calls the caller's own sink (before: the caller's object by identity / exactly `undefined`), and later legs carry `placementTarget` beside the `placementRoot` they already gained; the verification gate's per-leg wiring-manifest wrapper now calls the caller's `onWiringManifest` on the caller's own object on every leg (a later leg's placement copy was the receiver before); `ExecutionEnvFactoryContext.taskId` is now absent (not an `undefined` value) when the caller set no `TaskSpec.taskId` — an engine-built child spec never carries one, so a factory must not identify a descendant by it (contract sentence added). Additive: `RunInternals.placementTarget?`, `ToolExecuteContext.placementTarget?`, `ResolvedWorkspace.target?`, `RunWorkflowOptions.placementTarget?`.
352
+ - **Consumers.** @server S-2451 P2 (7.139.0+): read the one seat (HC 3's `provider` check can read `placementTarget.provider`); map `config.placement_not_honored`. @computer-use cc (no known reader of `resumeWorkspace`). @test: criteria naming `resumeWorkspace` read `placementTarget`; the new code joins the refusal closed set.
353
+ - **Known limits (stated).** The receipt trusts the env's report (an adapter that echoes the fence while connecting elsewhere passes — design469 F7). A spawning leg whose env cannot answer `workspaceHandle()` when its workspace settles (a lazy connect) has no target, so its agents carry no fence. A woken agent is minted where its WAKER is, not where it first ran — after a re-bind it runs on the new device without the old one's files (the server's re-bind moves routing, not bytes). Observer side-car legs and `warm-resume` carry no placement internals at all (#2992 / #2993, unchanged).
354
+ - **Pins.** `test/backlog2990-placement-fence.test.ts` (a target-bound factory over a mutable binding, real Runner: the four child kinds take the spawner's target and carry no task id; a top-level leg has no fence; a lazy-connect spawner hands none; the receipt refuses / passes / skips a device-less fence / refuses an unreadable handed fence before any mint; a resume folds per member and its receipt checks the folded device; one settled agent woken through its retained snapshot and through a tier-3 revival gets the waker's target before and after a re-bind; cascade and verification later legs keep the first leg's device across a mid-run re-bind and a binding-following factory is refused; workflow agents on both spawn legs; a restore whose one handle object moves device in place is refused — the receipt reads the handle live; a method-style `onWorkspaceResolved` keeps its receiver through the observing copy; a restore whose re-initialization moves the env is refused where it settles and reports nothing; the verification gate calls a method-style `onWiringManifest` on the caller's object on every leg), `test/design469-r3-fence.test.ts` (the resume lane re-pinned on the new seat), `test/backlog2058-prior-handle-same-copy.test.ts`, `test/backlog246-internals-seam.test.ts` (the forward shape).
355
+ - **Who needs it.** A durable resume whose environment lands somewhere other than the device its fence names (a lazy-connect adapter whose `workspaceHandle()` throws at the settle point, or a factory that followed the deployment's current binding) must not run there: the receipt is taken again at the resume leg's settle point, so the leg is refused `resume.env_failed` before anything reports the workspace.
356
+ - **Who is hurt.** A host whose resume factory honoured the fence only at mint time and re-anchored the env afterwards saw the resumed leg run before 7.61.0; it is now refused at the settle point (narrowing, open to veto).
357
+ - **Compensation.** Mint the resume env on the fenced device (the row's `placementTarget` members win over the handed ones) or hand a fence that names no device; the refusal's `detail` names the fenced device and the device reported.
358
+
359
+ ### A provider that refuses one tool's input schema no longer fails every turn: the tool is re-sent without its parameters while the refusal stands in the transcript, and a refusal that ends a run says which part of the request it named (#2681, #1669; CC 2.1.309 F-14; ruled C-R973 addendum 2; behavior change; hard-breaking: none; closed sets: `AssistantMessage.errorKind` +1 `tool_schema_refused`, `ENGINE_NOTICE_CODES` +1 `context.tool_schema_removed` (user, engine), `LoopContinueReason` +1 `tool_schema_refusal_retry`, new `REFUSED_REQUEST_PARTS` (three words); exports: +1 root value `REFUSED_REQUEST_PARTS`, +1 root type `RefusedRequestPart`; members: `AssistantMessage.refusedTool?`, `BrainError.toolSchemaRefused?` (and its constructor option), `terminal.detail.provider_rejected.errorKind?` / `.tool?` (wire +2 optional keys), `SSERequest.toolNames?`, `AgentLoopConfig.onToolSchemaRefused?`) (@server @cli @client-core @test)
360
+
361
+ - **Before.** A provider 400 that refused one tool's input schema was an `invalid_request` like any other: the run failed, and because the tool stayed mounted every later turn of the session failed the same way. A client that wanted to tell a schema refusal from "change it and resend" guessed from the provider's echo word (client-core's six OpenAI words).
362
+ - **Now.** The dialect table reads the refusal at the brain boundary and locates the tool: the Anthropic form `tools.N.custom.input_schema` in `error.message` (Claude Code 2.1.309's own pattern), and the OpenAI-family `param: "tools[N].function.parameters"` beside `invalid_function_parameters` (read by its documented shape — no captured body yet). The adapters state the request's tool list (`SSERequest.toolNames`), so the failed turn names the tool: `errorKind: "tool_schema_refused"`, `refusedTool`. That turn — live, and as its persisted record — is the request view's instruction, in the same seat as #2874's image refusal (`engine/llm/rejected-images.ts`): an MCP or A2A tool it names is sent with `{ type: "object" }` (Claude Code's replacement) in every request built from a transcript the record stands in — the next turns, the session's next runs, a resumed session — at most eight tools per such transcript (its bound), and the loop re-sends the turn once per refusal. The model can still call the tool; it no longer sees its parameters. The person hears `context.tool_schema_removed` once per refusal (`detail: { tool, sessionId, runId }`): fix the schema on the server, then start a new conversation. A failover chain hands the refusal back like an image refusal instead of trying the next brain.
363
+ - **The terminal (#1669).** `terminal.detail.provider_rejected` gains `errorKind?` — the refused message's own `errorKind` when it is one of `REFUSED_REQUEST_PARTS` (`input_too_long`, `image_unprocessable`, `tool_schema_refused`) — and, with `tool_schema_refused`, `tool?`. A refusal that reaches the terminal is a tool the engine could not send without its schema (a host-defined or engine tool, or the bound of eight already used in the transcript the request was built from). Facts the account already states are not restated: a quota is `providerCondition: "quota_exhausted"`, credentials and rate limits are `status` 401 / 403 / 429. The ticket's `content_filter` member and the five OpenAI echo words that locate nothing (`invalid_type`, `missing_required_parameter`, `unknown_parameter`, `unsupported_parameter`, `invalid_json_schema`) are not engine words: no captured provider body shows them (#3076).
364
+ - **Divergence from Claude Code, minor.** The reference keys a replaced schema by the tool's name and the refused schema's hash, so a schema the server fixes mid-conversation goes out again; here the refusal is keyed by the tool's name — the notice's instruction is the reference's ("start a new conversation"). The reference holds the set beside the conversation; here it is the transcript's records, so a compaction that summarizes a record away returns that tool's schema, and a provider that still refuses it costs one more round trip before it is replaced again (KL-2681-a). The reference reads only MCP tools; A2A tools are read the same way here (their schema is a peer's too). The notice does not quote the provider's words (the failure record keeps them).
365
+ - **Consumers.** @server: `context.tool_schema_removed` joins the user notices; `terminal.detail` carries two more optional keys. @client-core: `provider_rejected.errorKind === "tool_schema_refused"` is the engine's own schema verdict, for a refusal that reached the terminal; the six-word guess can step back to the words no engine row reads. @cli: the notice is a user line. @test: the closed sets above.
366
+ - **Pins.** `test/backlog2681-tool-schema-refusal.test.ts` (both locator forms and five controls; the views — order, once each, external tools only, the bound of eight, the same objects elsewhere; a real Runner and a real MCP server: refused, re-sent with `{ type: "object" }` for that tool only, completed, one notice, and the session's next run sends no schema and meets no 400; the Anthropic form at the brain seat names the tool at position 1; a host tool's refusal is not re-sent and the terminal reads `errorKind` and `tool`; the closed set and its reader).
367
+
368
+ ### The person's card names the extension behind a PreToolUse hook's question (#2685; CC 2.1.309 F-18; ruled C-R973 addendum 2; behavior change: the wording of a hook ask's card sentence; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core)
369
+
370
+ - **Before.** A `classic.PreToolUse` deny and allow carried the registration that answered (`answeredBy`); the ask dropped it, so the approval card showed the hook's reason with nothing saying which extension asked.
371
+ - **Now.** A PreToolUse ask — this leg's own, an inherited installation's, and the re-screens of a rewrite or an approved edit — carries the sentence a `tool.check` ask carries, from the one builder (`extensionQuestionText`): `tool "<t>" needs approval (asked by extension "<name>": <the hook's reason>)`. A hook ask from no named registration keeps the hook's words. The reference puts the same fact on the hook ask's decision reason (`hookSource`); a structured member on the card for both events is #3077.
372
+ - **Pins.** `test/backlog2685-hook-ask-names-extension.test.ts` (with and without a reason; beside a policy ask the fold carries the named sentence; a deny is unchanged).
373
+
374
+ ### MCP tool descriptions are cut at 4,096 characters, and so are an MCP server's instructions (#2683; CC 2.1.309 F-16; ruled C-R973 ⑦; behavior change; behavior narrowing open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
375
+
376
+ - **Now.** `MCP_TOOL_DESCRIPTION_MAX_CHARS` 2,048 → 4,096 and `MCP_INSTRUCTIONS_MAX_CHARS` 8,192 → 4,096 — the reference's number for both. The reference sends its first-party servers' text in full; there is no first-party server here.
377
+ - **Behavior narrowing, open to veto.** *Who needs it*: every session pays a server's instructions in each request's prompt prefix; the reference bounds them at 4,096. *Who is harmed*: a server whose instructions run between 4,097 and 8,192 characters — the model now sees the first 4,096 and the disclosed cut (`(Truncated by the agent runtime: this server's instructions exceeded 4096 characters.)`). *Compensation*: the cut is disclosed in the model's text; a deployment can shorten the server's instructions or replace them (the host entry of the same lane is bound by the same number).
378
+ - **Pins.** `test/backlog2683-mcp-caps-4096.test.ts` (4,096 whole and 4,097 cut for instructions, the host replacement, a real MCP server's descriptions at and over the bound); the two existing pins naming the old numbers re-pinned.
379
+
380
+ ### A write to a file whose name is near the filesystem maximum works again: the staged sibling's name is cut to fit (#3106; failure-path fix, no success path changes; divergence candidate — Claude Code 2.1.309 has the same failure, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
381
+
382
+ - **Before.** `NodeExecutionEnv.writeFile` stages `<name>.tmp.<pid>.<hex12>`, up to 29 bytes longer than the target's name, so a target named ~227 bytes or more failed at the open of its sibling (`ENAMETOOLONG`) and the whole write with it (a 230-byte name wrote, 240 and 255 did not).
383
+ - **Now.** One function mints the sibling's name (`stagingSiblingOf`): the shape is unchanged. Only when the sibling would pass 255 bytes is the target's name cut — whole characters, from its end — to leave room for the suffix. A name that fitted before stages under exactly the name it had. A target name already past 255 bytes is left whole, so the open refuses it at once (`name_too_long`) before any byte is staged.
384
+ - **Divergence from Claude Code 2.1.309, candidate (open to veto).** The reference builds its sibling as `<target>.tmp.<pid>.<hex12>` with no cut (`A5r`, cli309.js:252815) and fails the same way; this changes only names that failed before.
385
+ - **Who needs it / who is affected / compensation.** *Needs it:* a host whose files carry long generated names. *Affected:* nobody — the sibling's name is seen only in a "preserved at" sentence or a residue notice. *Compensation:* none needed.
386
+ - **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (254 / 255-byte names fresh and overwritten with the mode kept; a multi-byte name cut on whole characters; the shape unchanged for ordinary and 200-byte names; a 256-byte name refused before any staging).
387
+
388
+ ### An in-place fallback write is not cancelled once it has begun, so `aborted` again means the target was never touched (#3107; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
389
+
390
+ - **Before.** The five in-place legs of `NodeExecutionEnv.writeFile` (the link could not be read; a multi-hop or non-regular link target; a non-regular target; the staging open refused `EACCES`; the rename refused after the staged copy was durable) passed the caller's signal to an `O_TRUNC` write: an abort mid-write answered `aborted` with the target already cut short — against the documented meaning, "`aborted` means it was never touched".
391
+ - **Now.** Each leg judges the signal once, before its first byte (the abort is also judged where it always was: the entry checks and, on the staged path, every step up to the rename): an abort that landed earlier answers `aborted` with the target untouched, and a leg that has begun runs to its end and answers `ok` or its own error — never the signal inside the write. One rule — `aborted` ⇒ untouched — replaces "cancellation differs by leg".
392
+ - **Who needs it / who is affected / compensation (open to veto).** *Needs it:* every caller that reads `aborted` as "nothing was written" (the server's remote in-place path read it as "maybe half-written"). *Affected:* a caller that cancels a large write through an in-place leg (a multi-hop symlink, a FIFO, a read-only parent directory, a refused rename): the write now completes instead of stopping half-way; before, it left a torn file under an `aborted` answer. *Compensation:* the default staged path is unchanged — still cancellable at every step and atomic; a caller that must be able to stop a write on those targets cancels before the call.
393
+ - **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (one cell per leg: an abort once the write has begun ⇒ `ok` and the whole content; an abort landing on the leg's last awaited step, before its first byte ⇒ `aborted`, target untouched, and on the rename leg the staged copy discarded rather than "preserved at"; a signal aborted before the call ⇒ `aborted`, target and chain untouched).
394
+
395
+ ### A staged file that could not be removed is told, not dropped: a failed write's error names it, a successful write announces `fs.staging_file_left` (#3108; closed sets: +1 `EngineNoticeCode` `fs.staging_file_left`, audience operator, minter engine, open to veto; hard-breaking: none; exports: none) (@server @cli @client-core)
396
+
397
+ - **Before.** Four places removed the staged sibling with `unlink(tmp).catch(() => {})`: a failed removal left up to the whole content on disk and nobody was told.
398
+ - **Now.** One function discards the staged file and answers what is left of it (a file already gone is not a residue; a file that was never created is not removed at all). A failed write — the staged write failed, the abort landed before the rename, the rename was refused with no in-place fallback — appends `; staging file left at <path> (<code>)` to its error. A write that succeeded (the in-place rewrite after a refused rename, or after a staging file whose write was refused `EACCES`) stays `ok` and announces `fs.staging_file_left` (`detail: { path }`) on the env's `onNotice` seat; an environment with no seat says nothing. The deliberate "preserved at" error, where the staged copy is the only surviving new content, is unchanged.
399
+ - **Closed set +1, three sentences (open to veto).** *What changed:* `ENGINE_NOTICE_CODES` gains `fs.staging_file_left` (audience `operator`, minter `engine`; 110 → 111). *Who is affected:* @server, @cli and @client-core — any reader that enumerates the notice codes or keeps a whitelist reads one more row (an unknown code reads as `operator`, the registry's default). *Compensation:* none needed beyond the new row; nothing mints it unless a staged file could not be removed.
400
+ - **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (a failing removal on each of the four sites; the announcement on both success paths; a removal that works says nothing; ENOENT is no residue; no removal of a file never created; no seat, no sound).
401
+ - A read-only (0444) target inside a writable directory is replaced through staging + rename with its mode kept — the same form as Claude Code 2.1.309 (`cli309.js:252815`), #3109.
402
+
403
+ ### MCP runs on the v2 SDK — `@modelcontextprotocol/client` + `@modelcontextprotocol/core` 2.4.0 replace `@modelcontextprotocol/sdk` 1.30.0; the wire is unchanged, and every place the new SDK changed a default the engine relied on is held at a door the engine owns (#2929, design/454 P1a, C-R960; behavior narrowing ×2, open to veto; hard-breaking: the failure record of a server's `-32000` / `-32001` answer moves word; closed sets: none; exports: see the next section; dependencies: three) (@server @cli @client-core @test)
404
+
405
+ - **Dependencies.** `@modelcontextprotocol/sdk` 1.30.0 removed. `@modelcontextprotocol/client` 2.4.0 and `@modelcontextprotocol/core` 2.4.0 added, exact; `@modelcontextprotocol/server` 2.4.0 is a dev dependency only (the test fixtures and `src/examples`, neither shipped).
406
+ - **Wire.** Unchanged. No client sets `versionNegotiation`, and the pinned SDK's connect sequence without it opens with the `initialize` handshake alone, offering `2025-11-25`, and never sends `server/discover` (pinned on the wire: the first frame is `initialize`, no `server/discover`). A connect → list → call → resource list → read → dispose cycle was recorded under 7.59.0 and under this tree: the same six frames, the same bodies (the one difference is the key order inside the `notifications/initialized` frame).
407
+ - **Held at the door (five places the SDK's defaults moved).** (1) `resources/list` goes on the wire a page at a time and `resources/read` once per read, through `request()`: the SDK's list verb, called without a cursor, walks every page itself (to 64, then throws) and caches the aggregate, and its read verb answers from a response cache whenever a server stamps a positive `ttlMs` — on any connection. (2) The HTTP transport is built with `requestInit: { redirect: "manual" }`: its default follows a redirect within the origin, which would send the request — and ask the peer seat again — at a path the declaration never named; a 3xx stays the answer on the POST, the SSE GET and the session-end DELETE. (3) A tool's definition rides each call (`callTool`'s `toolDefinition`, from the connection's latest listing through the leg's own intake); the SDK's private tool cache the engine used to fill — and the pool's per-holder rewrite of it — is gone. (4) The lenient `tools/list` schema is a Standard Schema object: the v2 SDK reads an argument it does not recognise as a schema as the request's options, so the leniency and the request's own signal / timeout would have been lost together; no `as never` remains at an SDK call. (5) A failure is classified by where it arose: a `ProtocolError` is the server's answer (`protocol`, delivered "yes"); an `SdkError` is read by its code from one table total over the SDK's enum (`SDK_ERROR_READINGS` in mcp-failure.ts — whether the request had left, and the class). (6) A 403's challenge is read once, by the peer seat's fetch: a 403 it reads as a status reaches the transport without its `WWW-Authenticate` — the v2 transport matches `error=` anywhere in that header (a quoted description, the tail of `not_error=`) and answers an `insufficient_scope` it finds with a step-up it has no provider for, which read as `unknown`; such a 403 is `http_status` 403 as in 7.59.0. The host seat (#2841) runs on the same client: its verdict rides the v2 `ProtocolError`'s `data`, read by identity as before.
408
+ - **Hard-breaking (open to veto).** *What changed:* a server that ANSWERS a JSON-RPC error `-32000` / `-32001` is `errorCode: "protocol"`, delivered "yes"; it was `connection_closed` / `timeout`, delivered "unknown" (1.x gave the server's code and the client's own close and timer one class). The client's own close and timer keep `connection_closed` / `timeout`. A dial whose listing the result schema refuses is `protocol`, delivered "yes", liveness `reachable`; it was `unknown` / "no" / `unknown`. *Who is hurt:* a consumer keying a retry on `timeout` for a server that reports its own upstream timeout as `-32001`. *Compensation:* the server's own words ride the error text; the code is the server's.
409
+ - **Behavior narrowing (open to veto) — K1.** On a `2025-11-25` connection a `tools/call` result whose `structuredContent` is not an object (array, string, number, boolean, null) fails the call — `Invalid result for tools/call: …`, `errorCode: "protocol"`, delivered "yes" (the server ran it); 7.59.0 passed the value through. The refusal is the revision's own result schema; the `2026-07-28` schema takes any JSON value, and a connection that negotiates that era (design/454 P2) will. RB-411 closes with it: a falsy scalar under an output schema is no longer told it "did not return structured content".
410
+ - **Behavior narrowing (open to veto) — H12.** A tool whose listed `outputSchema` this client cannot compile (an unresolvable or remote `$ref`; a draft-07 form the default 2020-12 dialect refuses — an array-valued `items` — in a schema that declares no `$schema`) stays mounted, and its calls are refused before they are sent, by name: `mcp.tool_output_schema_invalid`, delivered "no" — the same validator the SDK checks results with judges it, at intake, and the refusal is the listing's own (beside `mcp.tool_declaration_changed`), so a resend it refuses after a lost session is not sent and the call keeps its first attempt's outcome. The compiler's message is not carried (it quotes the server's schema). 7.59.0 called such a tool with its structured result unvalidated; the v2 SDK refuses the call itself, unsent, with a `ProtocolError` that would read as the server's answer. Who is hurt: a server that ships a remote `$ref` in an output schema — its tool was callable yesterday and is refused today.
411
+ - **Text (K2).** A protocol error's text is the server's as sent: the v2 SDK stamps no `MCP error <code>: ` of its own, so the fold that removed a doubled stamp is retired. A server built on an SDK that stamps still shows its one stamp, one that does not shows none; the code rides structured (`details.code`, `tool_end.errorCode`), and a protocol-range code keeps its name — with its number beside it on the connect, status and refresh faces, which carry no structured code (`<condition> (MCP protocol error -32022): <server text>`). The 1.x HTTP transport's own `Streamable HTTP error: ` lead is gone too: a transport failure's text opens with the transport's words (`Error POSTing to endpoint: …`). A probe that stopped waiting for a server reads `the probe stopped waiting …` without the old `MCP error -32001:` lead.
412
+ - **Task support.** A tool listed `taskSupport: "required"` is still refused before sending, by the engine (`mcp.task_required`); the SDK's second lock behind it no longer exists.
413
+ - **Consumers.** One new pre-send refusal word on `tool_end.errorCode` / `details.code`: `mcp.tool_output_schema_invalid` (delivered "no"), beside `mcp.task_required`. @server: `probeMcpServers` rows and the status / manifest faces read as before, with the `-32000` / `-32001` move above; your own MCP servers' 1.x SDK is untouched; #2631's in-process transport seat is the v2 `Transport` (`@modelcontextprotocol/client` root). @cli: your direct `@modelcontextprotocol/sdk` 1.x dependency now installs beside core's 2.x — two zod consumers and two error-class families (an error core throws is not `instanceof` a 1.x `McpError`). @client-core: a fixture that builds its fake MCP server from the SDK copy installed under core (`node_modules/@modelcontextprotocol/sdk/dist/esm/…`) finds it gone — install a server SDK of its own. @test: K1, K2 and H12 above; the wire unchanged.
414
+ - **Pins.** `test/backlog2929-mcp-sdk-v2-front-doors.test.ts` (a hung listing fails at the startup bound, not the SDK default; a listing that never ends stops at the page cap, disclosed; a `ttlMs`-stamped read is asked twice for two reads; a 307 on the POST, the SSE GET and the DELETE is never followed and the seat is asked once per request; no `as never`, no retired SDK verb called, the client registers only `elicitation/create`, no 1.x import); `test/mcp-failure-record.test.ts` ①b (every `SdkErrorCode` constructed, through the table; the table total over the enum; an errno-shaped SDK code not read as an errno); `test/rb408-mcp-spec-2026-shapes.test.ts` (K1 both ways, RB-411, the 2026 schema's reference; G11's remote `$ref` refused unsent, nothing fetched); `test/rb437-mcp-failure-disclosure.test.ts` (K2: unstamped arrives unstamped, stamped once; the fold retired); `test/mcp-schema-flatten.test.ts` (the definition validates a result; H12 refused unsent, the server never called, a sibling runs); `test/design384-p0-mcp-truthing.test.ts` (the three packages pinned to one release, no 1.x; the method sequence and `2025-11-25` on the wire); `test/backlog1433b-one-universe.test.ts` ⑪m (the pooled listing record — an incomplete walk keeps every entry it did not reach, whichever holder's listing wrote it; no cache writer, read as code identifiers); `test/backlog2295-unauthorized.test.ts` T3 (the 403 challenge read once); `test/backlog1322-exported-judges.test.ts` #1373 (a proxy refusal whose cause is the SDK's own timeout is not a definite "never sent"). The first full run of this change on the shared runner found six files red of its own (the three pins just named plus three ratchet gates: the validator table's weak-identity row, the listing refusal's third sentence spliced from a table, the negotiation word in src) and one wall-clock sleep in a fixture; all are fixed here, none by raising a baseline.
415
+ - **Known limits.** The `2026-07-28` era (negotiation, `resultType`, embedded input requests) is not consumed: every connection is `2025-11-25` — design/454 P2–P3 (KL-2929-a). The v2 schema validator reads an output schema by its declared `$schema` dialect (2020-12 when none), where 1.x compiled every schema as draft-07: a draft-07-only form now fails to compile (H12 above) or validates differently (KL-2929-b).
416
+
417
+ ### `McpConnectionPool` is exported as before; a lease's `client` is the v2 `Client` type, and a lease carries no tool-cache writer (#2930, design/454 P1b, C-R960 K4 A; hard-breaking, open to veto: two type changes; closed sets: none) (@server @cli)
418
+
419
+ - **What changed.** `McpLease.client` is `@modelcontextprotocol/client`'s `Client` (it was `@modelcontextprotocol/sdk`'s); `McpConnectionPool.acquire`'s `dial` returns that type. `McpLease.openListing` is removed, with the `McpToolMeta` / `McpListingWriter` types it took: they rewrote the SDK's private tool cache, which no longer exists — a call carries its tool's definition (previous section).
420
+ - **Who is hurt.** A host that constructs the pool and dials it with a 1.x client, or calls `openListing`: none known (server, cli and client-core main: zero imports of `McpConnectionPool`; server's consumption ledger marks it `skip`).
421
+ - **Compensation.** Dial with `new Client(…)` from `@modelcontextprotocol/client`; the connection's listing record is `lease.listing`.
422
+
423
+ ### The run's MCP connection pool takes only connections the engine dialled, each for its own key, once; any other client is refused at the pool's entrance (#2843, C-R986; hard-breaking, open to veto; closed sets: `config.*` +1 `config.mcp_pool_foreign_connection`; exports: none) (@server @client-core @cli)
424
+
425
+ - **What changed.** `McpConnectionPool.acquire` rejects, with `code: "config.mcp_pool_foreign_connection"`, a dial that answers a client the engine did not dial for that key — a client a host built, one the engine dialled for another declaration or principal (taken off a lease), or one another pool entry already holds (the same connection under a second key or in a second pool) — and the pool keeps nothing of it: it is not entered, its close slot is not taken, it is not closed (it stays its owner's). A leg then dials the declaration itself. In 7.59.0 such a client was entered and its tools mounted under the key it was put in under — another declaration's connection, and another principal's identity, included; and a second entry over one client took the first's close slot and closed it on its own last release. The engine compiles each listed output schema with the validator the client checks results with, and the connection's carrier and transport are the engine's: a client built elsewhere carries none of them.
426
+ - **Who is hurt.** A host that pre-fills the pool with a connection of its own (the remote bridge of #2841 is the known potential reader): none known on main (server, cli and client-core: zero imports of `McpConnectionPool`).
427
+ - **Compensation.** Declare the server (a `{ kind: "host" }` transport with the leg's host seat, #2841, for a pipe the host owns); the pool dials and shares it.
428
+
429
+ ### A box answers for the records it has received, not only for the ones it holds; a double fault's in-process copy is settled against its box before the next leg delivers; the uplink frame key is unique across processes (#2940, #2760 — C-R962 Q1 A / Q2 A / Q3 A; behavior change; hard-breaking ① the store contract, ② the judgment's signature, ③ the parked copy's settlement and the frame key, three sentences each below; divergence candidates D-2758-a / b / c, open to veto; exports: +3 root `MAILBOX_CONSUMED_ID_WINDOW`, type `MailboxConsumedRecord`, `mailboxReplayDigests`; `judgeMailboxAppendById` signature changed) (@server @client-core @test)
430
+
431
+ - **Before.** A box answered an append under a record id only while it HELD that record: once a consumer acked it, the id was free again. Two paths therefore delivered one teammate message twice (KL-969j): the park seat's first ask committed and both asks were refused, so the box and the process each held it; or the first ask committed, another consumer drained and acked the record before the refusal arrived, and the re-ask wrote a second record. The uplink frame's `seq` — and so the record id a parked frame carries — started at the process's wall clock: two processes started within as many milliseconds as one of them had sent messages minted one id for two messages.
432
+ - **Now.** `ack` enters every id-bearing record it deletes into the box's received window: exactly the newest `MAILBOX_CONSUMED_ID_WINDOW` (256) by seq, each kept as `{ id, seq, digests }` (`MailboxConsumedRecord`; `mailboxReplayDigests` = one sha-256 per replay facet); a record without an id takes no place. `judgeMailboxAppendById({ held, consumed }, msg)` answers from the held records, then the window: an identical record ⇒ its `seq`, nothing written (the receipt reads `parked_durably`: the box took it); a different one ⇒ `mailbox.duplicate_record_id` naming the facets ("holds" / "received"). `drop` clears the window with the box's lifetime; `reap` keeps it, as it keeps the high-water mark (what it clears was never received). The file backend persists the window in its log (a `consumed` snapshot event, then the `ack` events) and shares it across processes like the rest of the box. At the park seat a second fault still parks in process (`parked`, unchanged), but the copy now owes its box — the binding the seat asked, as it was then: the session's next leg in this process asks that box once more, after prepare and before its turn-open batch and its box drain's first claim; a box that answers delivers the record (the copy is dropped, even when this leg binds another box or none), a box that refuses again is disclosed once (`onError`, `session-box-park`) and the copy is delivered as before. Until its debt is settled the copy is not delivered from this process (the turn-open batch keeps it back): one pass per leg over what is owed when the leg opens, stopped by the leg's abort — a debt that arrives during the pass, or one the abort left unasked, waits for the next leg. A leg with no debt awaits nothing. The uplink counter starts at a per-process draw from [2^51, 2^52) (then counts up), so two processes' frame keys meet only with probability ≈ uplinks sent / 2^51.
433
+ - **Hard-breaking ① — the store contract (open to veto).** *What changed*: after `ack`, an append under an id still in the received window is that record — its seq and no write for the same record, `mailbox.duplicate_record_id` for another — where it used to be a new record; the T1 kit (`mailboxStoreContract`) carries the window cases (each backend keeps exactly 256, newest by seq, id-bearing only, `drop` clears, `reap` keeps) and the T2 kit (`mailboxCrossProcessContract`) the cross-process one. *Who is hurt*: @server's SQL mailbox twins (TiDB / PG) and any third-party `MailboxStore` — the new kit cases are red until the window is implemented; a test that pinned "after ack the id is free". *Compensation*: keep `(scope, handle, seq, record_id, digests)` rows beside the box, insert the deleted id-bearing rows in `ack`'s transaction and trim to `MAILBOX_CONSUMED_ID_WINDOW` (import the constant, never the number), read held rows and window rows in `append`'s transaction and call `judgeMailboxAppendById`; delete the window in `drop`, keep it in `reap`.
434
+ - **Hard-breaking ② — `judgeMailboxAppendById`'s signature (open to veto).** *What changed*: its first parameter is `{ held, consumed }` (the held records and the received window) instead of the held array. *Who is hurt*: a third-party backend that calls it (@server's twins today call it nowhere, so the version that will). *Compensation*: pass `{ held: <the box's rows>, consumed: <its window rows> }`, read in the same transaction as the seq allocation.
435
+ - **Hard-breaking ③ — the parked copy's settlement and the frame key (open to veto).** *What changed*: after a double fault the session's next leg no longer always delivers the in-process twin — the box that answers delivers instead (the twin is dropped); a session with such a debt pays one store round trip at its next leg's open, and a copy whose debt is still unsettled (it arrived during that settlement, or the leg was aborted first) waits for the leg after instead of riding this leg's turn-open batch; an uplink frame's `seq` (`_sema_provenance.seq`, the frame key, the parked record's id) is now a per-process draw near 2^51, not near the wall clock in ms. *Who is hurt*: @test probes that count on the twin appearing after a double fault, or read the uplink seq as a timestamp; @client-core / @cli renderers see one copy where two arrived (no API change). *Compensation*: none needed for delivery (deliveries only decrease); read the uplink seq as an opaque per-sender counter (it is only ever compared for equality).
436
+ - **Divergence candidates D-2758-a / b / c (open to veto; Claude Code 2.1.309 does not anchor this).** Claude Code's mailbox write mints a new message id per write and does not retry a failed write (it logs and returns), and its reader keeps "delivered / consumed but not yet marked" message sets in its own process — so it never asks a store "is this the record I already sent". sema's at-least-once leased box with a re-asking park seat does: (a) the store keeps a received window of exactly 256 id-bearing records per box; (b) a double fault's copy is a debt settled against its own box at the next leg; (c) a window hit answers the record's original seq (the `append` signature is unchanged).
437
+ - **Limits, stated (KL-2758-a).** When the store refuses all three asks (the seat's two and the next leg's settlement) while the first had committed, the next leg reads the copy and the box's record — two reads, as before this change. A box that consumes more than 256 id-bearing records between two legs of this process puts the debt's record outside the window: the settlement writes it again (a second delivery). A pre-7.61.0 engine sharing a file mailbox directory skips the snapshot's `consumed` event (disclosed through `onCorruptRead` as a foreign record) and, when it rewrites the box, drops the window: upgrade every engine that shares one mailbox directory together (a layout stamp that refuses the older engine loudly is #3086). KL-969j is closed.
438
+
439
+ ### A run reads its caller's `TaskSpec` once, at its entrance — every member by ordinary lookup into one frozen snapshot that the session lock, prepare, the leg and the backstop all read (#3059, #3039 S1, C-R996 K1 / K3 / K4 / K6; #3061 and #3062 in the same change; security: a retired key a Proxy answers, and the screened prompt; hard-breaking: one group of behavior)
440
+
441
+ - **Before.** A caller's spec had three readings. Prepare's first copy kept the prototype and the own descriptors (an inherited or non-enumerable member visible, an accessor live, a Proxy's `get`-only answer invisible); the delegation rebind, the model gate and the plan pair then spread it (only own enumerable members survived, so an inherited `permissionMode` or `appendSystemPrompt` stopped applying on those three paths); the retired-key door looked keys up on the first copy. The stream layer read the caller's object itself before prepare (attribution, tracer, task id, session id — the session lock was taken on that read), and the leg read `objective` from it twice: once to build the prompt the model was sent, once for the prompt `classic.UserPromptSubmit` screened.
442
+ - **Now.** `readCallerSpec` (`src/core/task-spec-members.ts`) takes each `TaskSpec` member once, by name, through an ordinary property lookup (an inherited, non-enumerable, accessor-backed or Proxy-answered member included), and lands every defined value as an own enumerable data member of a frozen plain object. `Runner.runTaskStream` reads its spec through it before anything else, and every reader after that reads the snapshot: the lock and prepare see the same session id, the screen and the model the same objective, and every later copy keeps every member. Prepare answers the same read again rather than reading twice; the resume ladder reads its re-supplied config through the same function at the verb boundary. The member table (`TASK_SPEC_MEMBERS`) is fenced both ways against `TaskSpec` at compile time. The one re-read kept is the tool roster's identity check (a reassigned `spec.tools` is still refused `config.tool_mount_denied`): it compares objects, it takes no value.
443
+ - **Refusals of the read (by name, where prepare refuses; on a resume beside the config's container door, before any rung reads the config, as `checkpoint.config_refused`, `detail.field: "taskConfig"`).** A retired key the lookup answers — on the prototype, non-enumerable or only through a Proxy `get` — is `config.spec_retired_key` (#3061: such a `hooks` record used to pass silently on every path, so a deny callback it carried never ran). A member whose read throws is `config.spec_member_unreadable` (`detail.member`) — a dotted retired row whose step's own lookup throws too (`attachments.planModeReminder` on a bag that answers by accessor or Proxy, named by the row); whatever value was thrown, the run gets the refusal, never a throw from `runTaskStream`. An own enumerable key that is neither a member nor a retired name is `config.spec_unknown_key` (`detail.keys`); an inherited unknown name is not read and not refused (a class's prototype methods pass), while an own non-enumerable or symbol-keyed one is refused since #3202 (above). `CHECKPOINT_CONFIG_REFUSAL_CODES` gains the two new words (49 → 51).
444
+ - **Hard-breaking (one group of behavior), @server @cli @client-core.** *What changed*: a spec's members are taken once at the run's start by lookup, so a member supplied through the prototype, as a non-enumerable property, by a getter or by a Proxy now applies on every path (before, the agents / model-gate / plan paths dropped it — the mode it names can be wider than the default, e.g. `bypassPermissions`); a getter is not read again mid-run; a getter that throws, or an own key the engine does not declare, refuses the run. *Who is hurt*: a host that builds a spec as a class instance, a Proxy or a bag with getters, or that leaves extra own keys on it. @server and @client-core stated zero changes (their specs are literals built key by key from declared tables; server's body door already refuses undeclared keys); @cli builds its request body key by key. *How to migrate*: write each value you want as an own data member of the spec; keep anything the engine should not read off the spec (not on its prototype, not as an own key).
445
+ - **Reach — the budget spellings before `limits` (@server @cli).** The former top-level `maxCostUsd`, `maxTokens`, `budgetStreamCancel` and `degrade` were folded into `limits` (design/164) without a retired-key row, so since then a spec still carrying one at the top level ran with no such ceiling and no word. Each is an own key the engine does not read, so it is now refused at the run's start (`config.spec_unknown_key`, the key named in `detail.keys`): write `limits.maxCostUsd` / `limits.maxTokens` / `limits.budgetStreamCancel` / `limits.degrade`.
446
+ - **Known limits (stated).** A member's own contents are taken by reference (the roster's entries, a policy, a signal object): each has its own reader's snapshot, and changing one after the start is that reader's business. A member read by name but declared nowhere in the type (a value reached through `any`) is not on the table, so it is refused as unknown when it is an own key and not read otherwise. The engine's relay entrances that spread a spec before `runTask` (warm resume, goal, verify, workflow) still take the caller's object their own way — #3060.
447
+ - **Pins.** `test/backlog3059-taskspec-read-once.test.ts` (real Runner: an inherited / non-enumerable / Proxy-answered / getter `permissionMode` on the plain, agents-rebind and model-gate paths reads as the own member; an inherited / Proxy `appendSystemPrompt` on the plan path; `autoModeRequested` and `hooks` through the prototype, a Proxy and a non-enumerable property refused on the plain, agents and model-gate paths; a getter `objective` screened and sent as one value, read once; a getter `sessionId` read once; a spec changed while its run waits for the session lock is not read, a reassigned roster refused; a throwing getter / Proxy trap, a throwing nested retired step, a thrown value with no string form and an unknown own key refused; the resume config read the same way, an unreadable config member refused before the store seat is read). `test/backlog1950-resume-config-doors-preclaim.test.ts` I: the closed set's two new words, each with its recipe through the screen as the verb composes it. Re-pinned to the one read (#3162): `test/design393-s6-run-leg-lanes.test.ts` WIRED (every lane holds the run's one snapshot by identity — frozen, the caller's members, answering its own read — not the caller's object; the walltime witness writes into the shared `limits` bag); `test/remote-suspend-resume-design80.test.ts` RB-22 (its fixture's top-level `maxCostUsd` had no reader: the ceiling is `limits.maxCostUsd`, the approve-resume's window declared exhausted, the approved call runs once and the run ends `failed` + `limits.max_cost_exceeded`; a top-level `maxCostUsd` is refused by name).
448
+
449
+ ### On macOS, `NodeExecutionEnv` can keep the byte floor at the OS: `readFloorConfinement: "os"` runs every start that carries a floor under `sandbox-exec` with a profile translated from the same read-deny table, and the environment then declares `keepsReadFloor: true` (#3051, #2945 S1, design/3035-2945 K2–K7, ruled C-R992; behavior change only where the option is set; hard-breaking: `ReadFloor.confinement(dialect)` is a required member, three sentences below, open to veto; closed sets: `ENGINE_NOTICE_CODES` +1 `config.read_floor_confinement_unavailable` (operator, engine); exports: +1 root value `confineShellStart`) (@server @cli @client-core)
450
+
451
+ - **Before.** `NodeExecutionEnv` declared `keepsReadFloor: false` with no way to say otherwise: on the local lane a recursive read under the root carried a deny row's bytes into the conversation (KL-r2-a), and the run was only announced (`config.read_deny_floor_unkept`) or refused at prepare (`readDenyFloorRequired`).
452
+ - **Now.** `new NodeExecutionEnv({ …, readFloorConfinement: "os" })` probes once, at construction, whether the seatbelt base applies on this host (`/usr/bin/sandbox-exec -p <base> /usr/bin/true`). When it does, the environment declares `keepsReadFloor: true` and every `exec` / `spawnBackground` that carries `readFloor` runs as `/usr/bin/sandbox-exec -p <profile> <shell> <args…>`, so every process the command starts inherits the profile. The profile is `ReadFloor.confinement("seatbelt")`, translated from the table `denies` judges with — the built-in tiers' segment rows (ASCII case folded, every spelling the table's NFC reading takes for the same name — a composed character's two, the Kelvin sign for `K` — the win32 reading's trailing dots and spaces, and a backslash as a separator wherever the table splits on one), the deployment's, the task's and the home's placed rows at every anchor they were placed at, and a person's `Read(...)` deny rules (their exact bytes, `**` spanning segments, a rule whose base leads elsewhere met where it leads). On a deny-default base (the reference's process, mach-service, sysctl, IPC and device rules; network allowed) it allows every read except the table's expressions — directory metadata stays readable — and every write except creating or unlinking a denied path or any ancestor of where a row is met, so no rename, hard link or copy carries a denied file out. A row the dialect cannot express (a control character, a composed character with more than one mark or one some single code point is equivalent to, a marked character beside a `*` — the marks a wildcard meets can reorder into it — an expression over the 900 bytes the dialect reads, a table or rule row the engine did not compile) refuses that start — `spawn_error` in the foreground, `spawn_failed` in the background, the sentence naming the row — and so do a table that cannot judge at that start (a partition of a person's persisted rules unread, tables still compiling — `denies` refuses every path then) and a profile the host's launcher rejects; the command never runs unconfined. On any other platform, or when the probe does not apply (a host already inside a sandbox), the environment declares `false` and says why once on `onNotice` (`config.read_floor_confinement_unavailable`, `detail: { reason }`); the run's own judgment (`config.read_deny_floor_unkept`, or the prepare refusal) follows unchanged. Any value other than `"os"` or absent throws at construction. Absent = the environment as before.
453
+ - **What a confined command meets.** A program that reads a denied file fails the way a permission error fails (`grep -r` under the root skips it, `cat` of it exits 1) — and so does a credential command whose own files the default tiers deny (`ssh` reading `~/.ssh`, `gh` reading `~/.config/gh`): that is the table doing its job, not a defect. Creating or removing a directory a row passes through (`mkdir ~/.config` where it is absent) is refused too.
454
+ - **Honest scope.** The floor governs the processes the command itself starts. Work it hands to a service already running outside the sandbox — a container daemon over its socket, a local server over TCP — is that service's, as on any host (KNOWN-LIMITS KL-3051-b). Linux and Windows hosts declare `false` in this release (KL-3051-a). A segment the win32 reading drops (`. `, a `.. ` that pops) is not modeled for a placed row: such a path names another file on a macOS disk than the row's, and the profile does not refuse it although `denies` does (KL-3051-c). A `Read(...)` deny rule with a `*` or `**` between its base and its last segment holds its base, its ancestors and every path it matches in place, but not the directories its wildcards pass through: `Read(.env)` reaches `<cwd>/**/.env`, so `mv deep /tmp/x` runs and `/tmp/x/dir/.env` is then outside the rule's reach — as `denies` says too. A bare name reads at any depth, so `Read(./secrets/**)` (`<cwd>/**/secrets/**`) is the same shape; a rule whose head is a whole path (`./a/secrets/**`, `/abs/x/**`, `~/vault/**`) and the segment rows hold every part (holding every directory a wildcard passes would refuse removing or renaming any directory of the project; KL-3051-d, the reference's form).
455
+ - **Hard-breaking, open to veto — `ReadFloor.confinement` is required (@server @cli @client-core).** *What changed:* `ReadFloor` gains the required member `confinement(dialect: "seatbelt"): { ok: true; profile: string } | { ok: false; row: string; reason: string }`, the floor's own translation into the dialect, of the table `denies` judges with at that ask (kept while that table's compiled rows are unchanged). *Who is hurt:* a host that builds a `ReadFloor` by hand (a test double, a wrapper) — it no longer type-checks until it has the member; server's adapters, the CLI and client-core build none (Consumers, below), so the harm falls on an embedder's own floors. *Why it is required:* an environment that keeps the floor at the OS needs the table as a profile, and a profile built anywhere but from the compiled table would be a second reading of it that can refuse less (`rows` are the strings refusals cite: they have lost the home anchor and a rule's base). *Migration:* a floor the engine hands you already has it; a hand-built `ReadFloor` (a test double, a wrapper) adds `confinement: () => ({ ok: false, row: "", reason: "…" })` — an environment that keeps the floor then refuses the start, which is the contract.
456
+ - **Consumers.** @server: none of the seven adapters builds a `ReadFloor` (grep of `int-7139`), so nothing breaks there; a host lane that spawns on the engine's macOS host can wrap its starts with `confineShellStart` (root export) and declare `keepsReadFloor: true` — the sandboxed lanes keep the floor their own way (S-2218). @cli / @client-core: no `ReadFloor` is built in either repo; `ENGINE_NOTICE_CODES` +1 (audience `operator`) — a table that pins the code set adds the row; a shell that wants the local lane confined passes `readFloorConfinement: "os"`.
457
+ - **Deviations from the reference (registered as candidates).** `read-floor-confinement-macos-only` — ours: macOS only, other platforms declare `false`; the reference also confines on Linux (bubblewrap). `read-floor-confinement-no-model-escape` — ours: the model has no per-command way out of the confinement; the reference's Bash tool can be asked to run a command unsandboxed. `read-floor-confinement-reads-only` — ours: the profile floors reads and holds denied paths in place, and allows every other write; the reference's sandbox also restricts writes to its allowed directories.
458
+ - **Exports.** +1 root value `confineShellStart(start, floor)` — the pure wrapping any environment that spawns on the engine's host takes: no floor ⇒ the start as it is; a floor ⇒ the `sandbox-exec` start and its profile; a row the profile cannot express ⇒ that row and why. Members: `ReadFloor.confinement` (required, above), `NodeExecutionEnv` option `readFloorConfinement?: "os"`.
459
+ - **Pins.** `test/backlog3051-os-confinement.test.ts` (T2 a corpus of home, rooted, project and rule paths: a profile expression meets each path exactly when `denies` refuses it, a case twin and a trailing-dot twin are met, a rule row whose base leads elsewhere is met where it leads, a row the dialect cannot express answers that row, a hand-built table has none; T4 a platform with no confinement: `false`, one notice, the run's judgment code; no request: silent; an unreadable request throws; T6 no floor: the start as it is, the root export is the same function; on macOS with the real launcher — T1 a confined `grep -r` and every direct read meet no denied byte while the ordinary file reads, unconfined they do, the declared home not the process's; T2n the native verdict equals `denies` path by path, a row longer than the dialect refuses at translation; T3 the background start, `rg`, a `git` that follows `include.path` into a denied file; T5 a floor the profile cannot express or a profile that does not apply refuses the start and the command never runs; T7 a denied file, a denied directory, the middle segment of an unplaced row and the home's ancestor cannot be moved, linked or copied out; T8 the base is deny-default with the reference's mach list and no Apple Events). Twelve mutations, each red on at least one cell.
460
+ - **No floor, the start as it was.** A start that carries no `readFloor`, and every start of an environment without the option, spawns what 7.60.0 spawns: the same program and arguments (`<shell> <args…> <command>`), working directory, environment, stdio and process group. The handover pin of `test/backlog741-tool-progress.test.ts` now writes with shell builtins only, at most 2,000,000 lines under a 30-second exec timeout (#3151): it had paused with a forked `sleep` per line, so under a background-priority run (darwin `taskpolicy -b`) it wrote about one line per output poll and its precondition held about one run in two — on this branch and on 7.60.0 alike.
461
+
462
+ ### An input carries who wrote it, and `classic.UserPromptSubmit` screens by that word — only the operator's inputs are screened, carried across a pause and counted as the person's (#2941, #2943; design/2762 S1a + S1b, C-R963 Q1–Q6; behavior change; hard-breaking: three, three sentences each below, open to veto; closed sets: one new, `InputAuthor` (6 words); exports: +2 root values `INPUT_AUTHORS` / `isInputAuthor`, +1 root type `InputAuthor`; members: `RunInternals.operatorObjective` −1, `RunInternals.objectiveAuthor` +1, `runGoal` +1 optional parameter) (@server @client-core @cli @test)
463
+
464
+ - **Before.** Whether an input passed `classic.UserPromptSubmit` was a leg-level guess: a top-level leg's objective was screened, a delegated leg's was not unless the trusted boolean `RunInternals.operatorObjective` said an operator wrote it, and every live steer was screened. So inputs nobody typed were screened as a person's prompt: the observer leg's digest (a top-level leg), the observer's report into the observed child (it rode the public steer), a verification gate's verifier and fix legs, a repair loop's later attempts and a goal's later iterations (each a fresh top-level leg). A report the observed child had received but not yet read was parked across a durable pause and counted on the person's undelivered-input account (`task.user_steer_undrained`). `runGoal` dispatched every iteration with the literal `{ goalMode: true }`, so a goal run inside a delegated leg lost the delegation fact.
465
+ - **Now.** Every input carries one engine-minted word of `INPUT_AUTHORS` — `operator` / `parent_model` / `workflow` / `peer` / `observer` / `engine` — said once by the seat that mints it, carried with the input inside the process, never inherited. A public entry's objective with no word on the trusted channel is the operator's; the Agent tool says `parent_model` (`peer` on a recorded agent's revival); a workflow's agents say `workflow`; a retained child's resume states its own (`operator` through the steer handle, `peer` through SendMessage) and the retained snapshot keeps none; the observer pairing says `observer` for its leg and for the report; a recipe says `engine` on its continuation legs (verify's verifier / fix, repair's later attempts, goal's iterations after the first) and hands its caller's word to its first leg (run-spec's one leg included). One predicate reads the word: an input whose author is not one of the five non-operator words — the operator's, or a word that cannot be read — is screened, parked across a pause and counted as the person's; the rest are none of those. `TaskStream.steer` mints `operator` on every call; the engine relays an observer's report through a seat on the stream object the Runner minted, never on the package face. Lifecycle events stay the delegation fact's: a delegated leg still opens on `classic.SubagentStart` whoever wrote its objective (`legEventsOf` reads the delegation fact alone). `runGoal(runner, spec, internals?)` forwards the caller's trusted channel to every iteration — the first keeps the caller's author and the delegation fact, the later ones are `engine`. An author outside the set on `RunInternals.objectiveAuthor` reads `unknown`: the objective is screened as the operator's and the value is reported once (`onError`, phase `"config"`, classification `input-author-unreadable`). The boundary with `runOrigin`: `runOrigin` answers where a run came from (the host's declaration, attribution only), the author answers who wrote an input (the engine's mint) — only a public verb takes a `runOrigin`, so an input carrying one is the operator's.
466
+ - **Hard-breaking ① — the screen no longer sees observer text or a recipe's continuation, open to veto.** *What changed:* `classic.UserPromptSubmit` is no longer raised for the observer leg's digest, for an observer's report steered into the observed child, for a verification gate's verifier and fix legs, for a repair loop's attempts after the first, or for a goal's iterations after the first. *Who is hurt:* a deployment that screens, blocks or injects context into those internal turns through that event; a probe pinned on "an observer report is screened with `source: "steer"`". *Compensation:* there is no same-form seat: the person's request is still screened at the public entry and at every recipe's first leg; observer text is not screened in Claude Code either (it lives on the subagent lane); a recipe's later legs are the calling host's own composition, so the host is where they are governed. A model-facing seat that sees the author is a candidate ticket, opened when a consumer needs it.
467
+ - **Hard-breaking ② — `RunInternals.operatorObjective` is retired for `RunInternals.objectiveAuthor`, open to veto.** *What changed:* the root-exported `RunInternals` loses the boolean `operatorObjective` (no alias) and gains `objectiveAuthor?: InputAuthor`. *Who is hurt:* a host that builds its own internals and set `operatorObjective`. @server builds internals with `Pick<RunInternals, …>` of other members (`src/http/durable-run-leg.ts`, `src/http/resume-legs.ts`) and is not affected. *Compensation:* the compile error names the site; give the word — `operator` for a person's words, the delegator's word otherwise.
468
+ - **Hard-breaking ③ — an input another author wrote is not parked and not on the person's account, open to veto.** *What changed:* when a leg ends with an observer's report accepted but not yet delivered, the report is no longer parked on the checkpoint for the resumed leg, no longer counted in `task.user_steer_undrained` / `task.user_followup_undrained`, the `settled` frame's undrained counts or `hasPendingUserInput`; it is dropped and named once through `onError` (phase `"degraded"`, classification `undelivered-input-dropped`). *Who is hurt:* a deployment relying on a report received before a pause arriving after the resume, and a probe counting the person's undelivered account with observer reports in it. *Compensation:* none needed in the steady state — the observer reports the next segment again; the checkpoint store, the parked entry's fields (`PENDING_STEER_FROZEN_FIELDS`) and the replay facets are unchanged, so a mixed fleet reads every row as before.
469
+ - **Consumers.** @server: zero code change for ② (internals built from other members); a store's checkpoints are unchanged; the daemon's wake is the operator's. @client-core / @cli: the closed set is on the root face for rendering; the per-input projection (`human_input.author`) is the next step (#2942), not this one. @test: the black-box rows are a screen that lets through only the expected operator inputs while observer, verify and goal runs complete — the row counts screens and model calls per leg.
470
+ - **Pins.** `test/backlog2941-input-author.test.ts` (the closed set and the one predicate; A1 the operator's objective and every option spelling of a live steer are screened; A2 / A3 / A4 an Agent prompt, a workflow agent and a SendMessage resume are not, and each opens on `classic.SubagentStart`; A5 the observer leg's digest and its report are not, and the report reaches the running child; A6 verify / goal / repair continuation legs run unscreened while each recipe's first leg — run-spec's one leg included — is screened; G1 an operator-resumed child's grandchild is minted `parent_model`; C a durable park carries the operator's steer (screened once on redelivery, the objective not again) and not the observer's report, which is named once, and the live end the same; U1 an unreadable word; R1 `runOrigin`; #2943 a goal inside a delegated leg keeps the delegation fact and its author; H the harness seam). Re-pinned to the new reading: `test/backlog1500-subagent-prompt-hooks.test.ts` T1 (the lifecycle table has no screen column), `test/backlog246-internals-seam.test.ts` (a gate's later legs are always a copy carrying `objectiveAuthor: "engine"`), `test/harness-engine-injection-hold.test.ts` and `test/turn-interrupt-373.test.ts` (an authored relay frame states `author`).
471
+
472
+ ### A cascade rung that durably parks can be resumed and the ladder continues: the card records which rung of whose run it is, and `resumeCascade` continues it through `Runner.resume` and climbs the rest of the ladder (#3110, design/3087 S1, C-R1013 K1 (a′) / K2 (A) / K3 (A) / K4 / K6, addendum 1 K7; hard-breaking: 3; closed sets: +1 `CheckpointError` code `resume.composition_mismatch`, +1 `RequirementWord` `composition_leg`; exports: +1 function `resumeCascade`, +1 type `CompositionLeg`; members: `RunInternals.compositionLeg?`, `CheckpointState.compositionLeg?`, `TaskResult.placementRoot?`) (@server @cli @client-core @test)
473
+
474
+ - **Before.** A rung that parked on a durable gate ended the ladder `exhausted` with the pause on `failed.nestedPause`, and nothing could continue the ladder: a bare `runner.resume` of the card finished that one rung only — no gate, no escalation, no `cascadeOutcome` — and the card did not say which rung it was or which host run it belonged to (the rung runs in its own session, not the caller's). The rungs after the first were placed at the first rung's `sessionId`.
475
+ - **Now.** When the caller's spec names its session (`TaskSpec.sessionId`, which no rung runs in), every rung is handed `RunInternals.compositionLeg = { entry: "cascade", leg: <rung index>, hostSessionId }` and a rung that parks records it on its card (`CheckpointState.compositionLeg`), stamped and restored by the same pair as the card's placement root: the live value wins, an absent live value is restored from the card, a live value over a card that records none is its first record, and a live value that contradicts the card is refused before the claim (`resume.composition_mismatch`, the card stays pending). `resumeCascade(runner, token, outcome, spec, config, parkedLeg, internals?)` continues the parked rung through `runner.resume` on that rung's own model and overrides, gates its result like a fresh rung, escalates on a fail and re-parks with that rung's own card; the resumed rung occupies its slot (the escalation cap, the cost ceiling and the wall-clock budget never refuse or cut it), and the attempts, stats, escalations and budget cover this call only. A run now reports the placement fixed point its prepare resolved (`TaskResult.placementRoot`), and a composition places its later legs at the fixed point its first leg reports — for a resumed rung, the one its card recorded — so the rungs after a resumed one land where the ladder's work was placed, not at the resumed rung's own session nor at a delegation root (`rootSessionId`) the resume's internals carry. Children of a rung are never handed `compositionLeg`. A spec that names no session mints no composition leg (KL-3087-a).
476
+ - **Hard-breaking, open to veto.** ① *What*: a new refusal code `resume.composition_mismatch` — an explicit `internals.compositionLeg` on a resume that differs from the card's. *Who*: consumers that enumerate resume refusal codes (server error mapping, client-core projection, cli wording, test criteria). *Compensation*: add the word; a host that passes the card's own `compositionLeg` (or none) never triggers it. ② *What*: the contract is written down — a parked result's `sessionId` is the parked leg's session (= the card's `Checkpoint.sessionId`), which for a cascade rung is not the caller's session; the card's `compositionLeg.hostSessionId` is the host session the card belongs to. *Who*: a host that links a parked card to its run by "the card sits in the session I submitted" (server S-2614: the judge-session cell, the run-side readers, the steer park). *Compensation*: link card → run by the card's `compositionLeg.hostSessionId`, and run → card by "cards in the host session ∪ cards whose host is this session". ③ *What*: a row that records a composition leg carries the requirement word `composition_leg`, so a worker older than 7.61.0 refuses it (`version_newer`). *Who*: a mixed-version fleet in which a 7.61.0 worker parks a cascade rung for a named host session and an older worker resumes it. *Compensation*: finish the upgrade before such cards are resumed, or resume them on a 7.61.0 worker; rows without a composition leg are unchanged.
477
+ - **Who needs it.** A deployment that runs a cascade with a durable approval: before, an approved rung could finish but its answer was never gated and the rest of the ladder never ran — a host that landed that answer as the cascade's answer reported an ungated result.
478
+ - **Also changed (not breaking).** `runCascade` reads `spec.sessionId` as the composition's host session (it was dropped silently); every rung of a cascade with a host session is dispatched with a copy of the caller's internals carrying its leg (before, a later rung with nothing to gain on placement — a caller carrying its own fixed point, a first rung that reported no target — got the caller's object itself). The composition entries' later legs read the first leg's reported `placementRoot`, not its `sessionId` (equal for every top-level leg a 7.61.0 engine assembles), and land there: a later leg rides the caller's object itself only when that object already resolves to it (`placementRoot`, else `rootSessionId` — always so on a fresh entry). A resume handed a `rootSessionId` that differs from the card's recorded root now places the legs after the resumed one at the card's root; before, they landed at that `rootSessionId` (`resumeWithVerification` included). The resume's internals snapshot copies `compositionLeg`, so the card is stamped with the leg the resume compared even if the caller rewrites its object mid-resume. A first-leg result that reports none hands the later legs no fixed point — a result assembled by a runner that is not this engine's, by an older engine, or rebuilt without the key; for `verifyCompleted` that is a caller-held result read back from a store that does not keep `placementRoot`, whose verifier and fix legs are then placed at their own sessions instead of the implementation leg's (keep the key, or pass `RunInternals.placementRoot`).
479
+ - **Consumers.** @server S-2614: the cascade half of the nested-park judge depends on this (the resume leg's `cascade` arm calls `resumeCascade` with the original task body and the card's `compositionLeg`; `fwdInternals` keeps carrying observation seats only — the engine mints the leg itself from `spec.sessionId`; if it carries a `rootSessionId`, the rungs after the resumed one now land at the card's root rather than at that value — please confirm against your resume path); map `resume.composition_mismatch`; a `verifyCompleted` call handed a result from your own store needs the result's `placementRoot` kept (or `RunInternals.placementRoot` passed). @client-core: project the new code into the resume refusal set. @cli: a parked cascade rung, once decided, continues the ladder instead of ending at that rung; the mismatch refusal says both legs and how to retry. @test: criterion — a rung card resumed to the end does not flip the fixed point (the rungs after it are placed at rung 0's session).
480
+ - **Pins.** `test/backlog3110-cascade-park-seat.test.ts` (real Runner lanes: a rung-1 card records rung 0's fixed point and its composition leg and word, and the paused result's `sessionId` is the card's; a bare re-park keeps the leg, and keeps it when the caller rewrites its leg object at the claim; a spec without a session mints none; `resumeCascade` passes on the parked rung's model, escalates a failing resumed rung to a rung placed at rung 0's session — also when the resume carries another `rootSessionId`, while a fresh caller carrying its own fixed point rides every rung by its own object (and a resumed verify gate places its verifier at the card's root the same way) — never refuses or cuts the resumed rung on a zero cap / ceiling / budget, refuses a contradicting leg pre-CAS on both doors and a non-cascade leg before any dispatch, and takes a live leg as the first record of a card — fresh or older — that records none; `TaskResult.placementRoot` on top-level, placed and resumed legs; a delegated child of a rung is handed no leg), `test/backlog246-internals-seam.test.ts` (the forward shape), `test/backlog1320-reader-requirements.test.ts` (the maximal row carries the new word).
481
+
482
+ ### A verification gate's or a repair loop's later legs run on what the task's ceilings left: the task's `limits` (or, on a task that can suspend, its `resourceSuspend` totals) bound the whole task, not each leg of it (#3170; behavior narrowing, open to veto; hard-breaking: yes, three sentences below, open to veto; closed sets: none; exports: none; members: +1 `VerificationOutcome.allowanceExhausted?` (also on `RepairResult.verification`)) (@server @test)
483
+
484
+ - **Before.** Every fix leg of `runWithVerification` / `resumeWithVerification` / `verifyCompleted`, and every attempt after the first of `runRepairLoop` (the clean restart included), was a fresh `runTask` on the caller's spec, so each got the caller's full `limits.maxCostUsd` / `maxTokens` / `maxTurns` window — and, on a task with `resourceSuspend`, the full `totalBudgetUsd` / `totalTokens` again, since a fresh leg seeds its ledger from the spec. A task with a $1 ceiling and three rounds could spend $4 on its implementation side, and the whole-task totals that a resume can never refresh were refreshed by every fix leg.
485
+ - **Now.** One rule for both compositions (`src/agents/composition-allowance.ts`): a later leg is dispatched with the task's whole-task ceilings less what the legs before it in this call spent — their own reported spend, the figure each leg's own limit gate read. The whole-task ceilings are `resourceSuspend.totalBudgetUsd` / `totalTokens` on a task that set `resourceSuspend` (its `limits` windows still pace each slice, and every leg opens one, as a resume does), and `limits.maxCostUsd` / `maxTokens` / `maxTurns` otherwise. A leg with something left runs on it and the engine judges it as any run (`limits.max_cost_exceeded` / `max_tokens_exceeded` / `max_turns_exceeded` when it crosses); an axis with nothing left dispatches no further leg — the loop stops at the exit its cost ceiling uses (the gate returns the current FAIL and its findings; the repair loop gives up, and the clean restart is not granted) and says so on `verification.allowanceExhausted = { axis: "cost" | "tokens" | "turns", remaining }` (`remaining` in micro-USD, tokens or turns: `0`; absent when the spend cannot be known — a leg ran unpriced under a cost ceiling, which is not read as room). The verifier's and the oracle's spend are not on this account (they stay on `verifierCost` / `oracleCostMicroUsd` and are bounded by `costCeilingMicroUsd`); `maxWalltimeMs` stays per leg (the loop's clock is `totalTimeoutMs`); nothing armed ⇒ the later leg's spec is the caller's own, as before.
486
+ - **Hard-breaking, open to veto.** *What*: `limits` (or `resourceSuspend.total*`) on a task handed to the verification gate or the repair loop now bound the task's implementation side as a whole; a later leg gets only the remainder, and none at all when an axis is spent. *Who*: a host that sized `limits` per leg and expects every fix round its own window; @server — the verify path's contract pin reads the composition total (the leg that crosses the remainder fails `limits.max_cost_exceeded`; a leg that would start on nothing is not dispatched, and the result says `verification.allowanceExhausted.axis`), and the MIGRATION limitation sentence about per-leg totals can be withdrawn; @test — the criterion. *Compensation*: set the ceiling for the whole task (add up what the rounds may spend), or bound the loop with `costCeilingMicroUsd` / `maxRounds` / `maxAttempts` as before.
487
+ - **Not changed.** `runGoal` keeps its per-iteration allowance (an exhausted iteration is re-prompted; the goal's own total is `budgetTokens`) and `runCascade` its per-rung allowance (`overrides.limits`; a resumed ladder's accounting covers that call) — KL-3170-a / KL-3170-b. The account covers one call: after a durable pause, the legs after the resumed one count the resumed leg's own report (for a resource-suspended leg, its whole chain), not what the parking call's other legs spent; and the ceilings it cuts from are the ones the resume call hands in — a resume that leaves the `resourceSuspend` totals out (they are frozen on the checkpoint's ledger after the first slice) gives the later legs no whole-task ceiling, and one that raises them gives the later legs the raised figure while the resumed leg itself runs on the frozen one (KL-3170-c, a transition that #3176 closes).
488
+ - **Pins.** `test/backlog3170-composition-allowance.test.ts` (real Runner lanes: two legs each under a cost ceiling and over it together ⇒ the fix leg runs on the remainder and fails `limits.max_cost_exceeded`, control a ceiling covering both; an implementation leg that spent the ceiling ⇒ no fix leg, `allowanceExhausted: { axis: "cost", remaining: 0 }`; the token and turn axes each one cell, a result handed in at its turn ceiling ⇒ no fix leg; `resourceSuspend` totals cut while the slice window rides unchanged; a resource-parked leg resumed through `resumeWithVerification` is counted once; the repair loop's attempt 2, its clean restart and its spent-ceiling give-up; the one reading's attribution order, unpriced spend, the `maxTurns: 0` sentinel and an unevaluable total).
489
+
490
+ ### The Read refusal for an over-cap image names the right cause when the deployment turned the image processor off: it no longer tells the model to install sharp (#3131; behavior change: the wording of one refusal sentence; hard-breaking: none; closed sets: none; exports: none) (@server @test)
491
+
492
+ - **Before.** The Read tool's refusal for an image over the no-processor caps always ended `Install the optional "sharp" dependency …` — also when the deployment had set `RunnerDeps.imageProcessor: false` (sharp installed or not). The model was told to fix something no caller of its can change, and the cause the sentence named was not the cause.
493
+ - **Now.** One function (`noProcessorImageCapHint`) picks that sentence from the processor seat's three states: `false` ⇒ `This deployment turned the image processor off: images are not downsampled and are read only up to 3932160 bytes — shrink the image first, e.g. with an image tool run in the shell.`; absent with sharp not resolved ⇒ the install sentence, unchanged; a processor in the seat ⇒ neither, as before. Both Read refusals that carried the sentence take it — the over-cap one and the one for an image whose stated edge is over the reject edge.
494
+ - **Pins.** `test/backlog3131-image-processor-off-hint.test.ts` (each seat state on both refusals, with sharp held unresolved for the absent state; the chooser), and the `A4-2` cell of `test/read-image-pipeline.test.ts` now reads the `false` state.
495
+
496
+ ### A registration name has one form and the person's card quotes it: registration names outside `^[A-Za-z0-9._:-]{1,64}$` are refused at registration (#3133; behavior narrowing, open to veto; hard-breaking: none — every production name is inside the form; closed sets: none; exports: none) (@server @cli @test)
497
+
498
+ - **Before.** A registration's name had no form (the kernel's screen checked only that it was a non-empty string, not the engine's own word, and unique), and the person's card put it between quotes as it came — `extension "<name>"` — cut and one-lined but not escaped. A mod could name itself `evil" ) approved by extension "trusted" (` and rewrite the card's sentence about who asked or who allowed.
499
+ - **Now.** One rule at the entrance, and the sentence quotes what the rule lets through. `screenOne` refuses a name outside 1–64 of letters, digits, `.`, `_`, `:` and `-` (the colon is the separator of the documented `skill:<name>` spelling; it has no position rule) with `config.mods_invalid` — the screen's own code — naming the form and the value's length, never the value. The card's two sentences about an extension (the question `asked by …` and the allow `… allowed this call`, and the denial that reads the same speaker) mint the name once (`extensionNamed`) as a JSON string, so a name that did not pass this screen cannot end its quotes and run on. The name is judged on the one read the screen keeps — an accessor that answers a string and then an object is refused. For a registered name the text is byte-for-byte what it was. The extension's own reason still follows after a colon, one line, as before.
500
+ - **Who needs it / who is affected / compensation (open to veto).** *Needs it:* a person reading `extension "<name>"` on a card. *Affected:* a host or a mod package whose registration name carries a space, a slash, a quote, a bracket, a non-ASCII letter or more than 64 characters — it is now refused at the first run that mounts it; the names the server registers (`server.brand-identity`, `server.permission-denied-meter`, `server.tool-trace`, `settings.hooks`) are inside the form, and a scan of the registrations in sema-server, sema-cli and sema-test found none outside it. *Compensation:* rename the registration (a package: `name` in `plugin.json`).
501
+ - **Pins.** `test/backlog3133-extension-name-form.test.ts` (ten hostile names refused with the code, the length and not the value; an accessor name read twice; the 64 / 65 edge; the production names and the `skill:<name>` spelling taken, a leading or trailing colon too; the question, the allow and the denial through the real gate read as before for a registered name, and a name that closes its own quotes stays one quoted word); `test/backlog1406-extension-clear-one-reading.test.ts` X13 is restated with in-form names (a 64-character cap makes the 80-character cut unreachable for a registered name).
502
+
503
+ ### A Bash cut that the environment reported no output for no longer says the command wrote nothing: "no output was produced" is claimed only when the environment stated an empty capture (#3094; behavior change: the wording of one cut sentence; hard-breaking: none; closed sets: none; exports: none) (@server @test)
504
+
505
+ - **Before.** For a command cut by its timeout, a silence window, an abort or a failed output callback, the Bash tool read the environment's `partialStdout` and `partialStderr` with `?? ""` and so wrote `(no output was produced before the cutoff …)` both when the environment captured nothing and when it attached nothing at all — an adapter that does not carry a remote command's partial output across made the model read "the command wrote nothing" over output the person could see on screen.
506
+ - **Now.** Both members present and empty ⇒ the sentence as before, with its stall hint. Either member absent ⇒ `(the execution environment attached no partial output for this cutoff, so whether the command wrote anything before it is not known)`, without the stall hint (the silence cut's headline still names its own window, which the environment did state). Captured bytes, the `isError` posture for a cut with no data, and the structured details are unchanged. The contract is written down: `partialStdout` / `partialStderr` are strings when captured — empty or not — and absent when not captured or not said (`INTEGRATION-CORE.md`, the `ExecutionError` row; the `ExecutionError` JSDoc).
507
+ - **Consumers.** @server: the remote adapter that builds `ExecutionError` can attach the partial output it has (the fourth constructor argument); until it does the model reads the not-known sentence instead of a false one. An adapter that knows the capture was empty passes `""`. @test: a cell that asserted the old sentence over an environment attaching nothing now reads the new one.
508
+ - **Pins.** `test/backlog3094-partial-output-states.test.ts` (each cut code with nothing attached, with both streams stated empty, with one stated; the silence cut's headline and hint; captured bytes; the `isError` posture and the details equal in both states); `test/rb377-bash-zero-output-cut-iserror.test.ts` and `test/backlog1795-liveness-no-output.test.ts` now state the empty capture where they mean "captured nothing".
509
+
510
+ ### `writeFileExclusive` runs to its end once its open has begun, so `aborted` again means no file was created (#3129; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
511
+
512
+ - **Before.** `NodeExecutionEnv.writeFileExclusive` handed the caller's signal to the `wx` write: an abort landing mid-write answered `aborted` over a new file holding only a prefix of the content — against the documented meaning, "`aborted` means it was never touched", and the same hole #3107 closed on the in-place legs of `writeFile`.
513
+ - **Now.** The signal is judged before the first byte (at entry and after the parent directory is made) and not given to the write: an abort that landed earlier answers `aborted` with nothing created; a write whose exclusive open has begun runs to its end and answers `ok` or its own error. One rule — `aborted` ⇒ untouched — as in `writeFile`. Claude Code 2.1.309's exclusive create (`writeExclusive`, `cli309.js:253020`) is a plain `wx` write with no signal and no staging, so this is its form.
514
+ - **Who needs it / who is affected / compensation (open to veto).** *Needs it:* every caller that reads `aborted` as "nothing was written". *Affected:* a caller that cancels a large exclusive create (the Edit-create lane among them): the write now completes instead of stopping half-way. *Compensation:* a caller that must be able to stop the write cancels before the call. @server: an adapter's own `writeFileExclusive` that cancels a transfer already begun should answer the same way — `aborted` only over no file.
515
+ - **Pins.** `test/backlog3129-exclusive-write-abort.test.ts` (an abort that lands once the file exists leaves the whole content, or no file under `aborted`; an already-aborted signal creates nothing; a fresh create and an existing target as controls).
516
+
517
+ ### `@sema-agent/core-stores-sql` is built over one driver: the backend takes `driver` / `retention` / `transactionHooks` / `fileHistory`, the driver carries the engine's facts and the one fail-open sink, and a deployment's own ensure starts with `assertCoreSchemaReady` (#3147, design 3114 S1, C-R1015 D-1–D-6 with the D-5 condition; the public face and its option reads only — both factories still refuse; hard-breaking: the backend's options, three sentences below; closed sets: new `SQL_FAIL_OPEN_TAGS` (3 tags), `SqlSweepLeg` (4 legs), `SqlTransactionHooks` (2 groups, 5 hooks); exports (package `@sema-agent/core-stores-sql`): −1 type `RetentionCascadeHooks`, +1 function `assertCoreSchemaReady`, +3 values `SQL_FAIL_OPEN_TAGS` / `SQL_ENSURE_LOCK` / `SQL_SCHEMA_VERSION_TABLE`, +12 types; root `@sema-agent/core`: none) (@server @cli @client-core @test)
518
+
519
+ - **Before.** `createSqlStorageBackend` took `dialect`, `pool`, `retention`, `retentionCascade { liveReferences, beforeDelete }` and an `onFailOpen(tag: string, detail)`; `createSqlDriver` took `dialect` and `pool`; `SqlDriver` and `SqlTxConn` carried no facts; `ensureSchema()` answered nothing.
520
+ - **Now.** One pool, one driver: `createSqlDriver({ dialect, pool, onFailOpen? })` is the one place a connection's initialization and the engine's facts live (`SqlDriver.facts`, `SqlTxConn.facts`: engine, version, isolation, TiDB's transaction mode, the row and packet walls and where each number came from) and the one fail-open sink every read of the package reports through, its tag one word of `SQL_FAIL_OPEN_TAGS` (`core-stores-sql.<driver | seat>.<what>`; this version's three are the driver's). `createSqlStorageBackend({ driver, retention, transactionHooks?, fileHistory? })` takes only a driver `createSqlDriver` made — an object of the same shape is refused by name — and reads the driver last, so every other wrong value is named first; since no driver can be made in this version, every call ends at that read. `transactionHooks` is one closed table: `retention { holdLock, liveReferences, beforeDelete, audit }` (the hold answers `"proceed"` / `"held"`; `audit` writes the deployment's audit row in the deleting transaction from the call's receipt) and `session { beforeCommit }` (an import, an owner delete or a retention delete of a session tree's root, answered `"proceed"` or `{ refuse }`); every hook gets the transaction's statement face only (`SqlStatementFace`). `fileHistory.blobs` is a byte port (`SqlBlobBytesPort`: `put` / `get` / `delete`, optional `list`) under keys the backend mints per publication (`SqlBlobKey`); whether a blob is there is the backend's index alone. `SqlStorageBackend.ensureSchema()` answers a `SqlSchemaReport` (tables and indexes created, migrations applied) and runs under the package's own lock (`SQL_ENSURE_LOCK`) with its own version table (`SQL_SCHEMA_VERSION_TABLE`); `SqlStorageBackend.sweep({ nowMs })` is the age and orphan sweeps in one call (`SqlSweepReceipt`, one count per `SqlSweepLeg`). The managed-retention contract's audited clause says where the audit row of a split backend is written (the `audit` hook).
521
+ - **Hard-breaking — the backend's options.** *What changed:* `SqlStorageBackendOptions` loses `dialect`, `pool`, `retentionCascade` and `onFailOpen` and gains a required `driver: SqlDriver` and the optional `transactionHooks` / `fileHistory`; the type `RetentionCascadeHooks` is gone; `createSqlDriver` takes an optional `onFailOpen`; `SqlDriver` and `SqlTxConn` each gain a read-only `facts`; `ensureSchema()` answers a `SqlSchemaReport` instead of nothing. *Who is affected:* a caller that wrote the backend's options as a literal against the earlier face — it no longer compiles, and an untyped one is refused naming the retired key and the options there are. Both factories have refused every call since the package was first published, and the server, cli, client-core and test trees import nothing from the package. *What to do:* `createSqlStorageBackend({ driver: createSqlDriver({ dialect, pool, onFailOpen }), retention, transactionHooks: { retention: { liveReferences, beforeDelete } } })` — `retentionCascade`'s two hooks move unchanged into `transactionHooks.retention`.
522
+ - **Beyond the design (one export).** `assertCoreSchemaReady(face, dialect)` is the check the D-5 condition asked for: it reads only the package's version table, refuses when it is missing (or when a migration this version registers has not run), naming the call order — the backend's `ensureSchema()` first, the deployment's own ensure after it — and refuses when the question cannot be asked; it writes nothing. @server: the first statement of your own ensure, so a deployment table that references a core table is never created before it.
523
+ - **Consumers.** @server: the re-homing car reads this face (the driver once, the hooks table in place of `retentionCascade`, the tags renamed into the package's namespace as the stores move); your own ensure lock keeps its keys — the package's are different (`SQL_ENSURE_LOCK`). @cli @client-core @test: no reader.
524
+ - **Pins.** `test/backlog3147-stores-sql-face.test.ts` (the facts and the sink's tag types; the tag set; the option and hook-table types; the ensure lock against the server's keys; the migration registry's read; the order check on both dialects — refused before core's ensure, passing after — its probe answers, its failure as a refusal, its missing-migration arm; the blob index's five compare-and-set moves); `test/backlog1468-n1-core-stores-sql.test.ts` re-pinned (the face, the option reads with the driver last, the four retired keys, the driver's sink option); `test/backlog1468-n1-version-lane.test.ts`; the package's export snapshot (14 → 29) and smoke table.
525
+ - **Known limits.** Both factories refuse (the stores and the driver arrive with the stage-three move, #3118): the backend's "carries no SQL stores" refusal is reached only once a driver can be made. No version creates the version table yet, so `assertCoreSchemaReady` refuses on every database until the backend's `ensureSchema()` exists.
526
+
527
+ ### Four writes a SQL deployment made on core's seats outside the contract each get one reading: the File journal store's per-run delete is retired, the mailbox's recipient lifecycle is one optional pair, offloaded tool results have one age bound every backend reads, and the file history's blob exchange is one optional member group that replaces the `syncBlobFaces` marker (#3148, design 3114 S2, C-R1015 W-1–W-4; hard-breaking: ① `FileWorkflowJournalStore.deleteByRun` removed, ② the tool-result kit's report type widens, three sentences each below; closed sets: none; exports: +2 root values `mailboxRecipientLifecycleOf` / `fileHistoryBlobExchangeOf`, +2 root types `MailboxRecipientTombstone` / `FileHistoryBlobExchange`; members: −1 `FileWorkflowJournalStore.deleteByRun`, +2 `MailboxStore.retireRecipient?` / `listRetiredRecipients?`, +1 `ToolResultStore.reap?`, +1 `FileToolResultStore.reap`, +1 `FileHistoryStore.blobExchange?`; kits: `MailboxTombstonedRecipientContractHooks.tombstone` optional and +1 optional `onOptionalMember`, `fileHistoryStoreContract` +1 optional parameter `onOptionalMember`, `toolResultStoreContract`'s report +1 member word `reap`; retirement table +1 row `RL-3148-sync-blob-faces`) (@server)
528
+
529
+ - **Before.** `FileWorkflowJournalStore` carried a public `deleteByRun(runId)` the `WorkflowJournalStore` contract never had and nothing in core or in the server called. A deployment that retired a mailbox recipient wrote the tombstone `append` refuses by through its own face, outside the `MailboxStore` contract. The age bound on offloaded tool results was a deployment probe (`reapOlderThan?`) on its own SQL store, and the File store had none. Whether a file history store could exchange blobs was a deployment marker (`syncBlobFaces: true`) plus two functions on the store.
530
+ - **Now.** W-1: the File journal store writes and reads ledgers only. W-2: `MailboxStore.retireRecipient?(scope, handle, at, label?)` writes the tombstone `append` already refuses by — it marks only (parked messages, their seqs and a live lease are untouched), a repeat updates its time and label, `drop` removes it with the box, `false` = no tombstone was written — and `listRetiredRecipients?(scope, handlePrefix)` lists them; the two are one capability, read through `mailboxRecipientLifecycleOf(store)`, which answers `undefined` for neither, both bound for both, and refuses half (`config.invalid_argument`, naming the missing member). The tombstone kit retires through the pair when the store carries it and then refuses a `tombstone` hook (two ways to write one state); it reports the pair `verified` or `absent` through `onOptionalMember`, and builds no store before its cases are registered. W-3: `ToolResultStore.reap?(now, { maxAgeMs? })` is the one age bound: no bound removes nothing (the default keeps every entry), a bound that cannot be evaluated — or a `now` that is not a finite number — is refused before anything is removed (`config.retention_policy_invalid`), age alone decides (ownership is not consulted), and it answers how many entries it removed. `FileToolResultStore.reap` implements it over its content files' modification times, in both namespaces and only over names the store writes (an `operator notes.txt` in its directory is not an entry), removing the owner record with its content; the bound is read once. W-4: `FileHistoryStore.blobExchange?` = `{ put(hash, bytes), get(hash), has(hashes) }`, all three or none, read through `fileHistoryBlobExchangeOf(store)`; `put` checks the content address itself and refuses bytes that do not hash to it (`adopt_failed`, `permanence: "terminal"`), storing nothing; `has` answers from the store's index; a puller hands `get` to `importHistory` as its source. A store that still carries the `syncBlobFaces` marker is refused by the judge, by name (retirement row `RL-3148-sync-blob-faces`, retire by 7.63.0). No bundled store carries the pair or the group; the bundled stores report them absent.
531
+ - **Hard-breaking ① — `FileWorkflowJournalStore.deleteByRun` removed.** *What changed:* the File journal store's public per-run delete is gone; the `WorkflowJournalStore` contract is unchanged (it never had the member). *Who is affected:* a host that called it on the File store directly — there is no production caller in core or in the server; the server's one call is a test (`test/file-workflow-journal-store.test.ts`, the case "deleteByRun unlinks the ledger"), which no longer compiles. *What to do:* drop the call; ledgers are removed by the backend's age sweep, `SqlStorageBackend.sweep({ nowMs })`'s `workflow-journal-expired` leg.
532
+ - **Hard-breaking ② (types only) — the tool-result kit's report.** *What changed:* `toolResultStoreContract`'s `onOptionalMember` report names one more member, `"reap"`. *Who is affected:* a caller whose callback's parameter is typed with the earlier two words only (`"deleteBySession" | "listBySession"`) — it no longer type-checks; a callback typed from the kit's own signature, or untyped, is unaffected, and no tree that consumes core types one. *What to do:* type the callback's parameter from the kit (`Parameters<NonNullable<Parameters<typeof toolResultStoreContract>[2]>>[0]`) or add `"reap"` to the union.
533
+ - **Beyond the design (four exports).** The two judges and the two types they answer with: `mailboxRecipientLifecycleOf` / `MailboxRecipientTombstone`, `fileHistoryBlobExchangeOf` / `FileHistoryBlobExchange` — one judge per group, so a store with half a group is refused the same way wherever it is read.
534
+ - **Consumers.** @server: W-1 — drop the one test case above; W-2 — your recipient-lifecycle face becomes the store's `retireRecipient` / `listRetiredRecipients`, read through `mailboxRecipientLifecycleOf`, and the session delete's tombstone is a `retireRecipient` call; W-3 — the tool-result TTL reads `reap(now, { maxAgeMs: toolResultTtlSec * 1000 })` in place of the `reapOlderThan?` probe (your SQL store implements `reap`; the bound and its default stay yours); W-4 — your SQL file history store's `putBlob` / `getBlob` / `hasBlobs` become its `blobExchange` group and the `syncBlobFaces` marker goes (the judge refuses a store that still carries it, so the marker and the judge cannot meet in one tree), and the route's sha256 check moves into `put`. These move with the stage-three reader car (#3118).
535
+ - **Pins.** `test/backlog3148-write-faces.test.ts` (W-1 at the type and at run time; the pair's judge — bundled stores absent, half / garbage / throwing members refused, bound and frozen; the tombstone kit on a reference store carrying the pair, its group case refusing pair + hook, no writer, half; five broken twins each caught by its axis case; the tool-result kit on the File store — `reap` verified — and the in-memory store — absent; four broken reap twins; File's age by content mtime in both namespaces, foreign names left alone, its orphan owner records, its coded refusals, the bound read once; the tombstone kit building no store at collection and reporting the pair verified / absent; the blob exchange judge — the marker refused alone and beside a group, non-object / empty / half / garbage groups refused; the kit's case verified on a reference group and failing on four broken ones and a half group); `test/file-workflow-journal-store.test.ts` and `test/defectscan-store-class-fix-matrix.test.ts` 3.1 re-pinned to the retired method.
536
+ - **Known limits.** The File backend has no journal age sweep (it had no caller for the per-run delete either); its ledgers stay until the deployment removes them. Whether a store carries a group is read through the prototype chain like any member read (a class method is on the prototype).
537
+
538
+ ### A memory sync cursor is bound to which state of the center its baseline was taken against, not only to the center's address: a center rebuilt or restored behind the same address refuses the sync before either side writes (#3068, #3019 S1; ruled C-R1001 K1–K7; data loss of the #2968 form; divergence candidate D-3019-a — Claude Code 2.1.309 syncs with no center incarnation (a worker store's in-memory baseline per `memory_store_id`, `cli309.js:286617`; a team store's manifest bound to its `partitionId` address, `cli309.js:258732`, `cli309.js:260295`), open to veto; hard-breaking: ① `MemorySyncCursor.peerIncarnation`, ② the answer's `cursor.incarnation` and the refusal answer, ③ the sync route's version, three sentences each below, open to veto; closed sets: the cursor refusal's `detail.axis` +1 `incarnation`, its `detail` +1 member `want` on all four axes; exports: none; members: +1 `MemorySyncCursor.peerIncarnation`, +1 `MemorySyncRequestBody.peerIncarnation?`, +1 `MemorySyncResponseBody.cursor.incarnation`) (@server @client-core @test)
539
+
540
+ - **Before.** A cursor bound three names — the scope, the peer's address, the local store's path — and none of them says which state of the center answers. A center whose database was wiped and rebuilt at the same address, or restored from an older backup, read as the same peer: the next sync sent the old baseline, the center read each baselined id it lacks as deleted centrally and unchanged on the device (`serverDeletes`) and each older copy as a central change (`serverEntries`), and the client landed both — the device's entries deleted or rolled back, the call reporting `ok`. Reproduced against an in-process twin of the server's sync (P1 / P2 below).
541
+ - **Now.** One rule: a cursor binds each side by (address, incarnation); the address is judged by the sender before it sends, the incarnation by the holder of the state before it writes. The center answers every sync with the incarnation of the state that answered (`cursor.incarnation` — one value per scope partition, minted when the partition is born and stored with its entries); the returned cursor keeps it as `peerIncarnation`, and the next request carries it back as `peerIncarnation`. The center compares the claim with its own before any write; a claim that is not its own, or a non-empty baseline with no claim, is answered `{ refused: "baseline_incarnation", incarnation }` — a 2xx answer, so the transport contract (a non-2xx answer throws) is unchanged and the refusal is not read as a transport failure — and nothing is written. The engine raises it before any local write as `config.memory_sync_cursor_mismatch` with `detail: { axis: "incarnation", found: "other" | "absent", want: <the center's incarnation> }` and two ways out, both the host's: (1) re-bind — run against the state the baseline was taken against, or, only when the cursor carries no incarnation (it was written before cursors carried one) and this center holds that same state, set `peerIncarnation` to `want`; a cursor that carries another incarnation is never re-bound to this one; (2) drop the cursor, in the peer row's words. The answer is read against the rule the center states (`servesClaim`): a result under another incarnation than the claim, a result to a request with a non-empty baseline and no claim, a refusal of a request the rule serves, or a malformed refusal is a protocol error with zero local writes; a cursor's `peerIncarnation` that is not a non-empty, credential-free string is refused before any read or request. Every cursor refusal's `detail` carries `want`, this call's value on its axis (the scope, the transport's peer, the store's identity, the center's incarnation), shown as the refusal sentence shows it: a value that holds a credential (`carriesCredential` — a URL with userinfo, or anything the same-principal egress pass would redact) is the credentials mark alone, never a cleaned copy; no name is refused for it, so an ordinary name the wide egress matcher reads as credential-shaped (a dash-joined `sk-` slug) still syncs and only its `want` shows the mark. A refused call wrote nothing on either side, and the report's `refused` says so for that call alone: a continued layer whose last call is refused still carries what its earlier calls landed. The sync posts to `/v2/memory/sync/:scope`.
542
+ - **Hard-breaking ①, open to veto.** *What changed*: `MemorySyncCursor.peerIncarnation` is a required member of every cursor the engine returns, and a request carries it whenever the cursor does. *Who is hurt*: @server — the local executor's cursor reader (`src/memory-sync-client.ts` `cursorOf`, which picks members by name) drops it, so every sync after the first would be refused `absent`; it must carry the member verbatim, the whole-cursor shape check (S-2540 §2.7) must hand a cursor without it to the engine (the engine refuses it; it is not a bad file), and the arm that drops the cursor on `config.memory_sync_cursor_mismatch` and re-runs must go, or every refusal becomes a silent re-convergence; @client-core — CC-1052's per-axis `why` map gains the `incarnation` row; @test — center twins answer with an incarnation. *Compensation*: a cursor written by 7.60.0 or earlier carries no incarnation; with a baseline it is refused `absent` with the center's incarnation as `want` — an operator who confirms the center is the one the cursors were taken against sets `peerIncarnation` to `want` (one confirmation step with the legacy-cursor one, C-R990 D-4), otherwise drops them.
543
+ - **Hard-breaking ②, open to veto.** *What changed*: an answer's `cursor.incarnation` is required (absent ⇒ protocol error) and equals the request's claim when one was made; a center that refuses answers `{ refused: "baseline_incarnation", incarnation }`. *Who is hurt*: @server — the central sync (`src/memory-sync.ts` `performMemorySync`) mints, stores and returns one incarnation per scope partition, under two contract sentences: (i) no other partition or state carries the same value, (ii) the comparison, the reconcile read and every write of the sync sit in one fence (a reset between the comparison and the writes would still delete by the old baseline); a restore from backup needs an incarnation rotation step; @test — the criterion. *Compensation*: until the center answers with an incarnation every sync against it fails before anything is written.
544
+ - **Hard-breaking ③, open to veto.** *What changed*: the sync route is `/v2/memory/sync/:scope` (it was `/v1/…`); the engine mints the path in one place (`memorySyncPath`), and the path literal is the server's to name — a different name changes that one function. *Who is hurt*: @server — the central route serves the new path only: an old center keeps answering `/v1` and so answers a new client 404, a new center answers an old client 404; @test. *Compensation*: both pairings fail before anything is written; sync pauses until both sides have the new version.
545
+ - **Not changed / known limits.** The holder of the state is the judge: the engine never mints, derives or compares an incarnation. A center restored from a backup without rotating its incarnation, or a replica of the same database, reads as the same state, and the device's newer entries are deleted or rolled back as before (KL-3019-a). Way out (2) is safe only once the center adds an entry it holds no baseline for only if it is absent (a server ticket); until then two devices dropping their cursors at once can have one silently overwrite the other's version of the same entry (KL-3019-a). The address judge's trust in `transport.peer` narrows: a sync that carries a cursor and reaches another center is refused there on its incarnation (KL-2968-a). The credential test is the one the peer's refusal already used (`carriesCredential`); it also finds a URL's userinfo inside a value under another scheme (`proj:https://user@host/…`), see the #3184 entry.
546
+ - **Pins.** `test/backlog3068-center-incarnation.test.ts` (a real File store; an in-process twin whose partitions are born with their own incarnation and judge the claim before any write): P1 an empty center at the same address — refused `{ incarnation, other, want }`, zero writes on both sides, the entry stays; way out (2) pushes and deletes nothing and binds the new incarnation; the same center runs and keeps the incarnation; P2 an older copy at the same address — refused, the newer local version stays; a cursor without an incarnation is refused `absent` with `want`, and way out (1) then runs; an empty-baseline cursor without one runs as a first sync; the incarnation row's two outs verbatim for absent and other; a result under another incarnation, a result to a claimless request over a baseline, a result with no or a credential-bearing incarnation, a refusal of a served request, an unknown or incarnation-less refusal — protocol errors, zero local writes; a malformed claim on the cursor refused before any read or request; a store root or a scope holding a recognized secret refused on its axis with `want` the credentials mark, the sentence, the outs and the serialized report free of it, and a dash-joined `sk-` slug as a store root and a scope syncing; F2 a request delivered to another scope's route refused there, zero writes; F4 the versioned path, an old-route center answering 404 with zero writes; F5 a continued layer refused on its last call keeps its earlier `applied`; the closed set — `{ axis, found, want }` on all four axes. The center twins in `test/backlog2968-sync-peer-binding.test.ts`, `test/backlog2969-sync-round-report.test.ts` and `test/backlog3047-sync-report-applied-every-outcome.test.ts` answer with an incarnation and judge the claim; `test/memory-sync-client.test.ts` (the `/v2` path, the request's claim), `test/backlog2836-sync-cursor-store-binding.test.ts`, `test/backlog2818-typed-scope-sync-store.test.ts`, `test/backlog2956-memory-sync-store-root-export.test.ts`, `test/backlog2957-sync-store-move-refused.test.ts` and `test/design336-origin-carriage.test.ts` answer under one incarnation; `detail` assertions carry `want`.
547
+
548
+ ### A deployment's memory is answered across its stores: one erasure requestId per deployment, a session's memory status folded over every store the engine root holds, and the plane classification read from the root (#3172, #3175, #3173; behavior change only for a host that adopts the new face — every existing face is unchanged; hard-breaking: none; closed sets: none; exports: +3 root values `createMemoryDeployment`, `classifyScopePlanes`, `scopePlanesOf`, +5 root types `MemoryDeployment`, `MemoryDeploymentInput`, `MemoryDeploymentStore`, `DeploymentSessionMemoryStatus`, `ScopePlanes`; members: +1 `FileMemoryEngineBackend.erasureAnchorOf`; contracts: +2 `memory.deployment_status.fold`, `memory.erasure.request_per_deployment`) (@server @cli @client-core @test)
549
+
550
+ - **Before.** On a directory-pinned deployment the personal layers (`user:` / `userproj:` / `org:` under the v2 contract) live in a second File store on the personal mount. An erasure `requestId` was judged by the evidence chain of the one store a request landed on, so the same `requestId` first executed on the deployment's store and resent naming a personal layer ran there as a new erasure; no core reading held both stores. A session's memory status was one store's answer, and which stores a deployment has could only be inferred from the layers its configuration names — a personal store left by an earlier configuration was in neither reading. `classifyScopePlanes` / `scopePlanesOf` were not exported, so a host classified a key by calling `resolveMemoryScopeStore` over a stand-in backend.
551
+ - **Now.** `createMemoryDeployment({ backend, memoryEngineDir, scopeContract, onIncident?, memoryCaptureRecordStore? })` takes the deployment's backend and engine root as given to the Runner and the scope contract its sessions are minted under (the two keys are required and judged as `resolveMemoryScopeStore` judges them; a backend that does not own its control plane is refused `config.memory_scope_key`). It holds one engine per store:
552
+ - `stores()` — the project store (the deployment's backend), then, on a directory-pinned deployment, the personal store once its mount exists under the engine root. The set is the disk's: the configuration decides only where a session writes. Reading the set opens no store that is not there.
553
+ - `eraseMemoryEntries(input)` — the engine's erasure input and receipt, judged as one request in the whole deployment. A `{ scope }` selector reaches the store carrying that scope; with `expectedScopes`, the store carrying the granted scopes — a grant naming scopes kept in two stores is refused `config.memory_erasure_scope` before anything is read or deleted; `{ ids }` / `{ sessionId }` without a grant reach every store, each resolving its own share. Under the face's lock the stores are read once, and before any store executes every store is read for an anchor of the same `requestId`: one recorded under another authorization set refuses `config.memory_erasure_scope`; one with another selector, or in a store the request does not reach, refuses `memory.erasure_selector_mismatch` (the store's own code) — nothing deleted, nothing recorded. A store holding the request's own anchor replays it; different `requestId`s erase each in its own store. When a request reached two stores, their receipts merge into one: counters add, lists concatenate, a `notFound` row is dropped when the other store erased that id, and `status` is `complete` only when both stores' receipts are `complete` (a store that could not establish its share — damaged custody, an unverified carrier — keeps the merged receipt `partial`, and `custodyState` is the worse of the two). Erasures through the face run one at a time (a transaction lock in `.memory-erasure-judge` under the engine root, kept alive by a heartbeat while the stores execute), and the store set, the reach and the judgment are read under that lock. A lock found lost before a store executes or after the last one throws `ControlPlaneCorruptError` (facet `lock-ownership`) instead of returning a receipt. A store failing after an earlier store executed throws; a replay of the same `requestId` converges both.
554
+ - `sessionMemoryStatus(sessionId)` — the five session keys folded over every store: counts add, and any store's count absent ⇒ absent; `lastCaptureAt` is the latest, absent when a count is absent or no store has a capture; `captureOptedOut` is `true` (with `optOutSource: "record"`) when any store holds a record and `false` only when every store answers `false`, else absent with `optOutSource: "fault"`. One store ⇒ the five keys are that store's answer unchanged. New member `planes`, always present: one row `{ plane, status }` per store in store order, the store's own answer — the fold's diagnostic (the row whose key is absent is the store that faulted) and the only place `writeHome` is answered (a directory in that store; it is not folded). A store that cannot be opened answers `{ optOutSource: "fault" }`. The face never throws.
555
+ - `FileMemoryEngineBackend.erasureAnchorOf(requestId)` — the store's local anchor of a `requestId` (`{ selectHash, expectedScopes? }`, or `undefined`), read in the transaction lock after the journal recovery an erasure starts with; the store's own replay judgment reads the same function.
556
+ - `classifyScopePlanes`, `scopePlanesOf`, type `ScopePlanes` — the pure plane classification the session assembly reads, now on the root; unchanged.
557
+ - **Consumers.** @server: (1) route both erasure faces (operator `POST /v1/memory/erase`, session self-erasure) through one deployment object's `eraseMemoryEntries`, and delete the `409 memory.erasure_store_unjudged` transition arm (`MemoryErasureStoreUnjudged` and its two throw sites in `src/memory-operator-faces.ts`, its reply arm in `src/http/memory-compliance-failure-reply.ts`, the code's rows in `self-minted-wire.ts` / the error catalog / §9 and appendix A): the `{ scope }`, `{ ids }` + `expectedScopes` and `{ sessionId }` erasures it refused now execute in the store that holds them, and a `requestId` reused across the two stores reads `409 memory.erasure_selector_mismatch` (the 🚧 cells in `test/memory-layer-seat-http.test.ts` and `test/memory-project-scope.test.ts` flip as they state); an erasure sent to one store's own engine is judged by that store alone; (2) delete `foldPlaneStatuses` and project the session memory status from the deployment's answer — its folded keys are your five wire keys; `planes` is +1 member (each row carries `writeHome`) to project or list as dropped in `core-keyset-guard.ts`; (3) delete the configuration-pushed store list for these two verbs (`memoryStoresOfDeployment` / `deploymentStoreGroups` over `namedLayers`): `stores()` is the disk's set, which closes the MIGRATION known limit of a personal store left behind after `MEMORY_SCOPE` stops naming it; (4) read `classifyScopePlanes` / `scopePlanesOf` and retire `PLANE_PROBE` in `memory-scope-stores.ts`; (5) pass `scopeContract: "v2"` — your `memoryScopeContractOf` reads a typed key as v2, and an untyped key classifies to the project plane under v2 as under no contract. @cli @client-core: nothing reaches you directly; the server's erasure and status answers change as above. @test: the server's flipped cells are the black-box surface once it delivers.
558
+ - **Pins.** `test/backlog3172-3175-memory-deployment-judge.test.ts` — the same `requestId` across the two stores, both orders ⇒ 409 and the other store untouched; a `requestId` first executed on one store and resent with a selector reaching both ⇒ 409 before either executes; a personal store that appears while an erasure waits for the lock is erased with it; a same-store replay ⇒ idempotent (`erasedPreviously`, `complete`); different ids ⇒ each store erases; a grant across stores ⇒ refused with no delete and no chain row; a grant on one store routes there; `{ ids }` without a grant ⇒ one receipt, no stale `notFound`; `{ sessionId }` ⇒ both stores' contributions erased; the lock lost while a store executes ⇒ `lock-ownership`, no receipt; a merge where one store's share is `partial` (damaged custody, `historyUnknown`) stays `partial`; the fold law key by key (sum, latest, any record, a faulted ledger, a faulted record read) and the one-store identity; a real Runner session written under `user:alice` and a restarted deployment that names no personal layer still holding, reading and erasing it; the input refusals; the two classification functions from the root.
559
+
560
+ ### A note an extension adds while a turn runs is in the conversation a durably parked leg resumes: the checkpoint carries it (`heldRows`), the resumed leg stores it once, and once the park is taken `$.session.append` refuses (#3217 = #3156 S1, ruled C-R1047 K1–K9; #3220: `docs/CLOSED-SETS.md` states the requirement words at the count and with the members they now have; the refusal after the park takes Claude Code 2.1.309's form for a call with no running loop (`g8t` / `Nro`, cli309.js:279001: `$.session.append: refused: <reason>`); divergence D-3156-a, open to veto; hard-breaking: three, HB-1–HB-3 below, HB-1 open to veto; closed sets: +1 `RequirementWord` `held_rows`; exports: none; members: +1 optional `CheckpointRow.heldRows` (wire +1 optional key)) (@server @client-core @cli @test)
561
+
562
+ - **Before** (the #3008 section's own reading, never released). A note `$.session.append` admitted while a turn ran waited in the harness's queue for the run's next serialization point. A leg that parked durably before that point — an approval park, a resource or platform park, a plan review — did not take it with it: an approval or review park's abort held the queue until the harness was dropped, a boundary park's clean end stored it past the leaf the checkpoint captured (a branch the resume never reads), and the leg's report sink said one line per such note (`… is not in the parked conversation …`, KL-3008-d). A note taken after the park answered `{ message }` and went the same way. After a live abort the held writes were drained even when the reconcile left the interrupted batch open.
563
+ - **Now — the park carries them.** The commit every durable park passes takes the rows the leg's port holds (queue order) onto the row it writes — `heldRows`, beside `leafId`: the leaf is where the conversation stopped, these are what it owes after it — and settles on the commit's outcome: the row landed ⇒ they leave the queue; it did not land ⇒ nothing changes and the run goes on; the store cannot say ⇒ they stay for this leg's own branch. The resumed leg's harness starts its queue with them and writes each once, at its transcript's first legal point: after the parked call's result and every sibling's (an unanswered sibling is settled first), before the continuation — and not through the `session.append` station again (the parked leg admitted it; an extension's rewrite stands, `rewrittenBy` with it). A resume that parks again before that point carries them on as they were; one that wrote them carries none; a reopened row resumed again reads them once, from its own leaf. A row with nothing held carries neither the member nor the word.
564
+ - **Now — the port at the park.** While the park is being written a `$.session.append` call waits for its outcome. Once the park is taken — or whether it was cannot be known — the call throws `$.session.append: refused: the leg parked durably — the conversation it resumes is its checkpoint's` (nothing is queued, stored or reported). The port writes at once only when the harness is idle and holds nothing, so a note taken while carried rows wait lands after them. After a live abort the held writes are drained only when the reconcile closed the interrupted batch; otherwise each is said on the report sink (`phase: "interrupt-reconcile"`, `held session write not stored: …`) and none is written.
565
+ - **Hard-breaking.** HB-1 (wire, additive; closed set +1; open to veto). *Before:* a checkpoint row carried no conversation rows past its leaf; 36 requirement words. *Now:* a row taken while the port held rows carries optional `heldRows` (conversation rows, in order) and the requirement word `held_rows`; a row with none is unchanged — words and digest are derived from what is present, so a row parked before this version reads as before. *What to do:* a worker on an engine before this version refuses a row that names `held_rows` with the requirement-word refusal it already has (`checkpoint.unsupported_version`, reason `version_newer`; the row stays pending, unclaimed) — roll workers forward before traffic, and let such parks settle before a rollback. HB-2 (a narrowing of the #3008 reading in this same version, so no released behavior moves). *What changed:* the report line `… is not in the parked conversation …` and KL-3008-d are retired; a note admitted before a durable park is in the resumed conversation once; a call after the park throws `refused` instead of answering `{ message }`. *Who is affected:* an extension that notes from `turn.complete` / `session.end` on a leg that may park — its call after the park now throws. *What to do:* catch the refusal, or note before the park. HB-3 (disclosure, the report sink). *What changed:* after a live abort whose reconcile left the interrupted batch open, each held write is said on `onError` (`phase: "interrupt-reconcile"`, `held session write not stored: …`) and none is written into the open batch. *Who is affected:* a host that shows or logs `onError` lines for a session, and an extension whose note was among the held writes — that note is not stored. *What to do:* surface those lines; an extension that needs the note in the conversation adds it again from a later turn's handler.
566
+ - **Who needs it.** An extension that notes something while the calls it watches run (a `PostToolUse` audit line, a turn summary, a gate's own reason) on a deployment that parks approvals or resource slices durably — its note was in the resumed conversation zero times — and the person who reads that conversation.
567
+ - **Divergence, open to veto.** D-3156-a: a note added while a turn runs is stored at the run's next serialization point and rides a durable park's checkpoint; Claude Code keeps it at once and has no durable park (a strict provider sequence and an open batch forbid a row between a call and its result here).
568
+ - **Consumers.** @server: the member rides the row's JSON blob — the SQL store reads the whole blob back, column mapping zero change; run the store kit's new "held rows" cell and the park self-check (`probeParkRoundTrip` reads `heldRows` back: a store that serializes a member whitelist now fails it, `row_not_faithful`); roll as HB-1 says. @client-core: an extension error forwarded from `$.session.append` may be the refusal sentence; zero type change [pending check]. @cli: the refusal's form for mods authors; no wire word changes. @test: the pins below are the black-box criteria — an approval park's note resumed once and in place, a resource park's `turn.complete` note, the refusal after the park, no replay across two resumes.
569
+ - **Known limits.** KL-3156-a (a park that is abandoned — expired, cancelled, reaped — loses its held notes with it), KL-3156-b (a host reading the transcript during the park does not see them: they are on the checkpoint), KL-3156-c (a store that commits a session write and then throws can make a queued note land twice — every queued write shares this today; #3221).
570
+ - **Pins.** `test/backlog3217-held-rows.test.ts` (real Runner lanes over file stores, a fresh Runner and fresh store instances per leg: P1 / P1b / P1c / P1d approval parks — the note once, after the batch and before the continuation, the tool-turn law held, a sibling that parks again carries it; P2 a resource park; P3 a plan-review park; P4 a resume that wrote it parks again with none; P5 a resume that parks again at its window entrance carries it; P6 a reopened row; P7 the refusal after the park; P8 / P8b a call made while the park is written — landed, not landed, unknown; P9 no second station; P10 a live abort — drained after a closed batch, said after a failed reconcile; P11 the row's shape and words; P12b the park self-check; P13 the port's order; P14 the queue's producers); the store kit's "held rows" cell (`checkpoint-store-contract.ts`); `test/backlog3008-session-append.test.ts` P7c / P7d / P7e retired; `test/module-size-ratchet.test.ts` raises six modules by the member's and the gate's lines.
571
+
572
+ ### A notice a leg raises about itself names the leg by one id — its own task id; `detail.taskId` is no longer the host's declaration on seven codes and the leg's id on two (#3213 = #3207 slice 1b; behavior change, open to veto)
573
+
574
+ - **Before.** `detail.taskId` had two readings. On seven codes it was the host's declaration — `TaskSpec.taskId`, present only when the host named a task id: `task.turn_interrupted` (a `priority: "now"` steer and a bare halt), `task.halt_unconsumed`, `task.interrupt_unconsumed`, `task.late_approval`, `steering.parked_input_blocked`, `approval.read_root_granted` and `approval.read_root_grant_rejected` (fourteen call sites). On `task.user_steer_undrained` and `task.user_followup_undrained` it was the leg's own task id (`Prepared.taskId`, always present). A consumer that grouped a leg's notices by `detail.taskId` found the key on two codes of nine for a leg whose host named nothing (an undeclared root leg, a sub-agent the engine itself started).
575
+ - **Now.** One reading: on a notice a leg raises about itself, `detail.taskId` is the leg's own task id, the one value its prepare minted — a background sub-agent's registry task id (`a…`), else the host's declared `TaskSpec.taskId`, else the leg's session id — the same value its frames, its `TaskResult.taskId` and its hook identity carry. The fourteen sites hand the notice that value through one helper (`legNoticeTaskId`, beside `legTaskIdOf`); none reads the declaration. The three entry points that took it as an optional member (`discloseUnconsumedHalt`, `lateAskSettlementObserver`, `settleReadRootGrant`) now take it as a required string. `EngineNotice.detail` and `docs/INTEGRATION-CORE.md` state the reading once; the per-code rows list `taskId` as present.
576
+ - **Behavior change, open to veto — `detail.taskId` on the seven codes.** *What changed:* on the notices a leg raises about itself, `detail.taskId` is now always present and is the leg's own task id: the id the host declared on `TaskSpec.taskId` when it did (unchanged), a background sub-agent's registry task id, else the leg's session id — previously the key was present only when the host declared one. *Who is affected:* a consumer that read the key's presence as "the host named a task id" sees it on every leg now; one that compares the value with the id it declared still matches on every declared leg except one that a delegation row lane overrides (a background sub-agent resumed by its host reports its registry task id, as its `TaskResult.taskId` already does). The copy of a child's `task.user_*_undrained` notice that is announced on its parent's session is unchanged: it carries the parent leg's task id (absent when the spawner carried none), the parent's `sessionId` and the child's `childSessionId`. *What to do:* route a notice by `detail.sessionId` (unchanged); join an own-leg notice to its leg's frames and registry row by `detail.taskId`; test for "the host declared one" by comparing with what you declared, not by the key's presence.
577
+ - **Also.** `StreamHaltVerbsInput` no longer takes `spec` (its only read was this key); `PrepareAskLaneInput.spec` is `hostTaskId` (the leg's task id); `UnconsumedHaltDisclosureInput.taskId` is `string`. No wire key is added, removed or renamed; no exported name changes.
578
+ - **Consumers.** @cli: no behavior change — the interrupt-marker latch compares `detail.taskId` of `task.halt_unconsumed` / `task.turn_interrupted` with the task id the shell declared for the stop it sent: a declared shell leg reads the same value as before, and a background row-lane leg's row id never equals it, so the latch stands down as it does today; only the latch's header comment (the key as "`spec.taskId` echoed") needs to say "the leg's task id, the host's declaration when it declared one". @server: your notice routing reads `detail.sessionId` (unchanged); an audience table that assumes `detail.taskId` appears only for a declaring host needs the one-line change above. @client-core, @test: no code read; the black-box cells for these seven codes can assert `detail.taskId` present.
579
+ - **Pins.** `test/backlog3213-notice-leg-task-id.test.ts` (a real Runner, one cell per call site: Q5 the fourteen sites on an undeclared leg read the session id; Q1 the same sites on a declaring leg read the declaration; Q2 a background sub-agent's leg reads its row id; Q4 the two undrained-input codes keep their readings, the parent's copy included; Q6 a row-lane park resumed by a host that declares a task id reads the row id; Q7 no notice site reads `spec.taskId`, and the three entry points refuse a call without the id at compile time); the family batch `grep -l 'detail.taskId\|halt-attribution\|engine-notice' test`.
580
+
581
+ ### An ask names the conversation it was raised in as `sourceSessionId` — the value `sourceTaskId` held under a task id's name — and a delegated agent's ask names the agent, `agentId` (#3212 = #3195 S1a, ruled C-R1043 K1 / K2 / K7; aligned with Claude Code 2.1.309, whose approval request names the asking agent by `agent_id` and carries no session id (`can_use_tool`, cli309.js:288208); hard-breaking: three, HB-1–HB-3 below, open to veto; closed sets: +1 `RequirementWord` `source_session`; exports: none; members: four types renamed — `AskRequest`, `AskQuestionRequest`, `Checkpoint` and `CheckpointSummary` `sourceTaskId` → `sourceSessionId` (the `Checkpoint` member also reads through `CheckpointRow` and `CheckpointFields`, and `createAskUserQuestionTool`'s `source` parameter takes the new key: the wire manifest counts seven breaking readings of the one fact, one root) — and +1 optional `agentId` each on `AskRequest`, `AskQuestionRequest` and `CheckpointSummary`) (@server @sdk @client-core @cli @test)
582
+
583
+ - **Before.** `AskRequest.sourceTaskId`, `AskQuestionRequest.sourceTaskId`, `Checkpoint.sourceTaskId` and `CheckpointSummary.sourceTaskId` held the issuing leg's session id under a task id's name, while `TaskEvent.sourceTaskId` and `WorkflowRun.sourceTaskId` hold a leg's task id — one name, two answers. An ask carried no id for the agent that raised it, so a host tied an approval to a background agent's row by joining the session id to the row's `transcriptId`. The ask source was composed inside the policy chain, and the question tool, the question routing and both park stamps each took the leg's session id again.
584
+ - **Now — one mint.** A leg's ask source (`sourceSessionId`, `agentId`, `fromSubagent`, `sourceAgentName`, `isDelegatedChild`, `principal`) is minted once at prepare, beside the leg's task id (`mintAskSourceIdentity`), and every ask, question and park of the leg reads that one value. `agentId` is `agentIdOf` — the predicate the extension events and the hook identity already answer by: the leg's task id when the leg is a delegated child (a background sub-agent's registry task id `a…`; a foreground one's session id), absent on a host's ask. Its presence is the delegation fact, not `fromSubagent`: an agent of a directly started workflow carries `agentId` and no `fromSubagent`. A parked row's summary derives `agentId` from the row by the same predicate; no member is stored for it.
585
+ - **Hard-breaking, open to veto.** HB-1 (the session-domain member renamed): `AskRequest.sourceTaskId`, `AskQuestionRequest.sourceTaskId`, `Checkpoint.sourceTaskId` and `CheckpointSummary.sourceTaskId` are renamed `sourceSessionId` — the value is unchanged (the issuing leg's session id) and the old key is gone, with no alias — and `createAskUserQuestionTool`'s `source` parameter takes `{ principal?, sourceSessionId?, agentId? }` (a typed caller that passes `sourceTaskId` no longer compiles). An approver, question face, checkpoint store or inbox that read the old key is affected (a compile error on typed consumers, `undefined` on untyped reads), and a store that persists a checkpoint by field list must map the new key (the park self-check and the cross-backend contract fail if it drops it). Read `sourceSessionId` as the issuing leg's conversation address, never as a task id; identify a delegated agent by `agentId` (HB-2). HB-2 (the asking agent's id, additive): An ask or question raised by a delegated sub-agent now also carries `agentId` — the leg's task id (a background sub-agent's registry task id `a…`, the string `TaskStop`, `SendMessage` and `task_notification.task_id` use; a foreground sub-agent has no registry row, so its session id) — present exactly when the issuing leg is a delegated child, absent on a host ask. A consumer that associated an approval to its background row by joining `sourceSessionId` against the row's `transcriptId` may drop that join for `a*` rows; one that ignores the key is unchanged. `CheckpointSummary.agentId` carries the same value for a parked row, derived from the row (no new stored member). HB-3 (parked rows across the upgrade): `sourceTaskId` was a member the row digest reads, so an approval or plan-review checkpoint that carries a requirement digest (every such row minted by a release that stamps requirements) and was parked before this version reads as `requirements_damaged` on this version and cannot be resumed (rows without that member, and rows older than the requirement digest, are unaffected), and a worker older than this version refuses a row parked by this one as `version_newer` (requirement word `source_session`). Let parked approvals settle (answer them or let them expire) and drain older workers before upgrading; nothing in this version reads the old key as an alias. Measured: two approval rows the v7.60.0 engine parked (a delegated leg's and a host leg's) read `requirements_damaged` here ("the members a decision reads do not match the row's content digest") and their resume is refused `checkpoint.invalid_outcome` before the claim, the row left pending; a v7.60.0 `resource_limit` row and a v9 row read ok; a row this version parks is judged `lacking` (`source_session`) by the v7.60.0 engine.
586
+ - **Known limit, 7.61.0 transient (KL-3212-a, #3226).** A workflow agent whose script declares a `taskId` and that runs on no registry row asks with `agentId` = the declared id, while its parked row's summary says its session id (the row records no declared id). Background, foreground and host rows read the same on both faces.
587
+ - **Who needs it.** An approval inbox that attributes an ask to a background agent's row — one key equality (`agentId` = the row id) instead of a session-to-transcript join; any reader of the source member, which no longer reads as a task id.
588
+ - **Consumers.** @server: the approval identity tuple reads `sourceSessionId` (the conversation) and `agentId` (the row); the SQL checkpoint store maps the renamed field (the park self-check and the cross-backend contract fail on a store that drops it); the `runs.ts` wake row reads the renamed key; the wire frame keys follow the rename with no alias; the server's own `listByScope` projection gains `agentId` from `state.isDelegatedChild` / `state.rowTaskId` / `sessionId` (core's `summarizeCheckpoint` is the reference reading); the deployment sentence of HB-3 (settle parked approvals, drain older workers). @sdk: `TOOL_APPROVAL_FRAME_KEYS` follows the rename. @client-core (CC-1124): the badge and the row association read `agentId`; the `sourceTaskId` fallback goes. @cli (L-2225): the latch definition sentence reads `sourceSessionId`. @test: the criteria are P1–P12 below.
589
+ - **Pins.** `test/backlog3212-source-session-id.test.ts` (real Runner: P1 / P2 the Agent tool's background and foreground children; P3 a host leg, and the faces against the ones the v7.60.0 engine produced on the same fixtures; P4 the approval park and its resume; P5 rows the v7.60.0 engine parked — `test/fixtures/backlog3212-v7600-rows.json`; P6 the word the v7.60.0 reader lacks; P7 the question faces, mounted and routed; P8 the summary's `agentId`; P9 the plan_review stamp; P10 the park self-check; P11 the public fixtures; P12 a directly started workflow's agent), `test/fixtures-golden.test.ts`, `test/backlog3193-one-agent-one-id.test.ts` P12, `test/backlog1320-reader-requirements.test.ts` H (the maximal approval row carries the member), and the neighbours renamed in place (listed in the receipt).
590
+
591
+ ### A host's in-process MCP server mounts through the host seat as itself — the seat hands one MCP transport per dial, the server answers its own handshake, instructions and resources; a request-level seat rides one adapter, `hostSeatOfRequests`; what a host says it could not carry is one class read in one place (#3214 = #2631 S1, ruled C-R1044; hard-breaking HB-1, open to veto; exports: +1 root function `hostSeatOfRequests`, +1 root interface `McpHostRequestSeat` — `McpHostSeat` keeps its name and changes shape, HB-1)
592
+
593
+ - **Before.** The host seat (`RunInternals.mcpHostSeats`, 7.60.0) was request-level: `McpHostSeat.request(method, params, signal)` for `tools/list` and `tools/call` only, with the engine answering the handshake itself — so a host's own MCP server (an SDK `Server` in the host's process) lost its name, version, instructions and resources on the way in, and a host had no way to hand the engine a message-level pipe. A seat's failure came back as an error response the adapter synthesized, read by the identity of a verdict object only the adapter minted.
594
+ - **Now.** A seat is a pipe source: `McpHostSeat = { open({ server, signal }) => Transport | Promise<Transport> }`, asked once per dial (the first, a re-dial, a delegated child's, a resumed leg's). The server behind the pipe answers the whole protocol: its `serverInfo` is the status row's, its instructions reach the system prompt through the same sanitizing lane as a stdio or http server's, its resources reach the global resource tools; tool names (`mcp__<row>__<tool>`), permission rules and the call `_meta` are what any server's are. A pipe is the dial's from its arrival — the engine connects it and closes it. The 7.60.0 request-level interface is `McpHostRequestSeat` (shape unchanged) and rides `hostSeatOfRequests(seat)`, the one adapter, with the 7.60.0 behavior (the handshake answered from the row's name, the two methods, cancellation through the request's signal, a late answer dropped).
595
+ - **Hard-breaking (HB-1, open to veto).** *What changed:* the root export `McpHostSeat` (7.60.0) changed from request-level `{ request(method, params, signal) }` to the pipe source `{ open({ server, signal }) => Transport | Promise<Transport> }`; the request-level interface is renamed `McpHostRequestSeat`, its shape unchanged. *Who is affected:* a host that puts a request-level seat in `RunInternals.mcpHostSeats` (server / cli / client-core `origin/main` hold none; server's consumption ledger records the family as skip; the test repository's 7.60.0 repro drivers are version-pinned; computer-use / desktop not scanned — please say if you hold one). *What to do:* `mcpHostSeats.set(name, hostSeatOfRequests(seat))` — the behavior is 7.60.0's (the same handshake answer, the same two methods, the same failure words and delivery verdicts).
596
+ - **Behavior — one deadline over a host row's whole mount.** The seat's `open`, the pipe's `start`, the handshake and the first listing run under one deadline — the row's `startupTimeoutMs`, else `MCP_TIMEOUT`, else the SDK's request default (60 s) — raced against the run's abort: a pipe that holds any of those steps fails the dial `timeout` / `delivered: "no"` at the bound (the SDK's own timer covers the requests only). The engine's close of a pipe it took — a failed mount, a teardown, a re-dial's replacement — is immediate: the connection reads closed at once and the host's own close runs on the host's time, never waited on, a rejection of it nobody's (so a host close that never settles cannot hold a task's end or a re-dial, and one that rejects cannot surface as an unhandled rejection); a pipe that arrives after the dial stopped waiting is taken and closed.
597
+ - **Behavior — what a seat hands is judged at its arrival.** A pipe is taken once: one handed again (to another dial, or by a seat that keeps one across dials) is refused `host_refused` / `no`, naming the dial that took it, and left alone; a value that is no transport (`start` / `send` / `close` functions) and a pipe that already holds a `sessionId` (the SDK would skip the handshake on it) are refused `host_refused` / `no` — both closed when they have a `close`. An `open` that throws `McpHostSeatFailure` fails the dial with the host's sentence (`host_refused`, or `unknown` with delivery `no`); one that throws anything else is `host_refused` in the engine's sentence, never the thrown text.
598
+ - **Behavior — one failure class, one reading.** `McpHostSeatFailure` — thrown by `open`, the rejection of the pipe's `send` of a request, the adapter's — is read by the failure classifier's one host row by its class and its two facts (`no` ⇒ `host_refused`, `unknown` ⇒ `unknown`); the synthesized-response channel and its verdict-identity table are retired. The adapter hands a seat's failure back as its request's `send` rejection (SDK 2.4.0 rejects the waiting request with it and clears its handlers — pinned on 1 000 failures for both forms). A request settles once, by what came first: the server's answer, its send's rejection, the engine's cancel, the pipe's close (a host that closes the pipe and then rejects reads as `connection_closed`; a send rejected after its request's answer arrived is nobody's, so an answered write never reads as "not sent, safe to send again"). A cancellation the pipe fails to send is no request's ending (the cancelled call already reads as cancelled or `timeout` / `unknown`): cancelling a call on an in-process server is best effort. `McpHostSeatFailure` bounds its `condition` when it is built.
599
+ - **Behavior — the elicitation refusal says what is true.** A host row's `elicitation: true` is still refused at every entrance (`config.invalid_argument`); the reason now reads "the server behind a host's pipe is the host's own code, so a question it has for the user goes through the host's own interface — the engine advertises no elicitation for it" (Claude Code 2.1.309 advertises an empty client capability record to its SDK servers, `qct` (cli309.js:287917)).
600
+ - **Stated.** The server behind a host's pipe is the host's own code: it is not confined by the engine's sandbox and its reach is not judged by the engine's host floor (that floor judges an http row's URL). Its instructions enter the system prompt through the same sanitizer as any server's. KL-1496 (no `notifications/tools/list_changed` consumption; `RefreshMcpTools` is the freshness lane) reaches the host pipe too. The no-run probe still takes no host seat (a host row there fails `invalid_config` / `no`).
601
+ - **Consumers.** @server: the consumption ledger gains two rows (`McpHostRequestSeat`, `hostSeatOfRequests`); a request-level device bridge (S-2426) is one line, `hostSeatOfRequests(seat)`; the K2 client-bridge half can hand a pipe per dial (`open`) directly. @client-core: CC-999 is no longer blocked on core — a CC `type: "sdk"` server maps to a `{ kind: "host" }` row whose seat opens one pipe per dial (wire: the row is `{ kind: "host" }` alone; the seat is `open({ server, signal }) => Transport`; a failure is `McpHostSeatFailure` read as `host_refused` / `unknown`). @cli: no read point. @test: an in-process server's tools callable, its instructions visible, an `open` failure and a call failure on the card.
602
+ - **Pins.** `test/backlog2631-host-pipe.test.ts` ①–⑮ (a real in-process SDK server over `InMemoryTransport.createLinkedPair()`, through the Runner and the library entrance: the mount and its handshake / instructions / resources, one open per dial at a re-dial and a delegated child, `open` throwing, `open` never settling, a call's `send` rejected, the server closing, a value that is no pipe and a pipe taken twice, elicitation, 1 000 send rejections, a server-wide deny, the run's abort during `open`, a pipe holding its `start` or its `notifications/initialized` send, a late arrival of a taken pipe, the settle order — an answer before its send's rejection included —, a pipe holding a session, a host close that never settles or rejects); `test/backlog2841-host-seat.test.ts` (every cell through `hostSeatOfRequests`, ③b's 1 000 failures included).
603
+
604
+ no-notes: #3050(docs and JSDoc only: INTEGRATION-CORE 11.2 and the RunnerDeps.readFace JSDoc state that a Runner's deployment is one statement; two read faces are two Runners; a delegated child reads the statement of the Runner its Agent tool is bound to and the parent's roots reaches it through the restricting clamp; the createSubagentTool JSDoc points at it; plus one pin file; no engine behavior; no export change), #2979(module-size ratchet rows raised by hand on the merged stage tree: src/agents/subagent.ts 8_210 to 8_214 and src/core/runner/contracts.ts to 2_810, each car green alone and the sum over the ceiling; the split of those files is the ticket; test table only, no engine change), #2686(named by the car-309-B merge header only: the ticket stays open; no code or sentence for it landed in this version, the limit sentences wait for the settle_race arm), #3120(named only by the car-small-7610-writefile branch merge header: the ticket shipped in 7.60.0 and nothing for it changes here), #2595(named only by a merge header inside the car-2929-mcp-v2 branch: the ticket shipped in 7.60.0 and nothing for it changes here), #2946(named only by a merge header inside the car-2929-mcp-v2 branch: the ticket shipped in 7.60.0 and nothing for it changes here), #969(named by the #2940 car commit message only: the park-seat pins were re-pinned for the mailbox window — a double fault settles first and then drains; no change to what #969 shipped), #1052(named by a #3059 car commit message only: a pin of the clamp-set rows now names its fake rows in the member table; no change to what #1052 shipped), #926(named by two car commits that route a thrown value through the existing thrownText reading: the mailbox store contract and the floor reason; no behavior change, the sweep ticket shipped earlier), #3161(the seatbelt confinement pieces of the OS-confinement seat live in one src/core module: read-floor imports seatbeltProfile from it and the root export confineShellStart comes straight from core so the engine layer imports nothing from tools/; no behavior and no export change), #6(not a ticket: the number is the stage verify-chain label "chain #6" in the subject of the stage re-pin commit 28cce2ef0; the two re-pins it carries are told under #3126 — test files only), #2181(a stale cost characterization re-pinned on the stage after #3126: every session-rule key is read once more per call for the request's tools block; one test file, no behavior beyond #3126), #3164(refuted, nothing landed: the approval card, the row and the preview already render the post-hook bytes; the stale value on screen is client-core's preference for tool_start.args over the row's pending.input — client-core CC-1115; named only by the car-user-7610-c merge header), #9(not a ticket: the number is the stage verify-chain label "chain #9" in the subject of the stage bank-down commit 71e01a14b; that commit only lowers the internal-wording baseline for src/core/memory-engine after #3068 — test file only), #2673(named by a #3147 commit that re-pins the package publish test's D cells to the one-driver face: 29 names, each smoke row's kind is typeof of the export; no change to what #2673 shipped), #3177(refuted, nothing landed in src: the session.append seat already says a protocol-outside reply on the leg's report sink — a next payload whose keys sit on the prototype chain, a second next, a row other than what next answered; the ticket's probe built the bus without onError; one test file pins the shapes at the seat and on a real Runner), #3187(the delegation's two stations, agent.offer's listens and agent.spawn's guard, read the one seatHears predicate the four session stations read: one fact, one reading; no behavior change; the unheard-seat pin covers the two entries), #3197(the offered set takes the leg's seat and reads the one seatHears predicate, and the two runner sites that decide whether to await it (the first request's listing frame, a turn boundary's) read it the same way, so no place reads the bus's hasHandlers("agent.offer") itself; no behavior change; one pin file with the behaviour each place keeps and a source-form pin per place), #3198(carriesCredential's comment now says what the code decides: an empty userinfo is no credential, any other, the bare separator included, is a credential's slot, and a URL begins at the first letter of the scheme characters before its mark; the walk's one branch that exempted the bare separator never decided a verdict, the egress pass having already judged that form, and is removed; no verdict changes; one pin file), #3143(test only: backlog2561's R6 waits for the parked call's tool by the tool announcing it instead of by counting event-loop turns, since its fact sits behind the run's 50 ms bounded journal append and how many empty turns fit in 50 ms depends on the machine; no engine behavior), #1320(named by a #3203 test commit only: the H.shown-readers pin registers the askReasons member among the shown readers; one test file, no change to what #1320 shipped), #3171(nothing landed in behavior: the premise did not hold. The mint folds only a peer segment's run of underscores, so `b3126_echo` is no spelling of any MCP tool and the reference reads it as no tool either; a deny or ask written that way is already announced by the policy-name audit's unmatched-names advisory, on the rule policy, the deny list and the session rules row, while the tool stays and the run is unaffected. One JSDoc paragraph on `peerReadingsOf` states that the rule-name readings run one way only, from the reference's spelling to the minted peers, and one test file pins the faces, the reference-spelling control and the absence of a reverse arm), #3229(the stage red the #3203 merge brought to the 557 ②d pin: a stale pin, not a regression; every reader of the park carry reads it by member name, and the pin compared the whole carry; re-pinned to the carry with the askers' entries; one test file; the #3203 section names the new AskCarry member), #3116(repo release tool only: scripts/release/dist-slip.mjs and the package.json script dist:slip turn one commit into one tarball per published package, read from the publish step's publishSet, with sha1, sha256 and package fingerprint in DIST-SLIP.md / DIST-SLIP.json; one pin file; not in the package, no gate-all roster row, no engine behavior)
605
+
1
606
  ## 7.60.0 — 2026-10-28
2
607
 
3
608
  ### One image admission, one processor, one table: every image a run hands the model is compressed toward 512,000 bytes, and the bytes that ship must state a size within 2000 px (#2987, C-R974 S1 — Q3, Q5's hard rows, Q6, addenda 1 / 2 / 3; behavior change; behavior narrowing open to veto; divergence candidates D-2987-a and D-2987-b, open to veto; hard-breaking: ③ the processor seats and ④ the constant exports, three sentences each below; closed sets: `MediaRefusalReason` +2 `dimensions_unreadable` / `dimensions_too_large`, `EngineNoticeCode` +1 `config.image_processor_unavailable` (operator, engine); exports: −4 root `MCP_IMAGE_MAX_BASE64`, `IMAGE_TARGET_RAW_SIZE`, `sharpImageResizer`, type `McpImageResizer`, +1 root `IMAGE_ADMISSION`) (@server @client-core @cli @test)