@sema-agent/core 7.65.0 → 7.66.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 (122) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/dist/agents/delegation-registry-seat.d.ts +15 -0
  3. package/dist/agents/delegation-registry-seat.js +13 -0
  4. package/dist/agents/org-delivery-gate.d.ts +8 -1
  5. package/dist/agents/org-delivery-gate.js +9 -3
  6. package/dist/agents/peer-session-drain.d.ts +51 -12
  7. package/dist/agents/peer-session-drain.js +44 -31
  8. package/dist/agents/read-inbox-tool.d.ts +6 -2
  9. package/dist/agents/read-inbox-tool.js +18 -5
  10. package/dist/agents/subagent.d.ts +3 -1
  11. package/dist/agents/subagent.js +79 -75
  12. package/dist/brain/reasoning.d.ts +2 -0
  13. package/dist/brain/reasoning.js +1 -0
  14. package/dist/core/allow-entry.d.ts +9 -0
  15. package/dist/core/allow-entry.js +7 -1
  16. package/dist/core/ask-origin.d.ts +23 -3
  17. package/dist/core/ask-origin.js +11 -1
  18. package/dist/core/engine-notice.d.ts +3 -3
  19. package/dist/core/governance-codes.js +1 -0
  20. package/dist/core/human-input-projection.d.ts +9 -0
  21. package/dist/core/human-input-projection.js +13 -0
  22. package/dist/core/input-author.d.ts +66 -6
  23. package/dist/core/input-author.js +21 -3
  24. package/dist/core/memory-engine/consolidation.d.ts +23 -9
  25. package/dist/core/memory-engine/consolidation.js +30 -5
  26. package/dist/core/memory-engine/control-plane-adoption.d.ts +11 -10
  27. package/dist/core/memory-engine/control-plane-adoption.js +54 -29
  28. package/dist/core/memory-engine/delegation-settlement.d.ts +18 -12
  29. package/dist/core/memory-engine/delegation-settlement.js +36 -26
  30. package/dist/core/memory-engine/engine.d.ts +17 -6
  31. package/dist/core/memory-engine/engine.js +78 -35
  32. package/dist/core/memory-engine/file-backend.d.ts +4 -1
  33. package/dist/core/memory-engine/file-backend.js +5 -1
  34. package/dist/core/memory-engine/index.d.ts +2 -2
  35. package/dist/core/memory-engine/index.js +2 -2
  36. package/dist/core/memory-engine/layout.d.ts +57 -36
  37. package/dist/core/memory-engine/layout.js +109 -134
  38. package/dist/core/memory-engine/memory-backend-contract.js +7 -7
  39. package/dist/core/memory-engine/memory-deployment.d.ts +3 -2
  40. package/dist/core/memory-engine/memory-deployment.js +6 -3
  41. package/dist/core/memory-engine/origin-clearance.d.ts +43 -15
  42. package/dist/core/memory-engine/origin-clearance.js +143 -55
  43. package/dist/core/model-receipt.d.ts +2 -1
  44. package/dist/core/model-receipt.js +5 -0
  45. package/dist/core/mods/dollar.d.ts +12 -0
  46. package/dist/core/mods/kernel/dispatch.d.ts +3 -1
  47. package/dist/core/mods/kernel/dispatch.js +5 -2
  48. package/dist/core/mods/kernel/events.d.ts +3 -1
  49. package/dist/core/mods/kernel/events.js +2 -2
  50. package/dist/core/mods/prompt-submit.d.ts +4 -0
  51. package/dist/core/mods/prompt-submit.js +24 -0
  52. package/dist/core/mods/stations.d.ts +23 -4
  53. package/dist/core/mods/stations.js +14 -7
  54. package/dist/core/retired-host-table-account.d.ts +19 -0
  55. package/dist/core/retired-host-table-account.js +28 -0
  56. package/dist/core/retired-tool-name-account.d.ts +60 -0
  57. package/dist/core/retired-tool-name-account.js +32 -0
  58. package/dist/core/roles.d.ts +3 -1
  59. package/dist/core/roles.js +5 -2
  60. package/dist/core/runner/compact-session.js +2 -1
  61. package/dist/core/runner/contracts.d.ts +1 -1
  62. package/dist/core/runner/gate-exit.js +9 -2
  63. package/dist/core/runner/memory-consolidation-driver.js +2 -2
  64. package/dist/core/runner/prepare-config-doors.js +1 -1
  65. package/dist/core/runner/prepare-delegation-surface.d.ts +1 -1
  66. package/dist/core/runner/prepare-delegation-surface.js +5 -3
  67. package/dist/core/runner/prepare-inherited-gate.js +2 -0
  68. package/dist/core/runner/prepare-memory.js +26 -5
  69. package/dist/core/runner/prepare-policy-chain.js +2 -1
  70. package/dist/core/runner/prepare-project-context.js +2 -2
  71. package/dist/core/runner/prepare-task.d.ts +5 -1
  72. package/dist/core/runner/prepare-task.js +4 -3
  73. package/dist/core/runner/prepare-wiring-manifest.js +5 -4
  74. package/dist/core/runner/prompt-suggestions.js +1 -1
  75. package/dist/core/runner/run-identity-wiring.js +2 -2
  76. package/dist/core/runner/run-leg.js +3 -3
  77. package/dist/core/runner/run-notification-lane.d.ts +3 -0
  78. package/dist/core/runner/run-notification-lane.js +2 -2
  79. package/dist/core/runner/runtask.js +6 -3
  80. package/dist/core/runner/steer-admission.d.ts +11 -2
  81. package/dist/core/runner/stream-steer-verb.d.ts +5 -2
  82. package/dist/core/runner/stream-steer-verb.js +67 -14
  83. package/dist/core/runner/sub-agent-deny-lists.d.ts +8 -27
  84. package/dist/core/runner/sub-agent-deny-lists.js +22 -33
  85. package/dist/core/runner-deps.d.ts +4 -4
  86. package/dist/core/shell-run-candidates.js +3 -3
  87. package/dist/core/side-query.js +1 -1
  88. package/dist/core/skill-grant.d.ts +7 -0
  89. package/dist/core/skill-grant.js +14 -5
  90. package/dist/core/task-event.d.ts +14 -0
  91. package/dist/core/tool-policy.js +2 -3
  92. package/dist/core/tool-spec.d.ts +13 -3
  93. package/dist/core/user-attachment.d.ts +5 -1
  94. package/dist/core/user-attachment.js +11 -5
  95. package/dist/engine/harness/agent-harness.d.ts +19 -11
  96. package/dist/engine/harness/agent-harness.js +7 -4
  97. package/dist/engine/llm/types.d.ts +22 -10
  98. package/dist/index.d.ts +4 -2
  99. package/dist/index.js +3 -1
  100. package/dist/shell/lex.d.ts +50 -15
  101. package/dist/shell/lex.js +43 -9
  102. package/dist/tools/fs/fs-bash.js +3 -3
  103. package/dist/tools/fs/removal-targets.d.ts +8 -2
  104. package/dist/tools/fs/removal-targets.js +31 -4
  105. package/dist/tools/fs/shell-read-argv.js +7 -1
  106. package/dist/tools/fs/shell-read-bindings.d.ts +21 -5
  107. package/dist/tools/fs/shell-read-bindings.js +130 -44
  108. package/dist/tools/fs/shell-read-plan.js +95 -29
  109. package/dist/tools/fs/shell-read-sourced.d.ts +25 -0
  110. package/dist/tools/fs/shell-read-sourced.js +119 -0
  111. package/dist/tools/fs/shell-read-word.d.ts +2 -2
  112. package/dist/tools/fs/shell-read-word.js +4 -5
  113. package/dist/tools/fs/shell-read-workdir.d.ts +19 -3
  114. package/dist/tools/fs/shell-read-workdir.js +60 -15
  115. package/dist/tools/fs/shell-reentry-text.d.ts +10 -2
  116. package/dist/tools/fs/shell-reentry-text.js +11 -4
  117. package/package.json +2 -2
  118. package/test/export-surface.snapshot.json +13 -7
  119. package/wire-changes/core-stores-sql@7.66.0.json +30 -0
  120. package/wire-changes/core@7.66.0.json +1218 -0
  121. package/wire-changes/mods-kernel@7.66.0.json +65 -0
  122. package/wire-changes/primitives@7.66.0.json +30 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,257 @@
1
+ ## 7.66.0 — 2026-11-04
2
+
3
+ ### Errata to the 7.63.0 section (11-04)
4
+
5
+ - **#3355 node, "Claude Code 2.1.316" paragraph — the sentence "CC has no durable approval park" is untrue.** Claude Code 2.1.316 carries a worker-level parked-permission takeover (class `lS`, `cli316.js:288862`): `arm()` waits `answerWaitMs` — `CLAUDE_CODE_PARKED_PERMISSION_WAIT_MS ?? 2000` — then `fire("timeout")` retires the call. That wait is the takeover wait, not a card lifetime, so the comparison the paragraph wanted (a parked approval that outlives the worker, announced when the deployment reconciles — D-3355-a / D-3355-b in the divergence register) stands; the absence claim does not. Found by car-div-7660 registering D-3355-a/b (11-04); the car-3355 receipt carries the same erratum. Nothing in the package changes.
6
+
7
+ ### A deployment's delivery gate may narrow who reaches whom, and nothing downstream reads its list — the contract sentence `cross_session.gate_narrows_reach` in INTEGRATION-CORE §13.1b, and the known limit of a principal inbox nobody reads (#3538; behavior change: none — documentation only, no line of `src/` moved; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
8
+
9
+ - **Before.** The gate contract (INTEGRATION-CORE §13.1) said an unknown recipient and one the sender may not reach answer the same `not_member` bytes, and nothing said what a deployment may do with that room: whether the gate may keep a list of the senders a recipient accepts, what such a list releases and what it cannot, and whether it reaches the tool-question ladder. A deployment asked to let a household's agents write to each other without a person approving each letter had no sentence to choose between "put it in the gate" and "teach the engine's judge a sender arm". The picture behind that ask was also off: a cross-principal letter is never put to a person — the principal arm is a pure judgment, every cause it holds a letter with (`managed-setting`, `explicit-setting`, `invalid-setting`, `cross-principal-default`) sits outside `PEER_HELD_REVIEW_CAUSES`, and the receipt for it is `held_by_policy`.
10
+ - **Now.** §13.1b of `docs/INTEGRATION-CORE.md` states one contract sentence, `cross_session.gate_narrows_reach`: a deployment may narrow, inside its `OrgDeliveryGate`, who can write to whom beyond organization membership; a narrowing refusal is `org_delivery.not_member` with the same code and the same message bytes as an unknown recipient or another organization, given at the membership step, before anything is appended and before any quota is spent; the gate never writes a verdict on the record, so every letter it appends is judged at the recipient's drain by the principal arm like any other. Passing the gate therefore means "may be stored" and nothing more: it is not `next-turn` or `wake` (a recipient who set nothing still holds the letter as `cross-principal-default`), it releases no letter a setting holds, it is not retroactive in either direction (the judge reads the setting and the letter's `fromScope`, not a list), and a sender on a list mints no allow rule and clears no `mandated` question (`ruleClearanceOf` takes no sender). A listed sender's letter keeps every mark of a cross-principal letter: the `CROSS_PRINCIPAL_MESSAGE_NOTICE` block and the external-content accounting. The section also says who owns the answer: core holds no list of trusted senders, no judge arm keyed by the sender and no setting for either.
11
+ - **Narrowing / widening.** None. No line of `src/` changed; the sentence states what the gate contract, `judgeCrossSessionInbound` (`src/agents/cross-session-judge.ts`) and the ask ladder already do.
12
+ - **Wire / exports.** None.
13
+ - **Consumers.** @server: a gate that adds this narrowing answers `org_delivery.not_member` before the append and before any quota is spent, and keeps it to the membership step; a recipient who lists senders and sets nothing else still holds their letters as `cross-principal-default`, so the household path is two settings together — the list (who may be stored) and a principal-layer `next-turn` / `wake` (what a stored letter does); for a recipient who lists senders, a same-organization sender not on the list goes from "stored, held" to "refused", the deployment's own release point to name. @dgx: the grid the design asked for (principal, direction, scene, how fast a letter must be read, who may edit the row, what happens to letters already in the box on revocation) describes the list's data, which the deployment keeps; core reads none of it. @cli @client-core @test: no change; a test of the deployment's gate reads, as seen from outside, a sender outside the list getting the membership refusal with nothing appended or counted, a listed sender plus `next-turn` delivered, a listed sender with nothing set held, and a listed sender plus a managed `hold` held.
14
+ - **Rules.** None added or retired: the sentence states a rule the three parts it names already follow.
15
+ - **Claude Code 2.1.316.** No anchor (inferred): the reference's `ListAgents` description names only the caller's own subagents, team, other local sessions and cloud sessions (`cli316.js:268223`, `ListAgents`), so it has no cross-account lane and no sender list; this contract is this engine's alone.
16
+ - **Known limits.** KL-3538-a — a principal inbox declared `{ assistant: handle }` has a reader only where a leg runs under that handle and something continues it after an append (the sema-server deployment's side of it is inferred from a grep of its source, not run). The ticket's first wording ("core mints a principal lane only for `terminals`") described v7.65.0; since #2637 (this release) the leg whose host task id is the handle has a pull-only lane, so the row states the narrower fact.
17
+ - **Pins.** `test/docs-contract-pins.test.ts` — G1 §13.1b sits between 13.1 and 13.2 and carries the sentence's anchors · G2 the KL-3538-a row exists with five columns and names its two coordinates · G3 `org_delivery.not_member` is one of the gate contract's four words · G4 the principal arm reads the setting and `fromScope` only: unset holds `cross-principal-default`, an explicit value decides alike for every sender, managed beats user, a garbage value holds `invalid-setting` · G5 no setting cause is a review cause (`held_by_policy`) · G6 `ruleClearanceOf(ask, marks)` takes no sender and a mandated ask stays mandated · G7 an `{ assistant }` declaration lanes the one leg under the handle, compared exactly, and `terminals` lanes nothing on a leg with no session box.
18
+
19
+ ### The release lint reads the divergence register — every `D-…` number the release's CHANGELOG block and its post name must stand in `core/cc-parity/divergences.json`, and a count the post gives about the register is the register's (#3561; tooling only, no package surface: behavior change: none for the engine; hard-breaking: none; closed sets: none; exports: none; wire: no key added)
20
+
21
+ - **Before.** The legs of `scripts/ship-post-lint.mjs` asked whether the FEATS / AUDITS / PLANS / CAPABILITY ledgers moved for the release, and none read the divergence register. 7.64.0 and 7.65.0 shipped blocks that named a dozen `D-…` numbers while no divergence car had run, so the register held none of them, and the 7.65.0 post still wrote "car-div-7650 已登 +12" — the number of the window before, recalled instead of read. Nothing could be red.
22
+ - **Now.** A document leg, `checkDivergenceLeg` (it runs under `--no-build`, after the registry legs; `--internal-root <dir>` names the internal checkout, default the sibling `sema-internal` beside this checkout or the main one). (1) Each `D-<ticket>-<letters>` in the prose of the `## <package.json version>` block of the working directory's `CHANGELOG.md` and of the post (fenced blocks and HTML comments are not read) must stand in a string field of at least one register entry — an entry's `id` is a slug and the number lives in `decidedBy` (and in `surface` / `reason` of entries whose author wrote it there), so every string field is read and none specially. (2) A `+N` or `N 条` in a sentence of the post (a line cut at `。`; a `;` does not end it, and the count often stands after one) that names `偏离册` / `divergences` / `car-div-` must equal the number of the block's literals that stand in the register; the FAILED line prints the machine's list and number, and a post with no such clause gets the number printed to copy. (3) A block that is absent, and a register that is absent, not JSON or not an array, are FAILED (exit 1) — not a skip, not a warning. A register total (`555 → 567`) is another quantity and is not judged.
23
+ - **Rules.** +1 leg, the posture of the FEATS / AUDITS legs (the machine checks the cheap half — "is it written down?" — never whether the entry is right); the block is read with the one reader of versioned blocks (`versionedBlocks`), the prose with the one reader of a post's prose (`proseOf`). No rule retired; no second reading of either.
24
+ - **Known limits.** A number cited inside another entry's `surface` / `reason` also reads as registered, so the leg proves a literal is written down in the register, not that it has an entry of its own. A number that is not `D-<1–5 digits>-<1–3 lower-case letters>` (`D-S5`, a bare ticket) is not read. A count written in another unit ("12 个") or in a sentence that does not name the register is not read.
25
+ - **Pins.** `test/ship-post-lint-divergence-leg.test.ts` — G1–G7 (all registered and the count right; no count sentence, the number printed; non-literals and fenced / commented text not read; only this release's block; the number found in `decidedBy` / `surface` / `reason`; totals not judged; a number in another sentence of the line or in a fence not a count), R1–R5 (a literal missing from the register, named with where it stands; `+12` against eight; `N 条`; a count after a `;` is the sentence's; the count taken over the registered literals only; a `## ` line inside a fence or a comment does not end the release's block; an unreadable register in four forms; an absent version block, an absent or doubled CHANGELOG; the three real count sentences of posts 12584 / 12788 / 12941), W1–W4 (the CLI under `--no-build`: a missing literal is exit 1, the clean line is printed, an unreadable register is exit 1 and not 2, the leg is part of `allOk`); mutations M1a–M17 (the literal regex without either boundary or widened; the CHANGELOG cut into blocks before its fences are blanked; the register read through `id` only or `decidedBy` only; an absent / non-array / unparseable register as a skip; the count not compared; the whole CHANGELOG as the block; fences read; the leg left out of `allOk` or skipped under `--no-build`; totals judged; a sentence as the whole line, a `;` ending it; the post's own literals not judged; the count taken over every named literal; the `+N` form or the `N 条` form dropped; an absent version block not a problem), each red.
26
+
27
+ ### An attachment an extension refused says which extension refused it — `human_input{applied}`'s `attachments[i].declinedBy` names the `prompt.mention` extension whose `{ deny }` / `{ type: null }` answer, or whose failing handler, kept the attachment from the model (#2826; ruled C-R928 A; behavior change: none for a run that raised no `prompt.mention` — the frame of an attachment that reached the model, and every refusal no extension made, is byte-for-byte what it was; hard-breaking: none; closed sets: none; exports: none added or removed — one optional member on each of two exported types, below; wire: +1 optional member on `human_input.attachments[]`) (@cli @client-core @test)
28
+
29
+ - **Before.** An extension that refused a mention (`prompt.mention` → `{ deny: "…" }` or `{ type: null }`, or a handler that threw, ran past its budget or answered what the station refuses) kept the attachment from the model, and the engine said so to the model in the attachment's frame text — but the host's `human_input{applied}` frame carried only `{ ordinal, kind?, outcome: "not_attached", label }`. A host drawing the attachment row could say "not attached" and not who refused it (`notes: ["extension_declined"]` lives on the transcript record, not on the frame; test mods2809 W6).
30
+ - **Now.** `HumanInputAttachment` gains the optional member `declinedBy?: ExtensionRequester` — `{ kind: "extension", name }`, the author type the requester and rewrite records already use, built by the one reading `readExtensionRequester` from the registration name the dispatch names (`namedRegistration`: the engine's own origin word names no extension). Present on a `not_attached` attachment whose refusal an extension made — the producer of a decline answer, or the registration whose handler failed (the two outcomes that mint the `extension_declined` note with a name to give); absent on every attachment that reached the model, and on a refusal no extension made (a read rule's deny, the run's cancel, the engine's own fault). One projection builds it (`humanInputAttachmentsOf`), from a member the frame the leg just minted carries (`MintedAttachmentFrame.declinedBy`, the same fact one hop earlier — a projection chain, not a second record); the transcript record is unchanged.
31
+ - **Type face (additive).** `HumanInputAttachment.declinedBy?` and `MintedAttachmentFrame.declinedBy?`, both optional and read-only; nothing removed, retyped or made required. @cli @client-core: render a not-attached row's refuser from `declinedBy.name` when present ("not attached — refused by <name>"); a consumer that ignores the member sees the frame it saw before.
32
+ - **Known limits.** KL-2826-a (three forms carry the `extension_declined` note and no `declinedBy`: a cancel while an extension was judging, the engine's own violation, and a bad spelling handed down the chain — the dispatch does not say which handler handed it; present ⇒ named, the converse does not hold); KL-2826-b (the name exists only on the frame minted at the run, not on the persisted record: a replay surface rebuilt from records would show "not attached" without the refuser — none exists in core today).
33
+ - **Pins.** `test/backlog2826-declined-by.test.ts` — D1–D8 drive a real Runner and read the frame (a deny on a path, a host text and a host image; the attached controls; one refused and one attached in the same objective; a read rule's deny with and without a passing extension; two extensions on the chain; `{ type: null }`; a throwing handler and a forging one; the unnamed bad-spelling form), U1–U5 hand `readUserAttachments` each outcome kind the dispatcher can give (answered with and without a producer, failed by an extension and by the engine, aborted, the bottom's own refusal, a blank name).
34
+
35
+ ### A function body, a sourced body and a line `read` binds are judged where they run — the evaluator's re-entry and a child shell's literal text are callers, a file this command wrote and then sources is the text it sources, and a here-string's lines bound by `read` are the paths the body reads (#3399 / #3400 / #3401; behavior change: narrowing — seven forms that ran with protected bytes on the bypass seat are refused before the program runs; hard-breaking: none; wire: none)
36
+
37
+ - **Before.** Three places a body (or a path) runs were not read as that place, so a protected read inside ran unjudged on the bypass seat and was only the mandated question elsewhere (car-read-boundary-7630-a receipt §R; cx-readb Y2 / Y6; both trees since 7.62.0): (1) `f() { cat secrets/key.txt; }; cd .. && printf x | read 'a[$(f)]'` — the `read` builtin evaluates the subscript it is handed as a quoted literal, which runs `f` where the `read` stands, but the walk read callers only from unquoted substitutions; `export -f f; cd .. && bash -c f` — the child shell's literal text names the exported function, which runs its body where the launcher stands. (2) `printf 'f(){ cat secrets/key.txt; }\n' > lib.sh; . ./lib.sh; cd .. && f` — `source` ran text the station did not hold, so `f` was no function of the text and its call no caller. (3) `cd .. && while read -r p; do cat "$p"; done <<< secrets/key.txt` (a here-document alike, and `read -r p <<< X && cat "$p"`) — `read` left its name unknown, so the body's `cat "$p"` was an unresolvable word.
38
+ - **Now.** One callers set, grown by two forms (`segmentRunsBody`, `src/tools/fs/shell-read-workdir.ts`): the arithmetic text a segment hands the evaluator — an assignment word's subscript, or the subscript of a name a builtin binds (`read 'a[$(f)]'`, `unset 'a[$(f)]'`, quoted or not) — is lexed for a call, in THIS shell; and the literal text a child shell is handed (`bash -c f`) is lexed for a call to a function this shell EXPORTED before that segment (`export -f` / `declare -fx`, in order), which runs there, where the segment stands. A bare `source` / `.` of a file the segment IMMEDIATELY before it wrote with a literal printer and a `>` redirection — `printf FORMAT` converting nothing or `echo [-n] WORD…` with no escape; the write not reached through `&&` / `||` unless the source is `&&`-chained to it; the `source` carrying no redirection of its own — is spliced in place at the lexer's output (`src/tools/fs/shell-read-sourced.ts`): the written literal's segments stand where the `source` stood, and every reader (definitions, bodies, callers, bindings, the working-directory thread) reads them as the shell runs them. `read NAME` fed a text the command itself spells (a here-string or here-document — the loop's where its `done` carries it, by the one reading a group's input already takes) binds NAME to the text's first line — or, fed by a loop's `done` (each beat reads the next line), to one of its lines, a reader judged over every one (`readBuiltinLines`, `src/tools/fs/shell-read-bindings.ts`; held through the loop body as a `for` variable is); only the plain form is read — one identifier other than `HOME` (a home rebound from data is never placed, the 7.30.0 law), `-r` the only option, no `IFS` bound before it (earlier in the text, anywhere in a loop it sits in, anywhere at all in a text that defines a function, or in the text this one was started from) or in the command's environment, every text that may arrive literal — and a `read` the shell may not run (the builtin disabled where the text cannot tell, a redirection of its own that may fail to open) binds one more value the name may hold rather than replacing it, while one the shell cannot run at all (the builtin disabled for certain) leaves the name what it held; any other form leaves the name unknown as before. A pipe into the segment outranks the loop's input; nested loops take the innermost `done` that names one. The evaluator's texts a segment hands over include `let`'s words whole (their grammar is the evaluator's, not the shell's: every substitution a word spells is taken to run, KL-3399-c) and `(( … ))`'s whole expression, and a child shell's text includes the last text its standard input spells (`bash <<< f`, a here-document on descriptor 0 — the lexer now keeps a here-document's descriptor, so `3<<EOF` is not standard input — this retires the 7.49.0 reading in which every here-document counted as the child shell's standard input (pin #1417 ⑬ re-pinned: `echo … | bash 3<<EOF` plans nothing of the here-document, its script being the pipe's product) — what a loop's `done` feeds it; an output redirection on a loop's `read` leaves the loop's input its own; a descriptor closed or moved is not read, KL-3401-b).
39
+ - **#3557 (legB astra high · legA R-1, 11-04) — the splice reads, it never certifies.** The first cut replaced the `source` segment with the written literal's segments and read what they bind as certain, so `p=secrets/key.txt; cd ..; printf 'p=ok.txt\n' > /dev/null; . /dev/null; cat "$p"` was vouched on the bypass seat (`/dev/null` keeps nothing, the shell read `secrets/key.txt`), and the mandated question `. ./lib.sh` raised in v7.65.0 on the other seats vanished with the segment. Now (a) every spliced segment carries `LexedSegment.spliced`: its bindings are `detached` — one more value the name may hold, the #3536 floor law; its moves read as any move does (after `;` the unmoved place stays a candidate, under `&&` the read in the same text happens only where the move landed — the first cut's `never provable` clause over-refused that form and was shown redundant for the rest, D12); (b) a write to a device or to `-` is a write like any other — bash makes a file named `-`, `/dev/shm/x.sh` keeps bytes — so its text splices as detached text (the first cut excluded `/dev/*` and `-`, which let `printf 'cat secrets/key.txt\n' > -; . ./-` run on the bypass seat; codex astra r1); (c) the `source` segment itself stays after the literal's segments (connector `;`), so where the written text did not land (a failed or backgrounded write, `set -C`, a same-name file found on PATH) its own question about sourcing an unread file still stands; (d) a text the station does not hold — `eval`, or `source` of an unread file — is a may-have-run entry too: the name is unknown and what it held before stays its deny floor (it used to wipe the floor: `p=secrets/key.txt; . /dev/null; cat "$p"` ran on the bypass seat); a call or a loop head that may rebind a name still reads certain-unknown — the same hole through a call (`p=secrets/key.txt; f; cat "$p"`) is #3562, deferred because closing it re-pins six #1554 cells from a question to a refusal; (e) a `source` inside spliced text of a file that text wrote keeps splicing on the next pass, within the depth limit — only the retained `source` segment carries `LexedSegment.sourced`, the never-again mark (the first cut guarded on `spliced` and dropped `echo 'echo "cat secrets/key.txt" > inner.sh; . ./inner.sh' > outer.sh; . ./outer.sh` to an ordinary question; codex astra r1); (f) a call or a loop head INSIDE spliced text is a may-have-run kill too — `p=secrets/key.txt; cd ..; printf 'f(){ p=ok.txt; }; f\n' > /dev/null; . /dev/null; cat "$p"` kept the protected path on the bypass seat as the first cut's certain kill wiped it (codex astra r2); a call or loop head the text itself writes keeps the certain-unknown reading (#3562). **Narrowing — open to veto (@cli @server):** a spliced rebinding of a protected value to an open one (D4: `p=secrets/key.txt; cd ..; printf 'p=ok.txt\n' > lib.sh; . ./lib.sh; cat "$p"`, which bash runs reading `ok.txt`) and a spliced move away from a protected place (D6) are refused on both seats (pins D4 / D6 / N4: the bypass seat refuses, the default seat refuses rather than asks — the spliced rebinding is one more value and the protected value stays the floor) — the station cannot prove the literal ran; and a protected value read after an `eval` / `source` / call that may have rebound it is refused where v7.65.0 let it run (a deny floor, not a vouch). **Rules.** +2 bits (`spliced`, `sourced`), +1 parameter (`kill(…, spliced)`), −0 conditions (no device exclusion, no spliced-move clause); the floor law of #3536 now also governs an unread text's rebinding — one law, one more site, no new one (kills: #3562).
40
+ - **Fixed within this window (legC astra on 7ab4634f0; #3576 and #3566 by one rule).** The first cut read a call to a function as a certain kill of every name its body binds (#3562), whatever the body's own certainty — so a definition that came in as SPLICED text (it may never have happened) and a `local` the retained `source` segment made a builtin that may not run (`prefix`) both lost the outer name's deny floor at the call: `printf 'f(){ local p; p=ok.txt; }' > /dev/null; . /dev/null; f; cat "$p"` ran on 7ab4634f0 and was refused on 0715168f4 (the regression), `printf 'f(){ p=ok.txt; }' > /dev/null; . /dev/null; f; cat "$p"` ran on both (#3566). Now a call kills certainly only what the bodies certainly bind; a name a body MAY have bound (a `prefix` binding, a binding in spliced text) is one more value the name may hold — the #3536 law at the call — and the floor stands (pins D13 / D14 / D15; `functionMaybeBound`). One rule, no second one: a spliced `local` stays unrecorded (detached) and the may-bound reading at the call covers it (pin D16: a name the body also binds certainly is killed as certain). **Known limit (KL-3562-a, pre-existing on both trees):** a call still kills as certain every name ANY function body binds certainly — the call does not name its body — so an assignment inside a body that never runs removes the deny floor (`g(){ p=ok.txt; }; f(){ :; }; f; cat "$p"` runs on the bypass seat on 0715168f4 and here alike; the default seat asks). Same lever as #3562; fixed with it.
41
+ - **Narrowing — seven forms (open to veto, @cli @server).** On the bypass seat each of E1 (`read 'a[$(f)]'`), E2 (`export -f f; … bash -c f`), S1 / S2 (`. ./lib.sh` / `source lib.sh` of a file this command wrote), H1 / H2 (`while read -r p; do cat "$p"; done <<< FILE` / `<<EOF`) and H3 (`read -r p <<< FILE && cat "$p"`) is refused `read_boundary` before the program runs where v7.65.0 ran it with the protected bytes; on the default seat each is refused where v7.65.0 asked. The controls (an exported function never called, a subscript running a body that reads an open file, a sourced body reading an open file, a bound line naming an open file, a bound line printed rather than opened) answer as before. Widening: none.
42
+ - **Rules.** Callers: +0 (two more texts join the one set). Sourced text: +0 rules of reading (the literal's segments are read by every existing reader; `source` of a file the command did not write stays what it was — text run in this shell that the station does not hold). `read`: +1 (the plain-form binding), the loop's `done` redirection feeding its members is the group-input reading extended to loops (+0).
43
+ - **Claude Code 2.1.316.** The reference reads `source` / `.` and a child `bash -c` as shell text by their words (cli316.js:270088) and binds nothing from `read`; this reads the written file and the bound line.
44
+ - **Known limits.** KL-3399-c (the `let` word counts whole: a substitution bash's evaluator would reject is one more question); KL-3401-b (descriptor closes and moves are not read: the loop's lines stay the candidates); KL-3400-a (bash's `sourcepath` PATH search of a bare `source NAME` is not read: the file this command wrote at that spelling is taken as the text; a write not immediately before the source — another segment between — splices nothing, nor does one reached through `||`, one the source is `||`-chained to, or one reached through `&&` with the source not `&&`-chained, so `printf … > lib.sh; echo x; . ./lib.sh` stays what it was); KL-3400-b (a child shell fed an unquoted here-document that has expansions is not read as a caller — the re-entry itself is the mandated question on both trees, so nothing runs unjudged); KL-3401-a (`read` with several names, `HOME`, `-a` / `-d` / `-n` / `-N` / `-t` / `-u`, an `IFS` bound anywhere, or a text that may arrive through a pipe or a file leaves the name unknown — not read, as before); KL-3399-a (an `export -f` AFTER the launcher that names the function is not that child's); a move INSIDE the caller's own text — `bash -c 'cd .. && f'`, `read 'a[$(cd .. && f)]'` — places the body since the next section (#3530).
45
+ - **Pins.** `test/backlog3399-3400-3401-body-runs-where-callers.test.ts` — thirteen forms × bash truth × two seats (E1–E4 / S1–S4 / H1–H5; base column = stage-7660 `0d7033794`, branch column = this tree). #3557 adds D1–D11 (the astra `/dev/null` form, a shadowed printer, a failed write, the accepted narrowings D4 / D6 / D8 / D9, a device move, a spliced protected value as control, D10 / D11 the unread-text law alone — a source of unwritten text, an eval of unreadable text), N1–N4 (the nested source, the `-` file name, a call inside spliced device text, a spliced call that did run — accepted narrowing) and P10–P12 (the `source` segment stays after its literal; a nested source keeps splicing; a `/dev/shm` write splices); base column for D1–D11 / N1–N4 = stage-7660 `0715168f4`. The two program-read-model equivalence corpora register the nine HOME forms whose name operand the text cannot settle under the allowed class `3557-may-have-run-unknown-keeps-floor` (`test/fixtures/program-read-model-equivalence*.allowed.json`).
46
+
47
+ ### A body a text calls runs where that text's own walk stands at the call — `bash -c 'cd .. && f'`, `eval 'cd .. && f'`, `echo "$(cd .. && f)"`, `read 'a[$(cd .. && f)]'` place `f` in the parent directory — and a `{NAME}` redirection prefix is read the two ways bash reads it (#3530 / #3533; behavior change; narrowing — four, open to veto; widening — one, open to veto; hard-breaking: none; closed sets: none; exports: none; members: +1 optional on a root-reachable type — `StdinText.allocated?: true`, read from the root as `ShellReadSegment.stdin[].allocated` (the lexer's own `LexedRedirect` / `LexedHeredoc` +`allocated?: true` are internal); wire: one additive optional member) (@cli @server @test @client-core)
48
+
49
+ - **Before.** (1) A text a segment hands a shell — a child shell's literal `-c` text or standard input, a literal `eval` text, a command substitution, an evaluated subscript, a launcher's command (`env -C DIR bash -c f`) — joined the callers set as the segment itself: the body it calls was placed where the segment stood, so a move inside the text before the call (`cd ..`, `pushd ..`, a second shell inside) did not place the body, and on the bypass seat `export -f f; bash -c 'cd .. && f'` with `f() { cat secrets/key.txt; }` ran with the protected bytes (cx-readb F4 C1 / C2; both trees since 7.62.0). (2) The `{NAME}` prefix (`cmd {fd}<<EOF`, `{fd}<<<w`, `{fd}>out`) was recognized by a word test beside the redirection reader: a here-document's prefix was missed (its body counted as the child shell's standard input under every bash), a word with a blank before the operator (`echo {fd} >out`, an argument to bash) was taken as a descriptor name, and a child shell's text was read one way only — bash ≥ 4.1 allocates a descriptor (≥ 10) for the prefix and passes no `{NAME}` argument, so `bash <<< f {fd}<<EOF` runs the here-string, while macOS's `/bin/bash` 3.2 passes `{fd}` as a word and redirects the operator's default descriptor, so the same command runs the here-document.
50
+ - **Now.** (1) A segment's handed texts are read through their own walk (`segmentRunsBody` returns which texts run a body, `src/tools/fs/shell-read-workdir.ts:488`; `textCallers`, `src/tools/fs/shell-read-plan.ts:565`): the place the body runs is where THAT text's plan stands at its calls — started where the segment stands, or where a launcher puts the child (`launchedAt`, the reading the child's reads already take) — and nested texts read the same way at any depth; a text the station cannot read leaves the segment's own place a caller, as before. (2) The lexer marks a redirection or here-document whose operator the `{NAME}` word immediately precedes (`allocated`, `src/shell/lex.ts:1920`); the word stays a word, and `namesRedirectDescriptor` (`:1091`) / `descriptorNameWords` (`:1096`) read that one bit. A text on an allocated descriptor is standard input to bash 3.2 only: it replaces no pipe and no loop's input (`stdinTextsOf`, `src/tools/fs/shell-reentry-text.ts:429`; `loopFeedOf`, `shell-read-plan.ts:331`), and a child shell's text is read under both readings — bash 3.2's argv and input, and bash ≥ 4.1's (no `{NAME}` argument, the allocated texts not its input) — every text either one runs is read (`reenterShell`, `shell-read-plan.ts:1120`, the call that hands it the allocated texts too; `segmentRunsBody`), as a command's environment is read both ways; the name the prefix spells is the descriptor (≥ 4.1, a number the text does not settle) or what it held (3.2) — a binding that may not have run (`prefix`, `src/tools/fs/shell-read-bindings.ts`), and the binding table's walk (`tableAt`) now goes on past an unknown binding that may not have run, joining what the name held as its deny floor (the section below, #3536, joined only known values: an unknown one that may not have run ended the walk, dropping every older value). A literal `eval`'s own substitutions — in its redirections or prefix assignments (`eval : <<< "$(f)"`, `x=$(f) eval :`) — run where the `eval` stands, read as any segment's, and an own text the lexer cannot read (`eval 'cd .. && f' <<< "${x:-$(f)}"`) makes the segment's place a caller without losing the eval text's.
51
+ - **Narrowing — four (open to veto, @cli @server).** (a) C1–C10 (`bash -c 'cd .. && f'`, `eval 'cd .. && f'`, `bash <<< 'cd .. && f'`, `echo "$(cd .. && f)"`, `read 'a[$(cd .. && f)]'`, `bash -c 'pushd .. && f'`, `bash -c 'cd .. && bash -c f'`, a here-document's `$(cd .. && f)`, `eval 'cd ..; f'`, `env -C .. bash -c f`, and X8 / X9, a literal eval text beside an own here-string or here-document the lexer cannot read, with `f` reading a denied path; X9's bypass seat refused it before as a mandated question): on the bypass seat refused `read_boundary` before the program runs where v7.65.0 ran them with the protected bytes; on the default seat refused where v7.65.0 asked (measured on v7.65.0 and on the stage base `716d35301`, the same letters). (b) D1 / D4 / D6 / D8 / D10 (`bash <<< f {fd}<<EOF`, `bash -s <<< f {fd}<<< :`, `bash <<< 'cat secrets/key.txt' {fd}<<EOF`, an inner loop's `done {fd}<<< ok.txt` under an outer loop fed the denied path, `printf f | bash {fd}<<< :`; and X4, `p=secrets/key.txt; cd .. && : {p}>/dev/null; cat "$p"`, where bash 3.2 keeps `p` and reads the file — a miss on both trees before for `>` / `<<<`, which already took the name as the descriptor alone; X7 the same with every segment certain). (c) X5, `p=secrets/key.txt; cd .. && true || p=$(echo x); cat "$p"` — an unknown binding that may not have run (behind `&&` / `||`, a prefix to a special builtin, in a block that closed) no longer drops what the name held: refused on both seats where the base and stage-7660 with the section below (`9567faa58`) ran it with the protected bytes or asked (both measured). (d) The permission rules' tightening reader takes the program bash ≥ 4.1 runs behind a `{NAME}` here-document prefix: `{fd}<<EOF chmod 777 x` is a run of `chmod 777 x` (the base read `{fd}` as the program, so a deny on `chmod` did not reach it), and a `{fd}` word with a blank before the operator stays an argument (`echo {fd} >out`; probe on both trees): refused on both seats under both bash generations — where the host's bash is ≥ 4.1, v7.65.0 ran them with the protected bytes (bypass) or asked (default); where it is 3.2, bash itself reads nothing (it runs the other text) and v7.65.0 ran them clean or asked: the refusal there is the cost of reading both generations (KL-3533-a).
52
+ - **Widening — one, against the section above (open to veto, @cli @server).** K5 (`export -f f; cd .. && bash -c 'cd sub && f'`, `f` reading `secrets/key.txt` relative to where it runs): the section above (#3399) places the body where the launching segment stands (the parent, where the path is protected) and refuses it; it now runs where the child's text moved it (`sub`, where bash finds no such file) — the bypass seat runs it (bash's own answer: nothing read), the default seat asks the mandated re-entry question. Against v7.65.0, which read no child text as a caller, K5 answers as it did (V / M, measured): the release widens nothing. A body's reads also stand where it is written, so `bash -c 'cd sub && f'` launched from the project root (K4) is refused before and after.
53
+ - **Rules.** #3530: +0 — the handed texts were already the callers set; their call sites are now read by the text's own walk, which replaces the segment's position as that text's caller (one reading, not a union). #3533: +1 — one lexer bit at the prefix (a here-document's included), read by every reader that asked the word test, which retires; "an allocated text replaces no inherited input" is that bit's one consequence in the two stdin readers, and the name it spells is a binding that may not have run (+0, the existing `prefix` reading); the walk's one reading — a binding that may not have run is one more value the name may hold — now holds for an unknown value too (+0): the special stop of `tableAt`'s walk at an unknown binding that may not have run (#3536) retires — X5, `p=secrets/key.txt; cd .. && true || p=$(echo x); cat "$p"`, ran with the protected bytes on the bypass seat of stage-7660 `9567faa58` and is refused now; past the reader's bound (`WORD_VALUES_MAX`) the held values are let go oldest first, each name keeping its newest, instead of all at once (`wordFloorValues`), so the values the walk now joins past such a binding never crowd out a newer one it joined before (X10: a 64-value loop variable, `true || p=$(echo x)`, `true && p=secrets/key.txt`, `cat "$p"` — refused on stage-7660 and here, run on the base). Two call sites move to the bit's reader: `src/tools/fs/shell-read-bindings.ts:835` (the name the prefix binds, now a binding that may not have run, above) and `src/core/shell-run-candidates.ts:214` (the word left out of a program's arguments, unchanged in meaning — the tightening reader takes bash ≥ 4.1's program, so a `{NAME}` here-document prefix no longer hides it).
54
+ - **Type face (additive).** `StdinText` (the element type of the root-exported `ShellReadSegment.stdin`, `src/tools/fs/shell-reentry-text.ts:385`) gains the optional read-only `allocated?: true` (`:391`) — present on a text opened on a `{NAME}` descriptor (standard input to bash 3.2 only), absent on every other text; nothing removed, retyped or made required. @cli @client-core @server: nothing to read today; a consumer that ignores the member sees the segment it saw before.
55
+ - **Claude Code 2.1.316.** The reference asks any `{NAME}` redirection whole as too complex to read ("fd-variable assignment", `cli316.js:265916`; its detector `Bt` at :265920 takes a blank between the word and the operator too), and follows a plain `cd DIR` without `..` only (`cli316.js:270088`, `Dqe`; its role read from the body — inferred); it places no function body. This reads both bash readings and the caller text's moves.
56
+ - **Known limits.** KL-3533-a (both readings: a command the host's bash would run one way is judged by the other way's texts too — one more refusal or question, never a missed read). Pinned as observed, not this change: a child shell reading the input a group's closing `}` names (`{ bash; } <<< f`, `cd .. && { bash {fd}<<< :; } <<< f`) — the group's input is not read as its members' standard input, pre-existing on both trees (its own ticket); `read -u 3 p 3<<EOF` leaves the name unknown (KL-3401-a).
57
+ - **Pins.** `test/backlog3530-3533-caller-text-moves-allocated-fd.test.ts` — the shell truth, the bypass and default seats on a real Runner, for every form under `/bin/bash` and, for the `{NAME}` forms, under `/opt/homebrew/bin/bash` when present; base column = stage-7660 `716d35301` (v7.65.0 the same but K5, V / M there), branch column = this tree: C1–C10 LEAK / M → R / R, K1–K3 controls V / M both, K4 R both, K5 R → V / M, D1 / D4 / D6 / D8 / D10 LEAK / M (≥ 4.1) or V / M (3.2) → R / R, D2 / D3 R both, X1 / X2 (a literal `eval`'s own substitutions) and X3 (a `{p}` here-document) R both, X4 / X7 LEAK / M (3.2) or V / M (≥ 4.1) → R / R, X5 / X8 / X10 LEAK / M → R / R, X9 A / M (the bypass seat's mandated question refused) → R / R, X6 control V / M both, D5 control V / M both, D7 / D9 / G1 observed; the lexer cells L1–L4 and planner cells P1–P4 red on the base.
58
+
59
+ ### A binding that may not have run before a reader is a value its name may hold — the read boundary judges it as the unknown name's deny floor instead of dropping it, so `cd <proj> && read -r p <<< secrets/key.txt; cat "$p"` (`;` or a new line between) is refused on the bypass seat (#3536; behavior change: narrowing — twelve forms that ran with the protected bytes on the bypass seat are refused before the program runs, and one form bash runs reading nothing is refused, open to veto; widening: none; hard-breaking: none; closed sets: none; exports: none; wire: none) (@cli @server @test)
60
+
61
+ - **Before.** The binding table walks the bindings before a reader newest first and joins the value of each one that may not have run until it reaches one that certainly ran (`BindingThread.tableAt`). Where it reached the name's unknown start, or an unknown binding, instead, the values it had joined were dropped with it: the name read unknown, the word reading it was unplaced, and no deny row was asked. So on the bypass seat `cd <proj> && read -r p <<< secrets/key.txt; cat "$p"` ran with the protected bytes (car-cx-readb-7660 F1, both v7.65.0 and stage-7660; the `&&`-chained `… && cat "$p"` was refused, the read being certain in its own run), and so did every binding of that kind: reached through `&&` / `||` and read in a later run, a `prefix` that may not take effect (a `read` with a redirection of its own — `2>/dev/null` — or a declaration through a launcher), one in a branch that closed, a `for` variable past its loop, a function body's own conditional binding. The `prefix` reading ("one more value the name may hold") and the #3401 entry above held only above a binding that certainly ran.
62
+ - **Now.** Where the walk ends unknown, every value it joined stays the name's deny floor (`BindingTable.floorOf` — the slot an array element's spellings already use — read by `tableAt` in `src/tools/fs/shell-read-bindings.ts`), and a text nested at the reader (a substitution body) starts with it. The reader's word stays unresolved: a floor is no binding — an open value grants nothing (the default seat still asks), a protected one is refused before the program runs. A binding inside a subshell that closed before the reader leaves no floor (it is no binding for that reader); a certain binding after the conditional one settles the name as before.
63
+ - **Narrowing — open to veto (@cli @server).** Refused `read_boundary` on the bypass seat where v7.65.0 and stage-7660 ran them with the protected bytes (and on the default seat where they asked; the basis is in the last sentence of this paragraph): a `read` reached through `&&` or `||` and read after `;` or on a new line, a plain assignment reached through `&&` / `||` and read in a later run, a `read` with a redirection of its own, an assignment in a branch that closed, a `for` variable past its loop, a substitution body or an input redirection reading the name, a function body's own conditional binding. Accepted over-read: `cd .. && false && read -r p <<< secrets/key.txt; cat "$p"` — bash never runs the read and reads nothing — is refused. The removal guard's card for a declaration that may not have run names the declared target: `env declare TMPDIR=/ ; rm -rf "$TMPDIR/usr"` answers the dangerous-delete card for `/usr` where it answered the unverifiable-target card (denied in every arm either way). Widening: none. Basis: the walk this changes (`BindingThread.tableAt`) is v7.65.0's — `git diff v7.65.0 716d35301 -- src/tools/fs/shell-read-bindings.ts` has no hunk in it — so a plain-assignment form reads on v7.65.0 as on the pin's base column (stage-7660 `716d35301`), and a `read` form reads there as an unknown name, which ran as well (v7.65.0 binds nothing from `read`, #3401); measured on both trees for the `;` and new-line `read` forms only (car-cx-readb-7660 F1), on `716d35301` for the rest — v7.65.0's the same by this reading, not run.
64
+ - **Rules.** +0 for the reading: the one existing reading — a binding that may not have run joins one more value the name may hold — now holds where the name starts unknown too, instead of a silent exception that dropped the joined values there. No `read` and no `&&` special case; a loop variable's hold through its body (`certainUntil`) is unchanged. +1 at the floor reader's bound (`wordFloorValues`, 64 spellings a word): past it, the values a binding that may not have run left (`FloorValue.held`) are let go first, so they never crowd out a floor a binding that ran left — an array element's spelling beside sixty-four conditional values is still refused (codex review; without it that element, refused on stage-7660, ran).
65
+ - **Known limits.** KL-3536-a (past the bound the conditional values are let go oldest first — each name keeps its newest, since the section above (#3533) — until the word fits, the name unknown as before; among them the values the walk joined past an unknown binding that may not have run, a certain one included; a word whose own binding floors (an array's elements) are past it too has none, as before — an array of more than sixty-four elements included). KL-3401-a corrected (a conditionally reached `read` is a value the name may hold — its deny floor — not a name left unknown). A function body's reader of a name the text binds only AFTER the body's text (`f(){ cat "$p"; }; p=secrets/key.txt; cd .. && f`) is still unknown with no floor: the walk does not visit later bindings (a separate ticket).
66
+ - **Pins.** `test/backlog3536-conditional-binding-held.test.ts` — twenty-two forms × bash truth × two seats (C1–C22, C21 / C22 the bound's two sides; base column = stage-7660 `716d35301`, branch column = this tree) and seven planner readings (P1–P7: the floor is deny-only and placed where the reader stands, the operand stays unresolved, every joined value, past an unknown binding, not past a certain one, not from a closed subshell, an open floor settles nothing). Re-pinned (#1554's removal cells): `test/backlog1554-where-the-command-stands.test.ts` `declare-through-env-binds-nothing` / `declare-past-a-failing-redirection-binds-nothing` — unverifiable → dangerous delete, denied in every arm as before.
67
+
68
+ ### A compound assignment's value is read as the scalar assignments its elements are — `args=("$@")`, `files=($x)`, `local A=("$@")`, `declare -A M=([key]=v)` are no longer the mandated "could not be read as shell" question, and `a=(${p@P})` / `a=(${!n})` are refused on the bypass seat as `y=${p@P}` is (#2156; behavior change; widening — one, open to veto; narrowing — three, open to veto; hard-breaking: none; closed sets: none; exports: none; wire: one additive optional member) (@cli @server @test @client-core)
69
+
70
+ - **Before.** The lexer kept a compound value `NAME=(…)` one opaque piece (`unresolved: "compound_array_value"`) and the readers asked one textual predicate of it (`compoundValueHidesRun`, v7.65.0 `src/shell/lex.ts:996`): a `$` other than `$'`, a backquote, or a `[…]` naming a variable anywhere in the value made the read station ask its mandated question with the card "the command's text could not be read as shell…", the deny lanes read a hidden run and auto-background kept the command in front. An ordinary parameter (`"$@"`, `$x`) or an associative key could therefore not be answered by an allowed `Bash` or by a rule, while the value's own expansions never reached the plan's reader: `a=(${p@P})` / `a=(${!n})`, whose value bash re-reads as text, ran unasked on the bypass seat.
71
+ - **Now.** The lexer records each element as the scalar assignment bash performs for it (`NAME=E` for an element, `NAME[k]=v` for a keyed one — the subscript closing where the scalar assignment's does, so `[x[0]]=1` keys `x[0]`; an element that is itself a compound value, which bash refuses, leaves the value unsplit), and one reading, `assignedWords`, hands every reader those words: the read station's unreadable reading and its plan's expansion reader, the arithmetic reader (a keyed element's subscript follows the text's bindings as `A[k]=v` does), the bindings table, the deny lanes and auto-background. The lanes ask the lexer's one word predicate (`wordHidesRun`) instead of a body of their own; the lanes and auto-background read an assignment subscript through one clause (`subscriptHidesRun`). A compound form answers on every seat as its scalar form does; a value the lexer could not split into elements still answers "may run anything".
72
+ - **Widening — one (open to veto).** Ordinary expansions in a compound value are no longer asked: on the default seat they are the classifier's ordinary question (an allowed `Bash` or a rule answers it), on a pre-approved seat they run — `args=("$@")`, `files=($x)`, `local A=("$@")`, `declare -A M=([key]=v)`, `a=($(printf x))` (its substitution is read and its program judged, a denied read still refuses), `a=([i]=v)` and `A=(${v:x})` (a name the arithmetic evaluator reads from outside the text vouches, as the scalar `a[i]=v` does — KL-994o / KL-994p ⑥). An element the old text predicate over-read is vouched as its scalar is (`A=(f[ab].txt)`, `C=($'\e[0m' x)`). The deny lanes read `local A=($x)` / `readonly A=(${P@Q})` as `not_reached` (a plain parameter and a respelling transform run nothing). @cli @server: the card "the command's text could not be read as shell" no longer appears for these forms.
73
+ - **Narrowing — three (open to veto).** (1) The bypass seat refuses `a=(${p@P})` / `a=(${!n})` before they run, as it refuses `y=${p@P}`; and every seat refuses a bare compound's keyed element whose subscript names a variable the text binds to a denied read (`x='b[$(cat secrets/key.txt)0]'; A=([x]=1)`, as `A[x]=1` refuses) — v7.65.0 asked it on the default seat and RAN the denied read on the bypass seat. (2) An element the lexer cannot decode asks as its scalar does: `A=($'\q' ok.txt)`, `declare -a A=($'\170' b)`, `C=($'\033' x)`, `C=($'\x1b' x)` (an ANSI-C escape outside the thirteen letters is not decodable, C-R80 C-1; FIX8 vouched these because the value was opaque). (3) A scalar assignment whose subscript the deny lanes read as a hidden run (`A[x]=1 cmd`, `` A[`id`]=1 cmd ``) now keeps the command in front of auto-background, as the compound form already did.
74
+ - **Rules.** Retired: `compoundValueHidesRun` (the value's text predicate), the lanes' own word body, the bindings table's own compound split. Added: one element record in the lexer and one reading of it (`assignedWords`); the word predicate (`wordHidesRun`) and its subscript clause (`subscriptHidesRun`) are the lexer's, beside `expansionHidesRun`.
75
+ - **Type face (additive).** `AssignmentFact` (reached as `ShellReadSegment.argv[].assignment`) gains an optional `elements` member, present only on a compound value the lexer split: each element's word and the scalar assignment word it is read as. No member is removed or retyped; a compound value the lexer could not split keeps `unresolved: "compound_array_value"` and no `elements`. @server @cli @client-core: nothing to read today.
76
+ - **Claude Code 2.1.316.** The reference parser reads an array assignment's value as words, each element a word of its own (cli316.js:294902); this reads each element as the scalar assignment it is.
77
+ - **Known limit.** KL-994p ④ (rewritten): an integer attribute's value (`declare -ai A=($'\170')`, `declare -i A=$'\170'`) is still not evaluated by auto-background, and the deny lanes read the compound form by its whole text (conservative) and the scalar one `not_reached`.
78
+ - **Pins.** `test/backlog2156-2144-compound-value-and-removal-cwd.test.ts` C1–C4 / H1–H5 / S1–S4 / S6 / D1–D7 on three seats and the eleven-spelling equivalence cell (the v7.65.0 column read on that tree; eleven rows change: C1–C4, H1–H5, D5, D7); re-pinned per form to its scalar's reading (reason in each cell): `test/backlog994-s2-one-lexer.test.ts` FIX8 block (with the keyed-subscript and bounded-nesting cells), `test/backlog7300-shell-reentry.test.ts` (`A=($'\q' package.json)`), `test/backlog1102-read-station-semantics.test.ts` K-8 (`a=('b[$(cat …)0]'); echo "${a[0]}"` vouched again; the scalar spelling's environment-face refusal pinned beside it).
79
+
80
+ ### A removal's start directory stops being one of its working directories once the text proves the session's own shell left it — `cd <ws> && rm -rf <ws>/x`, the session standing in `<ws>/x`, is no longer the mandated dangerous-delete question (#2144; behavior change; widening — one, open to veto; hard-breaking: none; closed sets: none; exports: none; wire: none) (@cli @server @test)
81
+
82
+ - **Before.** The removal judge counted the call's start directory among the working directories of every removal in the text, even after a `cd` the text runs had moved the session's shell away: removing that directory from its parent (`cd <ws> && rm -rf x`, `cd <ws> && rm -rf <ws>/x`, `{ cd <ws> && rm -rf x; }`, `cd <ws> && (rm -rf x)`) was the mandated "would remove a workspace directory" question, refused on the bypass seat.
83
+ - **Now.** The start directory is a working directory of a removal unless the working-directory thread the read station already walks proves that the shell running the removal stands elsewhere — outside the start directory, neither it nor beneath it, by spelling and by the environment's canonical path (a link may lead back; a directory the environment cannot resolve, or no environment seated, proves nothing) — and is the shell the session goes on in — not a background job, not a text another shell runs (`bash -c '…'`; a nested plan keeps the start directory). A subshell's or a pipeline member's move does not move the session's shell (the walk keeps its place); `cd <ws>; rm -rf x` keeps it (the move may fail). One judgment per removal (`removalSeatAt`) over the walk the station already computes; the departure is proven through the resolver the judge already asks for the home (`ExecutionEnv.canonicalPath`); no new working-directory reading.
84
+ - **Widening — one (open to veto).** The four forms above run without the question, and so does a move through a link that leads outside the start directory; the session goes on in the directory the text moved to. With no execution environment seated (nothing resolves a path) the start directory stays a working directory: the four forms are asked as on v7.65.0. Still refused: `rm -rf <ws>/x` from inside it, `cd <ws>/x/child && rm -rf <ws>/x`, `cd <link to <ws>/x> && rm -rf <ws>/x`, `(cd <ws> && rm -rf x)`, `{ cd <ws> && rm -rf x; } & wait`, `cd <ws> | cat && rm -rf <ws>/x`, `bash -c 'cd <ws> && rm -rf x'`, `cd <ws> && bash -c 'rm -rf x'` (a text another shell runs keeps the start directory), `cd <ws>; rm -rf x`. @cli @server: the dangerous-delete card for these four forms no longer appears.
85
+ - **Claude Code 2.1.316.** The reference asks the same working-directory question (cli316.js:270072) and takes a removal's directory from one leading literal `cd X` joined by `&&` only (`Dqe`, cli316.js:270088-270089); this reads the station's walk, so it also follows a brace group's move and a move that is not the first command — divergence D-2144-a (registered; the operator may veto).
86
+ - **Known limit.** KL-2144-a: the directory the text moved into is not a working directory of its removal (`cd scratch && rm -rf ../scratch`), as on v7.65.0. KL-2144-b: the departure is proven before the text runs — a link the text itself builds back to the start directory and then moves through (`rm -rf <ws>/n && ln -s <ws>/x <ws>/n && cd <ws>/n && rm -rf <ws>/x`) is not seen (v7.65.0 asked it).
87
+ - **Pins.** `test/backlog2156-2144-compound-value-and-removal-cwd.test.ts` FP-a / FP-b / SUB-after / BRACE / OUT-link (v7.65.0 refuses, now runs), TP / TP-dot / TP-slash / TP-case / TP-alias / BACK-dash / BACK-tilde / BACK-old / BACK-cdpath / BACK-home / IN-child / IN-link / SUB / BG / PIPE / NEST / NEST-after / SEMI (refused on both), FP-c / FP-d / CTL / PIPE-rel (run on both), KL-2144-a (run on both), KL-2144-b (v7.65.0 refuses, now runs), and TP's default-seat card.
88
+
89
+ ### The origin clearances, their custody and the capture opt-out records are read and written through the governance store, and an erasure erases the custody of its entries' clearances; an engine whose backend carries a store refuses a control plane that still holds that store's records, and adoption removes the replica's copies once the carrier holds every one (#3484, #3463; ruled C-R1119 S2b, addenda 6 and 7; behavior change: for a backend that carries a governance store which is not the File store over the engine's control plane, these records now live in that store; narrowing — six, open to veto; widening — one, open to veto; hard-breaking: four, three sentences each below, open to veto — HB-2 (`listOriginClearances`), the capture record trio's retirement, the erasure carrier class (HB-6, type level), the clearance row's `custodyErased` (HB-6, type level, the row); closed sets: `STORE_FORM_REFUSAL_CODES` +1 (`memory.control_plane_strays`), `NON_GOVERNANCE_MEMORY_CODES` +1 (the same code, CONTROL-PLANE IO), `ERASURE_CARRIER_CLASSES` +1 (`clearanceCustody`); exports: −3, `markSessionCaptureOptOut`, `readSessionCaptureOptOut`, `listSessionCaptureOptOut`; members: `MemoryEngine.listOriginClearances` returns a Promise, `OriginClearanceRow` +`custodyErased?: true`, `MemoryErasureAttestation.residuals.carriers` +`clearanceCustody`; wire: one code added to a closed family, one optional row member, one attestation carrier key) (@server @dgx @cli @client-core @test)
90
+
91
+ - **Rule.** The last two record families of the control plane move onto the seat 7.64.0 laid down, under its one law: the origin-clearance account is the `origin-clearances` document and each clearance's custody text a `clearance-custody` object; a session's capture opt-out record is the `capture` object `<session>.json` (an occupant's own slot `<session>@<incarnation>.json`), minted through the same put-once reading as the pollution marker (`putControlObjectOnce`). With them no reader or writer of a control-plane record joins a directory name onto a control-plane path outside four places — the File store itself, the File backend over its own plane, the File layout's upgrade step, and the adoption verb — and a census pins that (`test/backlog3484-carrier-readers-census.test.ts`), which is what lets the adoption remove what it handed over.
92
+ - **Before.** In 7.65.0 the engine read and wrote `<its control dir>/origin-clearances.json`, `origin-clearance-custody/` and `session-capture-optout/` itself, whatever store its backend carried; the default capture carrier was the control-plane file trio (`markSessionCaptureOptOut` / `readSessionCaptureOptOut` / `listSessionCaptureOptOut`), synchronous. An erasure left the custody text of its entries' clearances standing (KL-3465-b). `adoptReplicaControlPlane` copied a replica's records into the store and removed nothing (#3478; KL-3465-c). `memoryGovernanceDurability` answered `"backend"` ⇔ the backend publishes a non-empty `controlPlaneRoot`.
93
+ - **Now.** The engine reads and writes the clearances and the capture records through `this.governanceStore` (the backend's `governance`, else the File store over its control dir) — for a File backend, and for a backend without a store, the same directories, names and bytes as before. The default capture carrier is that store's `capture` objects (`governanceCaptureRecordStore`, internal); `fileSessionCaptureRecordStore(controlDir)` keeps its name and is now the File store's `capture` objects at that directory — the same files — whose three legs answer Promises. `RunnerDeps.memoryCaptureRecordStore` is unchanged (an override seat beside the kind). A spawning ancestor's opt-out record is read through the carrier its plane keeps it in, in one order (`readAncestorCaptureOptOut`, `prepare-memory.ts`): ① a plane this run holds an engine over → that engine's carrier; ② the host's store for that plane (`RunnerDeps.memoryCaptureRecordStore`); ③ the File carrier at that plane, only when every plane this run holds keeps its records in the File store at its own control plane; ④ otherwise indeterminate. Adoption hands every record over first and then, only when nothing was refused, removes each replica copy that still reads back the digest it handed over (a copy that changed since is kept and refused; a removal that fails is refused; a re-run over an emptied replica answers `{ adopted: [], refused: [] }`); the receipt row and the `outcome` words keep their 7.65.0 meaning (#3478). The capture opt-out the delegation floor reads, `ToolExecuteContext.memoryCaptureOptedOut?: boolean | Promise<boolean>` (both forms were already in the type, `src/core/tool-spec.ts:1156`; 7.65.0 `:1155`), is now a `Promise<boolean>` on the default carrier — the 7.65.0 file trio answered a plain boolean (`engine.ts` defaulted to `fileSessionCaptureRecordStore(controlDir)`, whose `read` was synchronous). The tree's own readers take both forms (`prepare-inherited-gate.ts:785-787` forwards the answer and never folds it, `run-workflow-tool.ts:1346-1354`, `subagent.ts:5146`).
94
+ - **Narrowing — six (open to veto).**
95
+ 1. (HB-5) *An engine refuses a control plane that still holds its store's records.* Constructing a `MemoryEngine` whose backend carries a store that is not the File store over the engine's own control dir, while that dir still holds a governance document (a file or its journal) or a control object of any kind, throws `memory.control_plane_strays` (a store-form refusal; `detail.path` = the control dir; the sentence counts what stands by document and kind and names `adoptReplicaControlPlane`) — nothing is written. 7.65.0 opened such an engine, and every record in that dir was read by nobody. A dir that does not exist holds nothing and is not refused.
96
+ 2. (HB-6) *An erasure erases the custody of its entries' clearances.* For every resolved id a conflict did not keep standing, the clearance rows of that entry are marked first (`custodyErased`, with the time the erasure marked them, `custodyErasedAt`, the account's own; an inline text and the digest are dropped with it) and then each custody object is deleted — written once, and a name an erasure took does not come back: every update of the account deletes the custody object of every row it reads erased, so a move of an older writer's inline text that wrote it back at the same moment is undone by that same update (#3558, the section below); the attestation answers the class `clearanceCustody` (`removed` / `remaining`). A second erasure of the same entry removes nothing and leaves the row as it is. The row stays (who cleared, why, when, its events); its text does not: `listOriginClearances` answers that row's `entryText` as `""` with `custodyErased: true`, and a `clearEntryOrigin` that would resume it refuses `memory.origin_clear_unknown` naming the erasure. A pending row is not settled by the erasure. 7.65.0 kept the text.
97
+ 3. (A†, the session-account first read) *A session-account document still in the v1 key form is refused by its readers until the layout's upgrade converts it.* The conversion runs where it always has, in the File layout's adoption at mount, and now only when the engine's carrier is the File store over that dir (and in `adoptReplicaControlPlane`, before it hands the document over); the readers no longer convert on read. Cost, stated: on a control plane last written before 2026-09-11 and not yet mounted, a host that reads a session-account face before the engine's first mount gets `ControlPlaneCorruptError` instead of an answer — transient, the mount converts it. @server.
98
+ 4. (KL-3466-b retired) *A capture opt-out slot that stands as no readable object is not answered as a record that already stood.* A dangling link, a directory, an entry the store cannot read to tell: the mint answers that it could not be persisted (`unpersisted`, the pollution twin's answer since 7.65.0, #3466 narrowing 4), and the session still reads opted out. 7.65.0 answered `existed`.
99
+ 5. (Ancestry arm ④) *An ancestor whose plane's carrier this run cannot read is indeterminate.* A child's harvest whose spawning ancestor names a control plane this run holds no engine over, with no host store for it, while some plane this run holds keeps its records in a store other than the File store at its own plane, admits nothing ("the floor state is indeterminate and commits are suppressed fail-closed"). 7.65.0 read the File record at that coordinate — a file no carrier keeps.
100
+ 6. *A capture opt-out record is created owner-only (0o600)* — every File control object is (since 7.65.0, #3466 narrowing 3). 7.65.0 created it with the process umask (0o644 under the usual 022); a tool running as another OS user that read new records no longer can.
101
+ - **Widening — one (open to veto).** (HB-4) `memoryGovernanceDurability(backend)` answers `"backend"` ⇔ the backend carries `governance` (the File backend's is the File store over its own plane). Every record a consolidation reads now rides that store, the capture records its eligibility reads among them, so a backend that carries a store but publishes no `controlPlaneRoot` now admits `consolidation.multiNode` where 7.65.0 refused `config.memory_consolidation_replica_local`. Its one narrowing half: a host-built backend that publishes `controlPlaneRoot` but carries no store (none in core) now answers `"replica-local"`.
102
+ - **Hard-breaking — four, three sentences each (open to veto).**
103
+ - (HB-2) *What changed:* `MemoryEngine.listOriginClearances()` returns `Promise<OriginClearanceRow[]>` (it reads the store). *Who is affected:* a host that reads its answer without `await` — @server at `src/memory-operator-faces.ts:259-326` (the operator face's `listClearances`, which its note calls synchronous), `src/http/routes/memory-origin.ts:3 · :199 · :391` (the route that reads it in a synchronous `try`) and `src/http/server.ts:559` (origin/main `96a91d82`); none in the cli's or client-core's trees. *Compensation:* `await` it; the rows are the same rows.
104
+ - (The capture record trio) *What changed:* the package root no longer exports `markSessionCaptureOptOut`, `readSessionCaptureOptOut` and `listSessionCaptureOptOut`, and `fileSessionCaptureRecordStore(controlDir)`'s `mark` / `read` / `list` answer Promises. *Who is affected:* @server — `docs/core-consumption/LEDGER.json` carries the three as skip rows (`:11258`, `:11341`, `:12075`), `test/memory-capture-local-carrier.test.ts:36 · :178` imports and calls `readSessionCaptureOptOut`, and `src/plugins/store-backend.ts:842` hands core `fileSessionCaptureRecordStore(...)` (core awaits it; nothing to change there); the cli's and client-core's trees have no hit. *Compensation:* `await fileSessionCaptureRecordStore(controlDir).mark(sessionId, { at, reason, incarnation? })` / `.read(sessionId, identity?)` / `.list()` — the same files and bytes.
105
+ - (HB-6, type level) *What changed:* `ErasureCarrierClass` gains `clearanceCustody`, so `MemoryErasureAttestation.residuals.carriers` (a `Record` over the class) requires it. *Who is affected:* a host that builds an attestation itself — an evidence face of its own (none in the server's tree at origin/main) or a test double — and a host face run against `memoryBackendContract`, whose erasure clause now asks the ninth class too. *Compensation:* answer it `{ unverified: true }` and the engine answers it over the store its clearances live in, or count it yourself; `erasureStatusOf` reads a missing or unverified class as unproven.
106
+ - (HB-6, type level, the row) *What changed:* `OriginClearanceRow` gains the optional member `custodyErased?: true` — present on a row whose custody an erasure took, which `listOriginClearances` then answers with `entryText: ""` — so a projection of the row that accounts for every member by name has one it does not account for. *Who is affected:* @server — `buildClearanceRowWire` (`src/http/routes/memory-origin.ts:271`) and the face that guards it, `origin_clearance_row` (`src/trace/wire-projection-faces.ts:252-258`: `excluded: ["entryText"]`, `minted: ["custodyBytes"]`), both at origin/main `c672157c`: a core member that the projector does not forward and the face does not list in `excluded` breaks the face's keyset equation (`test/wire-whitelist-exhaustiveness.test.ts`) and, where the keyset guard reads this row, `tsc` (TS2344 — the server's own account of its guard, as for #3394 HB-1; this entry did not re-derive the guard's compile-time class); @cli @client-core only if one mirrors the row's type (Consumers below). *Compensation:* account for the member — forward it (`...(r.custodyErased === true ? { custodyErased: true } : {})` beside `custodyBytes`) or add it to the face's `excluded` column, one row of the guard's table either way — and read `custodyBytes` as 0 for such a row.
107
+ - **Consumers.** @server: HB-2 and the trio above; `OriginClearanceRow` gains `custodyErased?: true`, which your keyset guard on the clearance projection will name (TS2344; the fourth hard break above) — project it, and `custodyBytes` reads 0 for such a row; narrowing 3's transient refusal; a replica that ran over a store-carrying backend before this release holds records in its own control dir (any of the families) — run `adoptReplicaControlPlane(<that dir>, <the store>)` once before its first start on this release, or narrowing 1 refuses it. @dgx: narrowing 1 and the class `clearanceCustody` if you carry a store or build attestations. @server @dgx: a tool of your own that reads `ctx.memoryCaptureOptedOut` as `=== true` without awaiting it reads a pending answer as "not opted out" — `await` it (the effect is inferred: the member's only hits in the server's tree at origin/main `c672157c`, the cli's and client-core's are `memoryCaptureOptedOutNotice` comments, none reads the context member; dgx's tree was not scanned). @cli @client-core: no hit for the retired names; `custodyErased` if you mirror the row. @test — black box: an engine over a shared store with a stray `session-capture-optout/s.json` in its control dir is refused `memory.control_plane_strays` and writes nothing; after `adoptReplicaControlPlane` the dir holds no record and the same construction opens, and the session still reads opted out on every replica; erase an entry with a clearance ⇒ its custody object is gone, the row answers `custodyErased: true` / `entryText: ""`, a resume refuses `memory.origin_clear_unknown`; control: a File backend reads and writes `<control dir>/origin-clearances.json` and `session-capture-optout/` as before and is never refused.
108
+ - **Retired.** KL-3466-b (the two twin records read one damaged slot two ways; narrowing 4), KL-3465-b (an erasure left the clearances' custody; narrowing 2) and KL-3465-c (adoption copied and the capture readers still read the replica; both moved here).
109
+ - **Known limits.** KL-3484-a: each re-record leg of a clearance asks the account again right before it adds the entry back and refuses `memory.origin_clear_unknown` when an erasure took the custody meanwhile, but that read and the backend's add are not one step — an erasure landing exactly between them is undone (closing it needs a per-entry fence or a conditional add across backends). KL-3484-b: the adoption's removal re-checks the replica's copy, not the carrier's; a carrier object deleted between hand-over and removal is gone from both, deliberately — only an engine verdict deletes a carrier object, and keeping the replica's copy would hand it back on the next adoption.
110
+ - **Rules.** Retired: the engine's own spellings of the clearance and capture paths, the capture file trio, the session-account readers' conversion on read (the one converter is the layout's), the ancestry walk's File read at an arbitrary coordinate, and the adoption's keep-everything arm. Added: one reading of "this control plane is its own carrier" (`governanceStoreIsFileOver`: the same directory once resolved, or the same device and inode) asked by the strays judge, the layout's conversion and the ancestry walk; the adoption's removal phase; the erasure's custody step (one function, both lanes; it tries every matching clearance's object, an inline row's too); the re-record legs' one re-read of the account before each add (`clearanceCustodyErased`).
111
+ - **Claude Code 2.1.316.** No divergence of its own: the reference has no governance control plane (D-3407-a covers the seat).
112
+ - **Pins.** `test/backlog3484-control-plane-s2b-two-tree.test.ts` (21 cells, each red on 7.65.0 and green here but for three controls green on both: the clearance account and its custody in the carrier, and HB-2's Promise; the capture record in the carrier, its slot that stands as no readable object (narrowing 4), a File-backend control; the durability reading (HB-4), the strays refusal emptied by the adoption (narrowing 1) and a control, the adoption's removal of a handed-over capture record, a replica copy rewritten during the hand-over kept and refused; the custody erasure on both lanes and through a face that leaves the class out, a second erasure that leaves the row and its `custodyErasedAt` as they were, a pending erased row that does not resume, an erasure landing inside an in-flight clearance that is not undone, a row whose custody stood both inline and as its object, a control; the v1 session-account refusal (narrowing 3)); `memoryBackendContract`'s adoption clauses (a pass with no refusal empties the replica, a pass with a refusal removes nothing, a re-run over an emptied replica answers empty); `test/backlog3484-ancestry-by-carrier.test.ts` (arms ①–④ through `prepareMemory` and its harvest, one control); `test/backlog3484-carrier-readers-census.test.ts` (the four classes, the table's staleness, the census's discrimination; red on 7.65.0). Re-pinned to the carrier forms: `test/backlog3465-control-plane-carrier.test.ts` (C8 / C11 / C18 / C20 follow the removal law and narrowing 1; C20 still adopts, restarts and reads both markers), `test/design336-origin-clear-face.test.ts`, `test/design336-backfill-hardening.test.ts`, `test/design336-slice2-settlement-hold.test.ts`, `test/design383-capture-optout.test.ts`, `test/design383-capture-optout-rescan.test.ts`, `test/design511-capture-store-dual-form.test.ts`, `test/design511-session-memory-status.test.ts`, `test/backlog514-session-incarnation.test.ts`, `test/backlog1479-session-incarnation.test.ts`, `test/backlog900-governance-two-replica.test.ts`, `test/design178-v2b-erasure-evidence.test.ts`, `test/memory-layout-migration.test.ts`, `test/memory-projection-writeback-debt.test.ts`, `test/backlog1080b-writer-liveness.test.ts`, `test/backlog1080c-legs-and-undecided.test.ts`, `test/backlog1080d-leg-lifecycle.test.ts`, `test/backlog1080e-observation-edges.test.ts` (the File trio's calls go through `test/helpers/capture-records.ts`, which awaits `fileSessionCaptureRecordStore`).
113
+
114
+ ### A name an erasure took stays gone — every update of the clearance account deletes the custody object of every row it reads erased, so a move of an older writer's inline custody text that wrote an erased text back is undone by that same update (#3558; found by the 7.66.0 release review, leg B; ruled C-R1119 addendum 8; behavior change: an erasure's `clearanceCustody` answer holds for the store once the updates around it settle, and its `removed` counts the text its mark took whoever deleted the object; narrowing — one, open to veto; widening: none; hard-breaking: none; closed sets: none; exports: none; wire: no key added) (@server @dgx @test)
115
+
116
+ - **Rule.** Every update of the account — opening, marking or settling a clearance, `moveOriginClearanceCustodyOut` — deletes the `clearance-custody` object of every row it reads `custodyErased`: the rows its own callback read under the document's lock, or, when that update never ran (a put or the update failed before it), one more read of the account. The move's puts run before that read, outside the lock, so the read sees any erasure that completed in between; a row that still reads unerased there is marked later, and the erasure's own delete follows the put. The same rule finishes, at the next update, a delete an earlier one could not make. An erasure's `removed` counts each kept text its mark took once the object is gone — deleted by its own delete or already by an update that read the mark first.
117
+ - **Before.** In #3484 as first merged (unreleased; 7.65.0 never erased the custody, KL-3465-b) every update of the account put each inline text before taking the lock and dropped it from the row under the lock; an erasure that marked the row and deleted the object between the update's read and its put was undone by that put, the update then skipped the erased row, and the erasure had answered `{ removed: 1, remaining: 0 }` while the text stood as the row's `clearance-custody` object (an interleaving of the store calls; reachable on any account that still carries a row written before the text moved out).
118
+ - **Now.** The update deletes what it wrote back before it settles — also when its own callback refuses (a settlement of an unknown clearance), when a later put of the same update fails, and when a put publishes the name and then throws (the put's error is the answer). A resumed `clearEntryOrigin` whose tombstone mark could not delete (the engine goes on past that best-effort leg) has the delete made again by its settlement's update. Cost, stated: each account update makes one more delete per erased row — the rows of the clearances of erased entries, which the account keeps (it is append-only) — beside the read and write of the whole account it already makes.
119
+ - **Narrowing — one (open to veto).** An account update whose delete of an erased row's object the store refuses throws the store's error once every erased row was tried and after its own write landed — fail-closed: while the store refuses to delete an erased name, every clearance operation over that account is refused. Through `clearEntryOrigin` the call that throws is the settlement's update (the tombstone mark is best-effort and its refusal is passed over; the settlement deletes again and refuses), so the clearance does not answer done while the erased text stands. Before, no delete was attempted and the call settled. @server @dgx: a governance store whose `deleteObject` throws now surfaces through these calls.
120
+ - **Known limit.** KL-3558-a: a process that dies between the put and any read after it leaves the text standing under the erased row until the next update of the account (any clearance operation) or a replay of the erasure (by id) deletes it — the first erasure's answer was true when it was given.
121
+ - **Rules.** Added: one (an update deletes every erased row's object it reads). Retired: none. Not here: an erasure concurrent with the opening of a clearance on the same entry (#3559).
122
+ - **Claude Code 2.1.316.** No divergence: the reference has no governance control plane (D-3407-a).
123
+ - **Pins.** `test/backlog3558-custody-move-erasure-fence.test.ts` (16 cells; eleven red before this change and green here — the reported interleaving at the module and through the engine, the refusing update, the failing later put, the put that publishes and throws, the refused delete, one refused name that does not shield another row's delete, the resumed clearance whose mark could not delete, the erased name the store will not delete, the erasure's count when an update deleted first, and the next update that finishes a dead move's delete; five controls green on both — the reverse interleaving, an erasure between the put and the update, another writer's move, an interrupted move that re-runs, and KL-3558-a's replay).
124
+
125
+ ### A refusal for an ask nobody could answer says one thing about the durable park — after a park was attempted and failed, the refusal no longer also says "do not retry it in this session" (no approver) or "no durable approval gate is armed" (the approver answered `unavailable`) (#2158; behavior change: the model-facing refusal text in those two cells only; hard-breaking: none; closed sets: none; exports: none; wire: no key added) (@cli @test)
126
+
127
+ - **Before.** The base sentence of the refusal is minted by the ask resolver before the gate's deny exit knows whether a durable park was attempted for the call and failed, and it carried clauses that depend on that: the headless sentence said "do not retry it in this session", the `unavailable` sentence said "and no durable approval gate is armed". On a run with a park lane armed whose commit failed, the exit then appended the failed-park note ("a durable approval park was attempted for this call and could not be minted (…); with nobody to judge the call, that is why it stopped — it can be issued again once its park can be minted"). One paragraph said "do not retry" and "can be issued again" (no approver, park lane, commit fails), or "no gate is armed" and "a park was attempted" (approver answers `unavailable`, park lane, commit fails). A refusal a person gave while the park failed was never affected.
128
+ - **Now.** One mint for the base sentence of both causes, `unresolvedAskDenialMessage(cause, tool, question, parkFailed)` (`src/core/ask-origin.ts`, internal; the inverse `unresolvedAskQuestionOf` sits beside it and takes its stem from the same call). With no park attempt it is the sentence the resolver always minted, byte for byte — so a run with no park lane, and a person's refusal, read as before. When the deny exit finds a park attempted and failed, and the standing sentence is that refusal, it re-words the base over the very question the resolver quoted (an allow-rule note on the card included): the headless sentence without ", and do not retry it in this session", the `unavailable` sentence without " and no durable approval gate is armed". The failed-park note is then the only sentence about the park, so "do not retry" belongs to a run with no park attempt, "no gate is armed" to a run with no park lane, and "it can be issued again once its park can be minted" to a park that failed.
129
+ - **Behavior change (open to veto).** Only two cells change the text the model reads: no approver ∧ park lane armed ∧ commit fails, and approver answers `unavailable` ∧ park lane armed ∧ commit fails. The same refusal elsewhere (no park lane; a person refuses; the `delegation.ask_unresolvable` notice, which already followed `parkLaneExisted`) is unchanged. @cli @test: a probe that matches the old wording in those two cells mismatches.
130
+ - **Rules.** Retired: the two park-state clauses in the resolver's base sentences once a park failed; the `unavailable` arm's inline copy of its sentence. Added: one builder and its inverse, and the exit's one re-wording over them. The sentence's words are spelled once.
131
+ - **Claude Code 2.1.316.** No anchor for the park half: Claude Code's parked-permission takeover is worker-level (class `lS`, cli316.js:288862), with no durable park row. The headless sentence with no park attempt is the reference implementation's, unchanged.
132
+ - **Known limit.** KL-2158-a: the refusal of an intercepted inherited approval (`prepare-ask-lane.ts:242`) is not that template; if its call also had a park attempted and failed, its "no durable approval park is available" and the note still sit in one paragraph.
133
+ - **Pins.** `test/backlog2158-unresolved-refusal-park-state.test.ts` (cells A–E for the five causes, B′ for a multi-line question, F1–F3 for the builder and its inverse); mutations M1–M8, each red in the cell it names.
134
+
135
+ ### Inside a Runner task the delegation tool registers its background children in the registry the run reads — the one its leg end, TaskStop, ListAgents and teardown read; `background.registry` is optional and the out-of-task fallback only, and inside a task an option naming a different registry is refused at spawn, `config.invalid_task_registry` (#2280, KL-2160-d retired; ruled C-R1143; behavior change; narrowing — one, open to veto; widening: none; hard-breaking: none; closed sets: none — one new thrown code, `config.invalid_task_registry`, of the `config` class its prefix names (no registered set enumerates the delegation tool's spawn refusals; its sibling `config.invalid_checkpoint_store` is in none at that site either); exports: none; members: `SubagentToolOptions.background.registry` required → optional, +1 optional runner-filled `ToolExecuteContext.taskRegistry`; wire: none) (@server @cli @client-core @test)
136
+
137
+ - **Before.** The registry was the one member of the delegation tool's `background` bag that never looked at the run executing the tool: the owner reads `ctx.taskId ?? background.owner` and the checkpoint store `ctx.checkpointStoreForChildren`, but the children were always registered in `background.registry`, while every reader of the run reads the engine's one registry (`defaultTaskRegistry`). A host that wired a registry of its own got background rows no reader of the run sees: on a `multi_tenant` tree the leg end's owed-delivery reading (#2160, the cross-boundary rule) missed a child that had read beyond the device, so the next leg's device `Bash` ran without a person (test core756r1b ④); the run's TaskStop and ListAgents could not find the child; and the parent's end could not stop it, so a turn-scoped child kept running past its parent.
138
+ - **Now.** The engine hands the delegation context the registry its readers read, `ToolExecuteContext.taskRegistry` (Runner-filled, never a model or tool argument), and the delegation tool reads its bag once at the call's entry: the children live in that seat inside a task; outside one (a direct `execute`, an operator resume, a second simulated process) in `background.registry`, else `defaultTaskRegistry`. An option naming the run's own registry (the server's wiring) is accepted as before.
139
+ - **Narrowing — one (open to veto).** Inside a Runner task a delegation tool whose `background.registry` is a registry other than the run's is refused at every spawn: the call answers an error result with the sentence "background.registry is not the registry this run reads …", the child is not started, and the thrown value carries `code: "config.invalid_task_registry"` (the sibling of the bag's `config.invalid_checkpoint_store`). What a host that drops the option gets is what the server's wiring already had: its background children are the run's, so the spawner's end stops a child still running then (a grandchild never outlives the child that spawned it); a child meant to outlive the turn is declared session-scoped (`TaskSpec.backgroundScope: "session"`, direct children of that run). @server: none — `src/capabilities/scenarios.ts:319-320` passes `defaultTaskRegistry`, which is the run's. @cli @client-core: no delegation tool is constructed.
140
+ - **Rules.** Retired: the registry member's own reading (the one bag member read without the run). Added: one entry reading of the children's registry (`delegationRegistryOf`, beside the bag read once — the bag itself is never copied, so a host's class-written bag keeps its prototype members) and one refusal, the shape the checkpoint-store member already has. Every background registry read of the call is of that one value (the fork lane, the background lane, the entry-cap pool, the session reap hook, the parked lane's sink, the steer resume's registry).
141
+ - **Consumers.** @server: zero change; a host that wants children outside the run's registry runs the tool outside a task. @test (black box): the cross-boundary cell with a host registry of its own — on 7.65.0 the child's read beyond the device runs and the next leg's device `Bash` runs without a person; now the spawn is refused and nothing reads beyond the device. Same-shaped `registry` inputs remain on `createTaskStopTool` (`TaskToolOptions.registry`), `createMonitorTool` (`MonitorToolOptions.registry`) and the shell band (`src/tools/fs/fs-bash.ts:1020`) — engine-mounted with the engine's registry, a separate ticket.
142
+ - **Claude Code 2.1.316.** One session task table: a task is registered into and updated in the session state's `tasks` map through the same state setter (`cli316.js:267047`, minified names; the register / update reading is inferred), so there is no second registry for an agent to land in. Divergence D-2280-a (registered; the operator may veto): the reference refuses an in-process teammate that would spawn a background agent and a teammate that would spawn another teammate (`subagent_teammate_background_denied` / `subagent_nested_teammate`, `cli316.js:277006`), so it has no background grandchild that outlives its spawner (inferred from the two refusals); this engine allows the spawn and binds the child to its spawner's lifetime (C-R1143).
143
+ - **Pins.** `test/backlog2280-delegation-registry-seat.test.ts` — direct execute, seat present: option left out / explicit `undefined` / the run's own registry (control) / a different registry refused; seat absent: a registry of its own (control, a second process) / left out ⇒ the engine's registry; real Runner: left out ⇒ the row is where the leg end reads and the parent's end stops the child / the engine's registry (control) / a registry of its own refused, no child started. `test/backlog2159-cross-boundary-bit-on-run.test.ts` "#2280" — left out ⇒ the next leg's device `Bash` is a person's; a registry of its own ⇒ no read beyond the device runs. A class-written bag (prototype `notify` / getter `scope`) launches in the background inside and outside a task. 7.65.0: 11 of the 16 new cells red; the three controls and the two class-bag cells green. Re-pinned (the cells rode the split — on 7.65.0 the same cells are red when the bag names the engine's registry, the server's wiring): `test/rb375-a2-descendant-terminal-anchor.test.ts` PIN ① / ⑦ (a grandchild outliving its spawner) → ①′ the spawner's end stops it and its terminal reaches the root run / ⑦′ a session-scoped middle child, the grandchild stopped at its end, the terminal reaches the root session's next run / ①″ the private-registry wiring refused; `test/backlog1599-delegate-auto.test.ts` ⑥b and `test/backlog1602-child-scope.test.ts` ① (background child parking after the parent's run), `test/backlog2181-delegated-child-parent-session-rules.test.ts` and `test/backlog2208-session-rules-children-read-live.test.ts` (a looping background leg) — session-scoped children, and at depth 2 the middle leg waits for the grandchild; 50 files drop the bag's registry, and the cells that run the tool outside a task keep a registry of their own.
144
+
145
+ ### The assistant reads its principal inbox — under `principalInboxConsumer: { assistant: "<handle>" }` the leg that runs as that handle mounts an external `ReadInbox` over the scope's principal inbox, and the inbox is read only through it: no letter arrives at a turn boundary (#2637; ruled C-R1149 K10 and its addendum (a)–(e); behavior change: an assistant deployment's letters become readable on the assistant's leg; hard-breaking: none; closed sets: none registered (the wire manifest lists `ReadInboxToolOptions.coversPrincipalInbox` +`"pullOnly"`, additive); exports: none added or removed; wire: one root-exported option widened) (@server @dgx @cli @client-core @test)
146
+
147
+ - **Before.** An assistant deployment declared its consumer and no leg of the engine consumed the box: the lane's predicate (`terminalsDrainPrincipalInbox`) answered `true` for `"terminals"` only, the drain bound only on a leg with its own session box, and `ReadInbox` mounted only there, local, reading that session box. A letter the delivery gate minted for the assistant waited in `principal.inbox` with no reader in core (design/972b §8 S2 ①: the true prerequisite of a deployment's assistant ↔ digital-person inbox).
148
+ - **Now.** One binding judgment per leg, `peerDrainLanesOf(deps, { sessionBox, hostTaskId, sessionId })` (`src/agents/peer-session-drain.ts:90`), read by both the drain bind (`src/core/runner/prepare-wiring-manifest.ts:751`) and the `ReadInbox` mount (`src/core/runner/prepare-delegation-surface.ts:305`): `"terminals"` ⇒ a `"drain"` lane on every leg with a session box (as before); `{ assistant: handle }` ⇒ a `"pullOnly"` lane on the one leg whose host task id (`rowTaskId ?? spec.taskId ?? sessionId`) is exactly `handle`, delegated or not, over a mailbox that declares cross-process safety, on a session id the peer address grammar accepts (the lane's queue and its host review face are seated by that address, as the session box is). A pull-only lane is claimed, settled and acked at every turn boundary like any lane, and its delivery half runs only on a `ReadInbox` pull (`peer-session-drain.ts:1087`); a delegated assistant leg drains no session box of its own (the drain's `sessionBox: false`, the delegated-child gate unchanged). On that leg `ReadInbox` declares `contentOrigin: "external"` and its description says the inbox is read ONLY through it and that its letters never arrive at a turn boundary (`coversPrincipalInbox: "pullOnly"`, `src/agents/read-inbox-tool.ts:39`). A held letter a person approves on that lane is handed over by the next pull, never by a boundary, and a card that leaves the queue without a decision (shutdown, eviction, an inject that throws) writes nothing to the box — the letter stays `held` for the next reader (Q3 A, unchanged).
149
+ - **No inbox count at the boundary.** The turn boundary does not announce how many letters wait on a pull-only lane (addendum (d)); the assistant reads on its own initiative, and a host that wants a wake continues the assistant's row (§13.4).
150
+ - **Widening — one (open to veto, @cli @client-core).** `ReadInboxToolOptions.coversPrincipalInbox` widens from `boolean` to `boolean | "pullOnly"`; `true` keeps its face byte for byte. Model-facing text changes on the pull-only leg only: its trailer reads "call ReadInbox again (letters in your principal inbox are read only here: none of them arrives at a turn boundary)" in place of "or they arrive at your next turn boundaries". The four repositories' `origin/main` read this option nowhere outside core (receipt).
151
+ - **Narrowing — one (open to veto, @server).** The consumer declaration is now read on a leg with no session box of its own (a delegated leg over a cross-process-safe mailbox), so a malformed `principalInboxConsumer` fails that leg's prepare too with `config.principal_inbox_consumer_invalid` (`detail.reason: "malformed"`), where 7.65.0 read it only on legs with a session box. A server whose boot already refuses a malformed value sees no change.
152
+ - **Consumers.** @server @dgx: the assistant's leg must run with `rowTaskId` or `spec.taskId` equal to `principalInboxConsumer.handle` (exact, case-sensitive); no leg in the server tree runs under that handle today (inferred from reading `origin/main`), so the configuration face is a ticket of the deployment's. A mailbox that does not declare cross-process safety, or a host session id outside the peer address grammar (`chat:42`; the session box's mount names that refusal as `config.peer_lane_unmounted` when a directory is wired), mounts no lane there (the same posture as the terminals' lane). @test (black box): the assistant leg pulls a gate-minted letter and the model reads it in the next request; a turn boundary on that leg never carries it.
153
+ - **Rules.** Retired: `terminalsDrainPrincipalInbox` and the two copies of the binding condition (bind site, mount site). Added: one binding judgment and one lane mode bit (`Lane.pullOnly`), with the drain's `sessionBox: false` as the second fact a delegated assistant leg needs (it cannot be left out: that leg has no session box to drain). Net −1.
154
+ - **Claude Code 2.1.316.** No anchor: the reference has no cross-principal inbox and no principal lane.
155
+ - **Pins.** `test/backlog2637-assistant-principal-lane-pull-only.test.ts` — real Runner: P1 (terminals control), P2 (the assistant leg's boundaries never carry the letter; the box is claimed; `ReadInbox` external, read-only-here wording), P3 (a pull reads it, `from-scope`), P4 (a delegated background child with `rowTaskId` = handle reads it and claims no session box), P5 × 5 not bound (another handle, a sync child, a fork child, the handle in another case, terminals on a delegated leg), P6 (a mailbox without cross-process safety), P10 (malformed declaration on a delegated leg), P11 (a session id outside the address grammar: the leg runs, no lane); drain: D1 (a decision between pulls is delivered at the next pull, not at a boundary), D2 / D3 (shutdown and eviction leave the letter `held`), D4 (an inject that throws in drain mode), D5 (acked after a pull), D6 (boundaries inject nothing), D7 (a drain with no lane is refused at construction); F1 (the two face texts).
156
+
157
+ ### A model entry's default thinking tier may be `off`, and every engine lane reads the one chain request > role > model default — a request that names no tier on a model whose default is off carries the explicit off (a Qwen chat template's `enable_thinking: false`), and a default that is not one of the seven tiers is refused where the model is received (#3394; ruled C-R1148, addendum 1; behavior change; narrowing — one, open to veto; widening — two, open to veto; hard-breaking: one, three sentences below, open to veto — HB-1 (type level); closed sets: none; exports: none; members: `Model.defaultThinking` takes the seven tiers (`"off"` added; `compat.reasoningEffortLevels` / `effortLevels` unchanged, six); `ResolvedRole.thinking` now includes the model's default; wire: no key added or removed — the manifest reads 0 type keys moved; the member's value type widens) (@server @ss @dgx @test)
158
+
159
+ - **Rule.** A model's default tier is `Model.defaultThinking`, the tier its requests take when neither the request nor its role names one, and it is read in one place: `resolveTaskModel` answers `ResolvedRole.thinking` = request > role > model default on both of its branches, and the run, a side query, a compaction pass and the next-prompt suggestions read that answer. `"off"` is one of its tiers — the request then carries the wire's explicit off where the wire spells one — and is not "no default": absence is no default, and a request with no tier anywhere writes no thinking key, so the provider's default governs. The member takes the seven tiers; the effort ladders a model declares stay the six enabled tiers, so off is never a rung the clamp compares against.
160
+ - **Before.** In 7.65.0 the member was typed with the six enabled tiers, so a model could not declare a default off (a host read off as "no model-level default"); the chain was spelled three times (`prepare-config-doors.ts`, `side-query.ts`, `compact-session.ts`); the suggestions pass read `ResolvedRole.thinking` for its role-resolved model, which skipped the model's default, and folded an explicit off into absence (on a default-on gateway it thought); a `defaultThinking` outside the seven tiers was read as no tier at all — every request on the provider's default, disclosed only as a `dropped` resolution on the trace.
161
+ - **Now.** `Model.defaultThinking?: ModelThinkingLevel`. The three spellings read `ResolvedRole.thinking`. The suggestions pass forwards the tier as resolved, off included, as the compaction lane's options builder already did. The default is clamped exactly like a request's own tier (`max` on a stock endpoint ⇒ `high`; `high` over a declared `["low", "medium"]` ⇒ `medium`) — a default outside the declared ladder is not refused, one reading of one value.
162
+ - **Narrowing — one (open to veto).** *A `defaultThinking` that is present but not one of `off, minimal, low, medium, high, xhigh, max` is refused at the model door* — `config.unknown_role` with `detail` `{ field: <the seat>, reason: "not_a_model_ref" }`, the sentence naming `defaultThinking`, the value and the seven tiers: a typo'd word, a number, `""`, `null`, a case variant (`"OFF"`), a list, an object. At a task's own model the task fails before any request; at a catalog entry it is a construction error of the `Runner` (and of `swapDeps`), like every entry the door judges. 7.65.0 accepted it and sent nothing.
163
+ - **Widening — two (open to veto).** (1) A model may declare `defaultThinking: "off"`, and a request that names no tier then carries the explicit off: on a default-on gateway it stops thinking. (2) `ResolvedRole.thinking`, a root-export answer, now includes the model's default (zero readers in the server's, cli's, client-core's and test's trees — the server's `resolveTaskModel` is its own); a host that appended `?? resolved.model.defaultThinking` gets the same tier.
164
+ - **Hard-breaking — one, three sentences (open to veto).** (HB-1, type level) *What changed:* `Model["defaultThinking"]` is `ModelThinkingLevel` ("off" and the six tiers), no longer the six enabled tiers. *Who is affected:* @server — `src/model-compat.ts:50-51` derives `ModelThinkingLevel = NonNullable<Model["defaultThinking"]>` and keys `THINKING_LEVEL_TABLE: Record<ModelThinkingLevel, true>` (six entries) by it, the same type that types `reasoningEffortLevels`, so it fails to compile (server's reading, 11-03; `src/model-compat.ts:42-43` at origin/main `96a91d82`); `web-admin-client/apply-effective.ts:37` derives the same type. *Compensation:* split the two types — the default takes `Model["defaultThinking"]` (seven), the ladder `NonNullable<OpenAICompletionsCompat["reasoningEffortLevels"]>[number]` (six).
165
+ - **Consumers.** @server: HB-1; your reading of `MODEL_DEFAULT_THINKING=off` as "no model-level default" (`config.ts:2118-2119 / :2204 / :2530`, `config-catalog.ts:558-563`, `web-admin-client/apply-effective.ts:37 / :72 / :123`, server's reading, 11-03) is the server half of dgx's ask: mint `defaultThinking: "off"` for it and the engine sends the off; the A2A `message/send` path already falls to this chain when it sends no `thinking`. @ss: the roster `ModelEntry` has no `defaultThinking` key today (the declaration face a roster or a `models.json` entry needs; ss 21.0.0 ticket). @dgx: a catalog entry you build for the brain sidecar may declare `defaultThinking: "off"`; one outside the seven tiers is now a construction error. @test — black box: a Qwen chat-template model with `defaultThinking: "off"` and a request with no `reasoningEffort` ⇒ the request body carries `chat_template_kwargs.enable_thinking: false`, a request with `"high"` ⇒ `true`, a model with no default ⇒ no `chat_template_kwargs`; `defaultThinking: "of"` on the task's own model ⇒ the task fails `config.unknown_role` before any request.
166
+ - **Rules.** Retired: the chain's three re-spellings, the suggestions pass's off-fold. Added: the model door's judgment of one member (the existing refusal, no new code).
167
+ - **Claude Code 2.1.316.** A per-model default effort exists: `Hcr` (`cli316.js:264811`) resolves a model's default as the user's setting or a remote flag, then the served capability `default_effort` (used only when it is an effort word the model supports, else the next source, silently), then a static table's `default_effort ?? "high"`; its effort set is `["low","medium","high","xhigh","max"]` (`cli316.js:260980`), with thinking off on a separate axis. Divergences: D-3394-a — the model default may be `off` (sema's one seven-tier knob, design/96); D-3394-b — a default that is not a tier is refused, not skipped (the bad-values-loud rule, #123).
168
+ - **Pins.** `test/backlog3394-model-default-thinking.test.ts` (19 cells: W1 the dgx case, W2 the qwen key and deepseek's disabled form, W3 a request's tier wins, W4 absence writes nothing, W5 the clamp, W6 off never a ladder rung and the read face lists no off; R1 / R2 the model default on both branches of `resolveTaskModel`, R3 role > model default and request > both, R4 none ⇒ undefined, R5 a side query sends the default off; S1 the suggestions producer forwards off, S2 the summarize-role model's own default reaches the pass, S3 the task model's default off reaches it; D1 a typo'd word, D2 six wrong shapes, D3 the seven tiers and absence received, D4 a catalog entry refused at construction, D5 a task's own model refused before any request). 7.65.0: 9 red (R1, R2, S1, S2, S3, D1, D2, D4, D5), 10 green (the W cells — off already reached the wire at runtime, only the type and the hosts' reading of it kept it out — R3, R4, R5, D3).
169
+
170
+ ### An extension can hand its own leg a prompt — `$.prompt.submit({ text })` enters the leg the way a person's typed input does, through the leg's one steer relay, under its own author word `extension`: screened, framed for the model as the extension's, never counted as the person's (#3539, #3284; ruled C-R1150 K1–K10 and addendum ①; behavior change: none for a deployment no extension of which calls `$.prompt.submit`, but for the two narrowings below; hard-breaking: four, below; closed sets: `InputAuthor` +1 `extension` (and registered); exports: +1 type `PromptSubmitAnswer`; wire: +2 optional members on `human_input` (`author`, `extension`); mods contract 8 → 9) (@server @cli @client-core @test)
171
+
172
+ - **Rule.** One input path, one author table. An extension's prompt is an input like the person's: `$.prompt.submit` reaches the leg's steer relay — the one `TaskStream.steer` and an observer's report run through — under the author `extension`, and every fact the engine knows about an input's author is one row of one table (`AUTHOR_ROWS`, `src/core/input-author.ts`) with three columns, each read by its own readers: `screened` (the prompt screen runs on it), `countsAsOperator` (the person's account, the durable park, the hold of a stopped run, the drain after it) and `frame` (how the model reads it mid-run). The relay raises `prompt.submit` once, `classic.UserPromptSubmit` in its bottom, under the caller's frames and origin, so the caller's own handlers stay out of both stations; what the screen lets through waits for the would-otherwise-stop seat (`later`) and starts a turn in the person's place.
173
+ - **Before.** An extension could not hand the leg a prompt (`$.prompt.submit` was "not callable on the engine bus in this version"). The author table was one set (`COUNTS_AS_OPERATOR`) whose one predicate also decided screening; an observer's report reached the model under the person's mid-turn header ("The user sent a new message while you were working:"); the `human_input` frames named no author; the steer relay's refusals rejected.
174
+ - **Now.** `$.prompt.submit({ text })` (declared in `uses.calls`) answers when the input is taken: `{ text }` (what entered — the caller's text or the screen's rewrite) or `{ drop: <reason> }` (the screen refused it, the run stopped on the person's own refusal and they have not spoken since, the run is not live, the call was cut before the input was taken, or no running leg takes a prompt here). It takes `{ text }` alone (any other member — `asUser`, `attachments`, `priority`, `inputId` — or an empty text throws a TypeError); a `/` text is a prompt. A call from a handler the leg is waiting on before it can take the input throws at once (a handler of the prompt's screen; any handler while the loop has not begun taking input — `session.start`, `classic.SessionStart`, `classic.SubagentStart`, the objective's screen), where the relay would otherwise wait on itself or out the 30 s birth window. The model reads it as `The extension "<name>" sent a message:` with the reference's own two facts (`cli316.js:261046-261048`). The `"queued"` and `"applied"` `human_input` frames carry `author: "extension"` and `extension: <name>`; an observer's carry `author: "observer"`. A child leg's extension submits into the child's own stream. `Runner.compactSession`'s `$` answers it unavailable. INTEGRATION-CORE §10.17.
175
+ - **Hard-breaking — four, three sentences each (open to veto).**
176
+ - (HB-1, type level) *What changed:* `InputAuthor` (`INPUT_AUTHORS`) gains `extension`, so a `Record` over it or an exhaustive switch on it lacks a row, and `HumanInputEvent["author"]` admits it. *Who is affected:* a host that tables the words itself — none in the server's (`c672157c`: one comment, `src/boot/runner-deps.ts:98`), the cli's (`ecfc687a`) or client-core's (`2e5f328`) trees at origin/main. *Compensation:* add the row; render `extension` as the extension's input, never the person's.
177
+ - (HB-2) *What changed:* the mods kernel contract is 9 (`KERNEL_CONTRACT_VERSION`); `loadModPackage` refuses a package that declares 8; the engine `$` (`EngineDollar`) gains the required `prompt` namespace (`prompt.submit`) and the leg facade's seats (`LegFacadeSeats`, reached through `ResumeRun.legMods.bindFacade`) the required `promptSubmit` entry. *Who is affected:* every mod package a deployment loads — @server reads the engine's number at load (`src/boot/deployment-mods.ts:111`), @client-core keys its kernel identity on it (`src/modsKernelIdentity.ts:129`); a test double that implements `EngineDollar` or builds the facade's seats itself. *Compensation:* re-declare `"contract": 9`; give a hand-built `$` a `prompt.submit` (or cast it, as such doubles do) — nothing else in a package's surface changed but the two pinned keys of HB-4.
178
+ - (HB-3, type level) *What changed:* the handler variant of `ModFrame` carries `event` (the event the handler runs on), minted at one place (`handlerFrame`, `src/core/mods/kernel/dispatch.ts`). *Who is affected:* a host or a test double that builds a handler frame itself — none in the three trees (client-core re-exports the type, `src/modsKernelTransit.ts:96`, and builds none). *Compensation:* carry the event's name.
179
+ - (HB-4, behavioural) *What changed:* `prompt.submit` pins `author` (`"operator"` at the four entrances, `"extension"` at `$.prompt.submit`) and `extension` (present only beside `"extension"`). *Who is affected:* a `prompt.submit` handler that hands `next` a payload it builds by hand instead of spreading `e` — the station judges a dropped pinned key as a change and its failure column refuses the prompt at that entrance; none in the three trees. *Compensation:* hand on `{ ...e, text }`.
180
+ - **Narrowing — two (open to veto).**
181
+ 1. *The hold of a run the person stopped holds every input that is not the person's.* After the person's bare refusal of a call and until they speak again, the steer relay refuses an input of any other author at entry (`{ drop }` for `$.prompt.submit`), and the drain holds what one queued before the stop (`isDrainable` reads `isOperatorInput` where it read "engine-minted"). An observer's report — the one other author the relay carried — drained past the hold before; the halt is the parent thread's (`isBareHumanRefusal` excludes a delegated child) and an observer's report enters a child, so no run is known to change (inferred).
182
+ 2. *An observer's report reaches the model in its own envelope, without the person's frame header.* The relay frames an input by its author's `frame` column; the observer's is the text as handed (its own `<observer-report>`-style envelope). Before, it wore "The user sent a new message while you were working:" (pin E13 is red on the base tree for exactly that).
183
+ - **Design correction.** The design's premise that `prompt.submit`'s bottom raises `classic.UserPromptSubmit` with empty frames does not hold at the four entrances: the bottom's context carries the frames of the chain's own handlers (`dispatch.ts`, the bottom's `fr`). The classic station is therefore raised under what the screen was raised under (the `$` call's frames and origin; nothing at the four entrances), the one reading K4 asks for, and the four entrances' behaviour is unchanged.
184
+ - **Consumers.** @server: HB-2 (re-declare your packages' contract); `humanInputEventData` (`src/trace/project.ts:2046`) whitelists keys and does not project `author` / `extension` — until it does, an extension's (and an observer's) input reads on your wire as an unattributed input; the relay's answer is internal (no package face). @cli / @client-core: render `human_input.author === "extension"` as the extension's message (`extension` names it), never as the person's; HB-2 / HB-3 for the kernel mirror. @test: E1–E14 below are the black-box judgments.
185
+ - **Claude Code 2.1.316.** The call's shape is the reference's (`bTo`, `cli316.js:269591`; the re-entry refusal `AMe`, `:272862`; the hold `Iet` / `_A`, `:269556` / `:269590`; the `later` tier `hWe`, `:269590`; the frame `:261046-261048`). Divergences D-3284-a…i (INTEGRATION-CORE §10.17): the author set (a); `asUser` refused (b); answered when taken, not at idle (c); the hold is the person's bare refusal (d); `/` not refused (e); `author` pinned (f); a later submit counts against the same run's turn cap (g); a child leg's submit passes the child's screen (h); a session-start handler's call refused (i).
186
+ - **Rules.** Added: one conditional arm (the re-entry refusal, two clauses of one fact) and two columns of the author table (`screened`, `frame`) — the one predicate that answered both "screened?" and "the person's?" is split, the six earlier words answering both alike (pin E14). New readers of existing rules, no new rule: the relay reads the stopped run's hold once at entry for every author that is not the person's (the rule the harness's lanes keep); the relay reads its `$` call's own cancellation at its one acceptance moment (a cut call takes nothing, screen or not); the relay's answer reads the verb's own `steering.*` refusals as `{ drop }`; the entry checks its argument form as every `$` entry does. Unchanged in count: the drain predicate reads `isOperatorInput` in place of "engine-minted"; the handler frame's two spellings are one mint (`handlerFrame`). Zero branches on the author word.
187
+ - **Pins.** `test/backlog3539-prompt-submit-s1.test.ts` (21 cells, real Runner but E14 / S1: E1 the extension's turn and frames; E2 another's classic block ⇒ drop; E3 the caller's own two screen handlers not raised, a rewrite named, the classic handler's origin; E4a–d the re-entry refusal at once from both screens, `session.start`, `classic.SessionStart`, `classic.SubagentStart`, and taken from `turn.start`; E5a / b dropped and named, never parked or on the person's account (E5b: a stopping run's `turn.complete` is not re-entry); E6a / b the hold; E7 the argument form; E8 `compactSession`; E9 `uses.calls`; E10 the child's own stream; E11 the turn cap; E12 the classifier's `[engine note]`; E13 the observer's frame; E14 the table's columns; E15 a call cut past its handler's budget takes nothing, no screen registered; S1 one handler-frame mint). Every cell is red on the base tree (the call is not there; E13 on the person's header); one mutation per cell, each killed. Re-pinned: `test/backlog3010-3011-mods-s4.test.ts` K1 (the `prompt.submit` row; contract ≥ 8), `test/backlog2941-input-author.test.ts` §0 (seven words).
188
+
189
+ ### The memory-consolidation driver's role-resolved chat and a mod's `$.model.complete` take the model's default thinking tier — the one chain #3394 made, read through `resolveTaskModel`, so an `off` default reaches both requests (#3535; ruled C-R1148, addendum 1; behavior change: the two requests name the model's default tier where they named none; hard-breaking: none; closed sets: none; exports: none; wire: no key added or removed)
190
+
191
+ - **Before.** #3394 pointed the run, a side query, a compaction pass and the next-prompt suggestions at `ResolvedRole.thinking`. Two more places call the brain on a bare `Model` and passed no `reasoning` at all: the consolidation driver's chat when the seat is read off the `consolidate` / `summarize` roles (`resolveMemoryConsolidationDriver`), and `$.model.complete` on a leg (`legFacadeSeats`, for the leg's own model and for a catalog model the call names). On a default-on gateway (a Qwen chat template) a request that names no tier thinks, so a model that declares `defaultThinking: "off"` still thought on both.
192
+ - **Now.** Both ask `resolveTaskModel({ model }, {}).thinking` — the answering model's own default, the chain's last link, since neither request names a tier and neither is a role seat — and hand it to the brain as the request's `reasoning` (absent when the chain gave none): an `off` default is the wire's explicit off (`chat_template_kwargs.enable_thinking: false`), a non-off default is that tier (clamped like any request's), and no default writes no thinking key, so the provider's default governs. For `$.model.complete` the model is the one that answers (a named catalog model's default, not the leg's). The explicit chat seat of the driver (a function, or an endpoint triple) holds no `Model`, so it has no default to read and is unchanged.
193
+ - **Cost note.** A model that declares a default above `off` (`high`, say) now asks for it on the consolidation distillation (one pass reads the whole library) and on a mod's completion — the tier the declaration says the model thinks at. A deployment that wants these two cheap declares the cheap model's default, or binds `roles.consolidate` / the named model to one that declares `off`.
194
+ - **Rules.** Retired: none. Added: none — the same one reader as the other lanes; a pin reads both files and refuses a second `?? model.defaultThinking`.
195
+ - **Known limit.** A role's own `thinking` (`roles.consolidate.thinking` / `roles.summarize.thinking`) is not read by the driver: `roleModelIfSet` hands back the `Model` alone. Tracked as #3542.
196
+ - **Pins.** `test/backlog3535-side-model-default-thinking.test.ts` (8 cells: D1 the driver sends the explicit off for an off default, D2 no default writes no thinking key, D3 a `high` default is on the wire; M1 the leg's own model, M2 a named catalog model's default governs and not the leg's, M3 no default writes nothing, M4 `high` reaches the wire; S1 neither file reads `defaultThinking` itself).
197
+
198
+ ### `hostOfUrl` is a root export — the one call-side reading of a URL every host rule judges on, so an enforcement point outside the engine reads a peer or egress URL as the engine does (#3544; web-admin QC1 [13004]; behavior change: none; hard-breaking: none; closed sets: none registered (the five unreadable reasons are the keys of the exported sentence table); exports: four added, none removed; wire: +4 root names, additive) (@web-admin @server @cli @client-core)
199
+
200
+ - **Before.** `hostOfUrl` (host lower-cased, an IDN in its ASCII form, trailing dots read off, or one of five reasons the URL names no host a rule can be judged on) was the engine's reading for the fetch tool, the permission-rule judges and the deployment host floor, and was not on the package root: `compileHostFloor` and `headerOwnershipCollision` were, this reading was not. A console that wanted to refuse a peer URL by the same host rules had to copy it, and a copy drifts on exactly the corners the reading exists for (`https://2130706433../`, an IDN, credentials in the URL).
201
+ - **Now.** The root exports `hostOfUrl`, `HOST_UNREADABLE_SENTENCE` (the sentence a refusal states for each unreadable reason) and the types `HostReading` and `HostUnreadableReason` — the module's own bindings (`src/core/host-target.ts`), re-exported, not wrapped: one function, one frozen table. A consumer states a refusal as `HOST_UNREADABLE_SENTENCE[reading.unreadable]`. Nothing about the reading changes.
202
+ - **Consumers.** @web-admin: its a2a peer-URL policy reads the host through the root name (QC1, the blocker for its car A). @server @cli @client-core: nothing to do; a copy of this reading in a tree can be replaced by the root name, and `HOST_UNREADABLE_SENTENCE`'s five keys are the closed set to switch over.
203
+ - **Claude Code 2.1.316.** No anchor: the reference has no host-rule engine of this shape.
204
+ - **Pins.** `test/backlog3544-host-of-url-root-export.test.ts` (5 cells: R1 the root's function is the module's own, R2 the root's table is the module's own, frozen, one sentence per reason, R3 each of the five reasons answers on one input, R4 the readable forms, R5 both types resolve from the root); `test/export-surface.snapshot.json` +4; `scripts/consumer-smoke-probe.mjs` registers `hostOfUrl` and `HOST_UNREADABLE_SENTENCE`.
205
+
206
+ ### The principal-inbox lane declaration is loud about every bad value — `principalInboxConsumer: { assistant }` must be an agent handle, and `ReadInboxToolOptions.coversPrincipalInbox` outside absent / `false` / `true` / `"pullOnly"` is refused at construction, both with `config.principal_inbox_consumer_invalid` (#3543; found by the second-pass counter-example batch of #2637, cases E2 / E6 / E7; behavior change: two narrowings, open to veto; hard-breaking: none; closed sets: none; exports: none added or removed; wire: no key added or removed) (@server @dgx @cli @client-core)
207
+
208
+ - **Before.** The declared handle was checked for "not blank" and nothing else, so ` a0123456789abcdef ` (padded), `A0123456789ABCDEF` and a 20 KB string were accepted: the leg ran, `ReadInbox` mounted local, no leg's task id ever equalled the handle so the lane never seated, the letters waited in `principal.inbox` and nothing said so — while `""` and a declaration with an extra key were refused with `config.principal_inbox_consumer_invalid`, two loudnesses for one declaration. And `ReadInboxToolOptions.coversPrincipalInbox`, whose closed set (`boolean | "pullOnly"`) lived only in its type, read `"PULLONLY"` (or any other word) as "covers nothing" on a root-exported factory a JavaScript caller reaches.
209
+ - **Now.** `principalInboxConsumerOf` reads the handle by the one shape gate of an agent handle, `DURABLE_AGENT_HANDLE_RE` (`src/core/task-registry-shared.ts:1145`, a root export): `a` and 6–32 lower-case hex digits, what the task registry mints. Anything else is refused with `config.principal_inbox_consumer_invalid`, `detail.reason: "malformed"`, in a sentence that names the shape and quotes the value at most 96 characters (a 20 KB handle is not echoed); it is read wherever the declaration already was read — the drain binding, the `ReadInbox` mount, the record mint. `createReadInboxTool` judges `coversPrincipalInbox` against its closed set where it receives it and refuses a word outside it with the same code and reason: the option is the tool face's copy of the principal-inbox lane declaration (the Runner's binding judgment sets it, never independently), so one subject takes one code. `RunnerDeps.principalInboxConsumer`'s contract sentence and `docs/INTEGRATION-CORE.md` §13.3 state the handle shape.
210
+ - **Narrowing — two (open to veto, @server @dgx @cli @client-core).** (1) A declaration `{ assistant: "<x>" }` whose `<x>` is not an agent-handle shape — for instance a top-level assistant leg whose host `spec.taskId` is an opaque deployment string such as `"asst-1"` — was accepted and seated the lane when the leg's task id equalled it exactly; it is now refused at the prepare of every leg that reads the declaration. `spec.taskId` itself stays opaque (nothing judges it); only the declaration is. Nothing in the tree declares such a value (every pin of #2637 and of the design/385 slice 7 uses a minted-shape handle), and the server tree declares none today (inferred, from the #2637 reading of `origin/main`). To declare an assistant, mint its leg's task id in the agent-handle shape (a registry-minted id already is). (2) `createReadInboxTool({ coversPrincipalInbox })` with a value outside the four now throws at construction; the Runner's own call and every typed caller pass one of the four.
211
+ - **Consumers.** @server @dgx: the assistant declaration you write must be an agent handle; a value you generate from a catalog id or a display name is refused at boot of the first leg that reads it, with the shape named. @cli @client-core: nothing to do — neither reads the declaration or the option.
212
+ - **Rules.** Retired: the handle's `trim() !== ""` check. Added: none — the handle is read by the existing agent-handle shape gate, and `consumerRefusal` (a module export, not a root one) is now the refusal both readers of the lane declaration throw. Net −1.
213
+ - **Claude Code 2.1.316.** No anchor: the reference has no principal inbox.
214
+ - **Pins.** `test/backlog3543-principal-inbox-declaration-bad-values.test.ts` (20 cells: U1 padded / trailing newline / upper-case / 20 KB through `principalInboxConsumerOf`, U2 the shape's edges, U3 the controls; G1 the same four through a real Runner's delegated leg, with the valid-handle control seating the external `ReadInbox`; K1 `"PULLONLY"`, K2 seven other values, K3 the four members' faces). On the base every refusal cell is red (17) and every control green; nine mutations are each killed (trim-only check, a loose regex, the whole-value echo, the wrong reason word, the face's check removed / case-folded / throwing a plain `TypeError` / refusing `false` / echoing whole).
215
+
216
+ ### A damaged scope registry or registry journal is the same fault as a damaged root anchor: the personal store is in the deployment's set, `stores()` throws `ControlPlaneCorruptError` and the session status answers the plane `fault` (#3531; behavior change: loudness only — a mount that used to open as a healthy store now says what it is; hard-breaking: none; closed sets: none; exports: none; wire: no key added) (@server @test)
217
+
218
+ - **Before.** The set counted a mount as holding a store when its anchor, registry or journal stood there damaged (`storeHoldsRecord`, #3360), but only the anchor was refused by the open (the File store's constructor reads it); the registry and its journal were read at the first transaction. So a personal mount whose `scopes.json` was not JSON (or an array, a version this engine does not read, a label that is no path segment) or whose journal was torn was in the set, `stores()` answered two stores without a throw, and the status said the personal plane was healthy while the first read of a scope threw (test [12971] G11.c; v7.63.0 and v7.65.0 alike).
219
+ - **Now.** One reading of "damaged" with one loudness: the census and the open read the same fault (`storeOpenArtifactFault` over `STORE_OPEN_ARTIFACTS.files`, `layout.ts`; `namedArtifactFault` is the census's reader returning the fault instead of a boolean). The deployment's personal store reads it before it constructs the store, on every call (the census reads the disk each time, so does this — a store opened whole and kept is refused the next time its registry is damaged), and throws it; `personalOpenFault` carries it as it carries the anchor's, so the status row is `optOutSource: "fault"`.
220
+ - **Narrowing (open to veto, @server @test).** A deployment whose personal mount holds a damaged registry or journal got two stores and a healthy row; it now gets the throw and the `fault` row, as it already did for a damaged anchor. A damaged named artifact is no longer a thing only a first read says.
221
+ - **Rules.** −1: the census's boolean and the open's constructor were two readings of the same artifacts; now one function returns the fault and the census asks whether there is one. Contract sentence `memory.deployment.store_set` says it (a store that cannot be opened — the damaged anchor, registry or journal that put it in the set is one such cause).
222
+ - **Claude Code 2.1.316.** No counterpart: the reference has no memory store set.
223
+ - **Known limit.** KL-3531-a: only the personal plane's open reads the named artifacts' fault; the project plane (the deployment's own backend, always in the set) still meets a damaged registry at its first read.
224
+ - **Pins.** `test/backlog3531-store-set-damaged-registry.test.ts` (A1–A5 five registry / journal forms, B1 anchor `{}`, C1 both, D1 whole beside a record, E1 the fault is the census's own, E2 whole artifacts have none, F1 a cached store refused after damage, G1 project-only untouched; A1–A5 / E1 / E2 / F1 red on stage-7660, the rest controls green on both) and `test/backlog3360-3361-store-set-damaged-artifact.test.ts` (the torn-journal cell now throws, where it used to pin the healthy open); mutations M1–M5, each red.
225
+
226
+ ### post-ship flips a ledger row under the release that first carried its fixing commit, not the release being posted — `rows[i].sha` (#3532; tooling only, no package surface: behavior change: none for the engine; hard-breaking: none; closed sets: none; exports: none; wire: no key added)
227
+
228
+ - **Before.** `scripts/post-ship.mjs` wrote every `manifest.rows` entry as `SHIPPED-UNVERIFIED core@<manifest.version>`; the manifest's one value was all the script knew of a row's release. A straggler flipped at a later release therefore carried that later number: 7.64.0's back-flip wrote `core@7.63.0` on five rows (#565 / #2810 / #2817 = v7.59.0, #1489 = v7.55.0, #1169 = v7.40.1), and the test's version-by-CHANGELOG mapping looked in the wrong release (test [12974] (iv)).
229
+ - **Now.** A row may name the commit that fixed its ticket (`sha`); the row is flipped under the first release tag that contains it (`git tag --contains <sha> --sort=version:refname`, release tags `v<x.y.z>` only), written as a back-flip (`补翻 [ship] / 首含 tag v<…> 含 <sha>`), and the run prints one `WARNING:` line naming the release it used when that is not the one being posted. The commit being an ancestor of `R` is only the existence check; a commit outside the release, one no release tag holds, a tag later than the release, and a `sha` that is no hex refuse the run before anything is written. A row without `sha` is this release's, as before. A back-flip row (one this release's R car did not write) must carry its `sha`.
230
+ - **Rules.** The release of a row had one reading (the manifest's version) and now has one derivation (the commit's first tag); a row without a commit keeps the old reading.
231
+ - **Known limit.** KL-3532-a: a row without `sha` is still written under the release being posted; the script cannot tell which rows are back-flips.
232
+ - **Pins.** `test/post-ship-script.test.ts` S1–S7 (real git fixture: three commits, tags `v7.2.0` / `v7.9.0` / `v7.10.0`, a draft tag and a package tag at the first; the oldest by version order not name order; outside / untagged / no-hex refused with nothing written; a row without `sha` unchanged); mutations M1–M6 (name order, no tag filter, no ancestor check, newest tag, no warning, `sha` ignored), each red.
233
+
234
+ ### The account of a restricting table the host owns and the engine never reads — `retiredToolNameAccount`, the sentence and the data of `config.legacy_tool_name` for the entries that name a tool the engine retired with no successor, by the engine's own judgment and in the engine's own words (#3528; additive: one root export; hard-breaking: none; closed sets: none; exports: +1 `retiredToolNameAccount`; wire: no key added) (@server)
235
+
236
+ - **Before.** `config.legacy_tool_name` (audience `user`, minter `engine`) said a retired no-successor name in a tool policy's deny / ask list was left out and the run went on (7.65.0, #3437). Its sentence and data lived in `runner/sub-agent-deny-lists.ts` as the engine's mint, and `judgeRuleToolName` (root export) judged the name — but a restricting table the engine never reads, `settings.permissions.neverAuto` (the server's own), had no way to say the same thing in the same words: a host had to re-spell the judgment (kind `retired` and no `currentName`) and the sentence, a second reading of one fact.
237
+ - **Now.** `retiredToolNameAccount({ field, source, entries }, roster?)` (root export; `src/core/retired-host-table-account.ts`, beside `retired-tool-name-account.ts` which holds the words) reads the names with the engine's own entry reader and asks the engine's own question of each answer (`compileAllowList`, then `isRetiredLeftOut` — the one predicate the engine's task lists and skill tables ask) and returns `{ message, detail: { layer: "host_table", entries: [{ field, entry, layer, guidance, source }], total } }`, or `undefined` when the table holds no retired no-successor name. It is pure data and words — no code, audience, minter or session: the host mints its own `config.legacy_tool_name` notice (minter the host) from it, adding `sessionId` to `detail`, and decides what its table does with the entries. The engine's own mint (`retiredToolNameNotice`) now builds from the same `accountOfRetired`, byte for byte as before for its three layers; `layer` gains the word `host_table` (a layer the engine itself never audits). A renamed name, an unprefixed namespace and an unmintable segment are not in the account — the host refuses those as the engine does; `roster` names the tools the host knows are mounted, so a tool mounted under a retired name is its own, and a tool mounted under another case of it (`teamcreate` beside an entry `TeamCreate`) keeps the entry refused — the answer the engine's tables give for the same roster, not a second one. An entry is read as the engine reads a rule entry, so a spelling the reader reads as nothing (a name with blanks around it) is not a retired name, and `Name(content)` is read by its tool name. A table the account cannot be made for is refused loudly with a `TypeError` coded `config.invalid_argument` (no code added; the precedent is `redeemWorkflowParks`): `field` outside `deny` / `ask`, a `source` that is not a non-blank string (it names the table in the sentence), `entries` that are no list, a table that is no object — no sentence is made from them; an entry that is no string reads as nothing.
238
+ - **Rules.** +0: the sentence and the detail were one function's, now in one module (moved, not copied) and read by two mints; the account holds no judgment of its own — the reader and the predicate are the engine's — and the function sits in its own module because the module that holds the words cannot import the reader (import cycle through the skill table). The engine's policy audit is untouched.
239
+ - **Consumers.** @server: `settings.permissions.neverAuto` may call it with `{ field: "ask", source: "settings.permissions.neverAuto", entries }` and mint its notice (minter `server`); the table's other behaviour is yours.
240
+ - **Pins.** `test/backlog3528-retired-name-account.test.ts` R1–R7 + R8 (a roster case twin keeps the entry out of the account) + R9 (a bad `field`, a blank or non-string `source`, entries that are no list and a table that is no object are refused with the coded `TypeError`) (red on stage-7660 where the export does not exist); mutations M1–M7 (a renamed name counted, the roster ignored, `source` dropped, the wrong layer, no dedupe, a non-string reaching the judge, the bound moved) + M8 (the twin question dropped) + M9 (the `field` guard dropped) + M10 (the `source` guard dropped), each red; `test/backlog3437-retired-name-left-out.test.ts` unchanged and green (the engine's mint is byte-identical).
241
+
242
+ ### A tool the engine retired with no successor, named on a task's tool-name list or in a skill's `disallowed-tools`, is told as the notice every restricting table gives it — `config.legacy_tool_name` — and a skill that lists one activates (#3527; behavior change: a skill's activation is no longer refused on such an entry, and the task's list stops calling it a misspelling; hard-breaking: none; closed sets: none registered — `detail.layer` of the notice gains `task_selector` / `skill_table`, entries an optional `source`; exports: none; wire: no key added) (@server @cli @test)
243
+
244
+ - **Before.** A tool policy's deny / ask list that names a tool the engine retired with no successor (the retirement table's `removed` / `folded` lines) left the entry out and told it in one `config.legacy_tool_name` (7.65.0, #3437). Two other restricting tables read the same name two other ways: a task's tool-name lists (`excludeTools`, a definition's or a delegation tool's `denyTools`) kept the entry and told it as a possible typo ("no tool of this task answers to that name … If the name is misspelt, fix the entry", `onError`, no code); a skill's `disallowed-tools` read it as an entry that "reads as nothing" and REFUSED the skill's activation (`config.skill_deny_unreadable`, the run for a user-invoked skill). One input, three postures — and the person who wrote it believes it guards a tool in all three.
245
+ - **Now.** One posture, one reader's answer (`isRetiredLeftOut` over the entry reader's `tool_name` / `retired` / no `currentName`): the entry is kept and left out of the refusals, and told once as `config.legacy_tool_name` (audience `user`, minter `engine`) — for a task's lists `detail.layer: "task_selector"`, each entry's `source` the list that holds it (once per session for one set, as the advisory it replaces; the run's own list that the spawning run already told is not told again); for a skill `detail.layer: "skill_table"`, `source` the skill (in the place the "grants or refuses nothing" notice was told, per prepared task), and the skill activates (a carried deny record — a park's frozen row, a parent's capture — that the leg's roster reads this way still refuses the leg, as before: dropping it would lose the protection without a word). A name that was RENAMED (it has a successor: the entry guarded a tool that is still mounted) is refused as before; so is a name whose tool the deployment mounts under another CASE of it (`TEAMCREATE` beside `TeamCreate`: the entry was written for that tool, as the policy audit already asks); a tool a deployment mounts under the retired name itself is the tool's own (the entry binds, no notice); an allowed list keeps its advisory (it is no restricting table); a pool that cannot be listed keeps the advisory too (the name may be one of its own tools).
246
+ - **Widening — one (open to veto, @server @cli @test).** A skill whose `disallowed-tools` holds a retired no-successor name used to refuse its activation (and a user-invoked one refused the run); it now activates with its readable entries in force. What the entry meant to guard never existed (no tool answers to that name), so no protection is lost; a client that keyed on `config.skill_deny_unreadable` for this entry no longer sees it.
247
+ - **Rules.** −1: the skill table's refusal on a retired no-successor entry and the task list's typo advisory for the same entry were two postures for one fact; both are the one notice now (one predicate, `isRetiredLeftOut`, over the one reader's answer). The notice's mint moved with its sentence to `src/core/retired-tool-name-account.ts` (shared with #3528).
248
+ - **Consumers.** @server: the front-door 400 / 422 arms for a retired name on `excludeTools` / `denyTools` (S-3212) can be removed — the engine accepts the entry and tells it; render `config.legacy_tool_name` as for the policy table (the new `layer` words are `task_selector` and `skill_table`). @cli @client-core: the notice is rendered as the policy table's is, no change. @test: a skill whose `disallowed-tools` holds a retired no-successor name activates and yields one notice; `bash` (renamed) still refuses.
249
+ - **Claude Code 2.1.316.** The reference accepts a tool name nothing matches and never refuses on it (cli316.js:260988 region); this keeps the entry and says so, the superset D-3437-a already registered.
250
+ - **Known limit.** KL-3527-a: an allowed list and a pool that cannot be listed keep the misspelling advisory for such a name (the first restricts nothing; in the second the name may be one of the pool's own tools).
251
+ - **Pins.** `test/backlog3527-retired-name-restricting-tables.test.ts` — T1–T3 (own list / definition / delegation tool), T4 renamed control, T5 roster-mounted control, T6 once per session, T7 allowed-list control, T8 told-upstream, T9 case-twin control, T10 the once-per-session digest is of the whole set, S1–S2 (model / user activation), S3 renamed control (two renames), S4 roster-mounted row binds, S5 allowed-tools control, S6 carried-record control, S7 case-twin control; T1–T3, T6, T8, T10, S1, S2 red on stage-7660, the controls green on both; `test/backlog1930-near-miss-refuses.test.ts` (#1930's near-miss pin) K2 re-pinned (notice, no advisory); `test/legacy-residue-gate.test.ts` banks the moved code literal (src/core 95 → 96, src/core/runner 46 → 44); mutations M1–M10 (the skill refuses again, the skill's entries not split out, the selector branch off, the allowed side too, no once-per-session, a rename counted, a carried record dropped silently, the case-twin question not asked, the digest of the bounded detail, the told-upstream list told again), each red.
252
+
253
+ no-notes: #3339, #3534(release-tooling only, scripts/release/: the re-window reads a car written by its short ledger name, keeps a row whose car head an earlier release already shipped and says so; nothing in the package changes), #1930(named in the subject of a #3527 commit as the ticket that first described the retired-name form; the notes of that work are under #3527 / #3528)
254
+
1
255
  ## 7.65.0 — 2026-11-03
2
256
 
3
257
  ### Errata to the 7.64.0 section and to the errata it carries (those sections are frozen; the corrections live here)
@@ -0,0 +1,15 @@
1
+ import { type TaskRegistry } from "../core/task-registry.js";
2
+ import type { ToolExecuteContext } from "../core/types.js";
3
+ /**
4
+ * The ONE reading of the registry a delegation call's background children live in, taken at the call's entry beside the inherited
5
+ * seat: the run's seat inside a Runner task (`ToolExecuteContext.taskRegistry` — the registry its leg end, TaskStop, ListAgents and
6
+ * teardown read), the bag's option outside one, else the engine's one registry — the reading the bag's other members already have
7
+ * (the owner `ctx.taskId ?? owner`, the checkpoint store `ctx.checkpointStoreForChildren`). An option naming a DIFFERENT registry inside
8
+ * a task is refused here, before any allocation (`config.invalid_task_registry`, the sibling of the bag's checkpoint-store refusal):
9
+ * children registered where no reader of the run looks would owe deliveries its leg end never sees and outlive its teardown. The bag
10
+ * itself is never copied — its other members (callbacks a host may define on a class, with their receiver) stay read off the host's
11
+ * object; `undefined` exactly when there is no bag.
12
+ */
13
+ export declare function delegationRegistryOf(ctx: Pick<ToolExecuteContext, "taskRegistry">, bag: {
14
+ readonly registry?: TaskRegistry;
15
+ } | undefined): TaskRegistry | undefined;
@@ -0,0 +1,13 @@
1
+ import { defaultTaskRegistry } from "../core/task-registry.js";
2
+ export function delegationRegistryOf(ctx, bag) {
3
+ if (bag === undefined)
4
+ return undefined;
5
+ const seat = ctx.taskRegistry;
6
+ const option = bag.registry;
7
+ if (seat !== undefined && option !== undefined && option !== seat) {
8
+ const e = new Error("background.registry is not the registry this run reads (its leg end, TaskStop and teardown read the run's own task registry) — leave the option unset inside a Runner task and the run's registry rides, or wire that one registry.");
9
+ e.code = "config.invalid_task_registry";
10
+ throw e;
11
+ }
12
+ return seat ?? option ?? defaultTaskRegistry;
13
+ }
@@ -22,10 +22,17 @@ export type PrincipalInboxConsumer = {
22
22
  * handle>" }` ⇒ that assistant alone, and no terminal session drains the box (it does not claim and yield —
23
23
  * it never mints the lane). ANY other value is refused with {@link PRINCIPAL_INBOX_CONSUMER_INVALID_CODE}:
24
24
  * a malformed assistant configuration must never be read as "terminals", which would let terminal sessions
25
- * take the letters past the assistant. The one judgment every reader calls: the drain binding (which
25
+ * take the letters past the assistant. The handle is an AGENT HANDLE and is read by the one shape gate of an agent handle
26
+ * ({@link DURABLE_AGENT_HANDLE_RE}: `a` and 6–32 lower-case hex digits): a padded, upper-case or oversized string equals no leg's task
27
+ * id, so the lane would never seat and the letters would wait with nobody told — the declaration refuses it instead, where
28
+ * it is written. The one judgment every reader calls: the drain binding (which
26
29
  * lanes), the `ReadInbox` mount (its origin) and the record mint (a gate with no consumer).
27
30
  */
28
31
  export declare function principalInboxConsumerOf(deps: Pick<RunnerDeps, "principalInboxConsumer">): PrincipalInboxConsumer;
32
+ /** The one refusal shape of the consumer declaration: code {@link PRINCIPAL_INBOX_CONSUMER_INVALID_CODE},
33
+ * `detail.reason` naming which fact refused it (`malformed` / `no_consumer`). Also the refusal of the `ReadInbox` face's copy of the
34
+ * principal-inbox lane declaration (`coversPrincipalInbox`): the same subject, so the same code. */
35
+ export declare function consumerRefusal(message: string, reason: "malformed" | "no_consumer"): Error;
29
36
  /**
30
37
  * The sender as the deployment's AUTHENTICATION context states it — an object the gate implementation
31
38
  * receives from its own auth layer, never a string a caller passes in. `scope` is the authenticated