# Mac slice F progress: Engineering on a Mac worker

Protocol: **37** (`wire.ProtocolMacEngineering`). Migration: **0120**.
Allocated by the coordinating session on 2026-11-28: dynamic specialists
slice 1 takes protocol 36 and migrations from 0115; slice F takes 37 and
0120. Whichever merges second renumbers down to the next free number at
merge time if the other has not used its range. The plan says "protocol
36" throughout; read 37.

Branch `mac-slice-f` from `origin/main` 8bd40ed1, with
`origin/mac-placement-wait` (74140828) merged in at 436a7b6a. Plan:
`2026-11-28-mac-runners-slice-f.md` rev 4. Spec:
`docs/superpowers/specs/2026-11-07-equipo-mac-runners.md` rev 4 plus its
§8 addendum. Conventions as in `RUNNERS-PROGRESS.md` and
`DARWIN-PROGRESS.md`. Nothing here has run on a Mac unless a line says
so: Mac behaviour is tested on Linux with recorded outputs and fakes.

## Done

0. **Base.** `origin/mac-placement-wait` merged (436a7b6a). Its tests
   pass on the merge: `go test ./internal/thintest/ -run
   'MacWait|Macrecheck|Placement' -count=1` ok (3.9 s);
   `go test ./internal/equipo/ -run TestMacWait -count=1` ok.
1. **Probes and static reads** (2026-11-28; Studio as paulca 17:55Z to
   18:09Z, docs-t1 static reads 17:57Z to 18:10Z). Full record:
   `MAC-SLICE-F-TASK1-FINDINGS.md`. Nothing on the Studio changed; the
   CLI was never run. Kept for task 5: the verified binary at
   `~/.cache/mac-slice-f-build/claude-2.1.312-darwin-arm64` on docs-t1.
   - S1: darwin-arm64 sha256
     `6b5ec691195e551b02c41df9f7d723f4ea61eaa03c2df90acefe3736f1aeb620`,
     matching https://downloads.claude.ai/claude-code-releases/2.1.312/manifest.json
     (the installer now uses only downloads.claude.ai).
   - S2 stop: no. Every key is present. Empty `allowedDomains` asks
     (`SandboxNetworkAccess`), it does not deny; `network.strictAllowlist`
     gives the hard deny. `enableWeakerNestedSandbox` is Linux only.
   - S3: 2.1.312 embeds an unreleased sandbox-runtime (matches no npm
     release 0.0.79 to 0.0.83); read from the binary. Its profile allows
     `securityd`/`SecurityServer` lookups, all file reads, listing every
     process.
   - S4: `CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR` is read
     (`/dev/fd/<n>`); fallback file `<config dir>/.oauth_token`. A set
     token does not skip two startup `security find-generic-password`
     reads (only `--bare`/`CLAUDE_CODE_SIMPLE` do). Keychain service is
     `Claude Code-credentials-<8 hex of sha256(config dir)>` when
     `CLAUDE_CONFIG_DIR` is set; account is `$USER`.
   - S5 stop: no. `EQUIPO_ATTEMPT` survives the scrub. But see the
     termination issue below.
   - S6: project dir = realpath(cwd), NFC, every non-`[A-Za-z0-9]` UTF-16
     unit to `-`, over 200 chars truncated plus `-base36(|hash|)`.
     `CLAUDE_CODE_PROJECT_DIR_NAME` (`[A-Za-z0-9_-]{1,64}`) pins it when
     `CLAUDE_CONFIG_DIR` is set.
   - R3: nested Seatbelt profiles fail on 27.2 (background only).
   - R4: on 27.2 the kernel hides the environment of platform binaries
     (bash, zsh, sleep, env, sandbox-exec) from other processes, and
     shows it for every other same-user process, also from inside a
     `(deny default)` profile with `process-info*` rules.
   - R2: every other home now denies `paulequipo` list and search by
     ACL. `paulequipo`'s home is `drwxr-x---` group `staff`, so staff
     users can list it: the home guard (task 10) will ask for
     `chmod 700 ~` (D2 covers it).
2. **Wire, protocol 37, migration 0120** (098407b0, a5650332). New
   frames `prepare_base` and `base` (`PrepareBaseCommand`, `BaseReport`);
   `TransferHeader.Kind`/`OldBaseSHA` with `Commits()` (base, old base,
   candidate; de-duplicated; `MaxTransferCommits = 3`) and `Valid()`;
   `Capabilities.Engineering *EngineeringStatus{state, reason}`; F1 to F7
   in `ValidCapabilities` (F4 succeeds `passed`, the others `denied`);
   `XcodeAccess`, `SessionID`, `OutcomePhase` on dispatch/step/publish/
   published; `PublishedReport.ChangeFiles`/`DiffCollection`;
   `ChangeDiffUpload.Publication`; `AskCommand.Eng*`; new reasons,
   placements and Needs-you kinds; `WithoutWorkerConnections` for a
   worker hello below 37. Below 37 Encode refuses the new frames, an
   Engineering transfer and a publication's diff upload, and drops every
   other new key, including explicit empty, zero and null values (Astra
   r1 finding; nine message types are re-encoded below 37). Migration
   0120 adds `runner_transfers.kind`/`old_base_sha`,
   `chat_steps.xcode_access`/`outcome_phase`/`session_id`,
   `chat_questions.eng_attempt`/`eng_account`/`eng_session`/`runner_id`/
   `base_sha`/`candidate_sha`. Tests: `TestProtocol37Constants`,
   `TestEncodeDropsMacEngineeringBelow37`,
   `TestEncodeDropsEmptyMacEngineeringKeysBelow37`,
   `TestTransferHeaderCommits`, `TestValidCapabilitiesF`, eight fixture
   round-trips, the 0120 migration test over open checks transfers and
   kept questions. Mutations: drop the dispatch clear (fails
   `TestEncodeDropsMacEngineeringBelow37`); `MaxTransferCommits = 4`
   (fails `TestTransferHeaderCommits`); F4 `denied` accepted (fails
   `TestValidCapabilitiesF`); dispatch downgrade back to value-based
   (fails `TestEncodeDropsEmptyMacEngineeringKeysBelow37`). Astra: r1
   READY AFTER FIXES (1 Important), r2 READY.

3. **Instance placement** (ba31a7e1, 1c370c0f, b9b568d8). Mac Engineering
   is placed on a worker only with `EQUIPO_MAC_ENGINEERING=1`; unset, it
   waits as `mac-placement-wait` left it. Base preparation in two
   transactions (`prepare_base` to the primary, then on its `base`
   report bind, place, dispatch and open the inbound Engineering
   transfer together); a report from anything but the current attempt's
   primary connection is refused and logged. A replaced primary (or one
   below 37) invalidates an outstanding preparation; the new attempt asks
   the replacement, or waits `waiting_mac_update`. A task's Mac need is
   durable (`chat_tasks.mac_needs`, in 0120, written once, never
   cleared; the catalog can only add), so no sequence of removals,
   re-pins or catalog changes sends Mac Engineering to Linux. Pin holds
   for fix, Retry, republish and rebase rounds; `xcode_access` only with
   `sandboxProven` and F5 `denied`; review of a Mac-made candidate on the
   primary, never auto-merged. `wire.Step.engineering_status` added for
   the views. 18 contracts in `internal/thintest/mac_engineering_contract_test.go`;
   mutations in `task-3` of the SDD workspace report, all killed except
   one that the durable column made redundant (replaced by R1 to R3).
   Astra: r1 NOT READY (3 Important; the protocol 1 exception declined,
   see Decisions), r2 NOT READY (2), r3 READY.
16. **M9 and mixed versions on Linux CI** (bae4df76, 8f99c333,
    a5956779, 46a1bede, fcb76064, eda98c02, 492edc2f, 4854d8fe). The test
    build's fake worker (real thin runner, `EQUIPO_FAKE_PLATFORM=darwin/arm64`,
    testbuild-only pin override, scoped process table, srt stand-in for a
    seatbelt Mac, fake credential operations) runs M9a to M9i in
    `TestMacWorker` and M9g in `TestMacMixedVersions` (branch-point
    binaries from 8bd40ed1 in the M8 cache); `scripts/no-fake-worker.sh`
    refuses it in releases. M9e proves a lingering setsid child is ended
    by recovery and the turn cleared by the idle read before Retry on the
    same worker; M9g takes the same worker 37 to 35 to 37. Production
    fixes found here: a Mac at 37 holds its slice F hello report until a
    welcome says 37; below 37 a worker holds Engineering step reports in
    its outbox (it sends a step report only once positively identified as
    a non-Engineering step it was dispatched), and a dispatch arriving
    after a cancellation keeps its classification; `startProcess` refuses
    a second start. With cgo on the test gets a static gitleaks from the
    module cache. Process note: M9b, M9c, M9d, M9h and M9i came after
    their production support; recorded exception backed by named
    mutations. The headless-mac CI lane grows by about 75 s. Astra: r1
    NOT READY (4 Important, 1 Minor), r2 NOT READY (2, 1 Minor), r3 READY
    AFTER FIXES (1, fixed in 4854d8fe).
15. **D1 across every connection state, views, copy** (9fe073cc,
    24f27519). One predicate per side, `unsandboxedAllowed(runner)`:
    while the instance holds a Mac as having a credential (from
    `connecting` until files, Keychain residue and anything unproven are
    gone) "Run outside the sandbox" is not offered there, and the worker
    refuses an unsandboxed dispatch (`sandbox_unproven`) while its own
    hold is set; a recorded unsandboxed choice is withdrawn when a
    connection starts, and the creator told. Views: "Made on <Mac>" and
    the no-Xcode line from `chat_steps.on_worker` (in 0120, set at
    dispatch); "Add Claude to <Mac>" from the step's `WaitingFor`; the new
    waits and Needs-you lines; the Machines page shows F1 to F7, the home
    guard, the taint (hold-aware wording) and whether Engineering can run;
    `Capabilities.RunnerUser` (37, validated) names the runner user there.
    Copy JSON complete (59 entries, 6 marked `paul_sees`). Also fixed:
    task 11's `TestContractWorkerSyncHolds` flake (the test read before
    the sync applied; 50 of 50 after). `make copy-release-check` does not
    block pending copy today (it greps REQUIRED, the tool writes
    PENDING); the coordinating session fixes that on main, after which
    this branch is red until the copy is accepted. Astra: r1 NOT READY
    (3 Important, 1 Minor; the gate finding declined), r2 READY.
14. **Shipped probes F1 to F7, P2 token sources, Engineering status**
    (9a01dbf8, 41e8e5d2, d69fffd8, b27368cd, 9c429dc8; package
    `internal/runner/mac/fprobe`). Three short launches (A: F1, F2, F3,
    F6, F7; B: F5 only with P2 denied; C: F4) inside `Turns`. Protected
    execution evidence: during a probe launch the permission tool allows
    exactly one Bash command, the hashed probe script with a fresh
    nonce; the script and the whole F5 fixture sit where nothing in the
    launch can write, and their digest is checked just before; results
    go where only the script writes; F6 is judged from the CLI's own
    `tool_use`/`tool_result` events with the prescribed arguments, and
    only permission refusals or verified benign reads count; links,
    swaps and late insertions are done and recorded by the runner.
    Model text never counts; a missing line is never a denial. F2/F3
    compare in memory against hashed needles and write only
    `allowed`/`denied`/`failed`; F3 reads the observed CLI pid's
    `KERN_PROCARGS2` with the runner's own reader, `ps -E` (an exec
    refusal counts only with the outside control), `env` with a control
    marker, and `/dev/fd`. DNS is a protected-script record backed by an
    outside resolve (the runner cannot watch the system resolver
    without root). Results trusted only for this runner version,
    settings, pinned CLI, Xcode and runtimes, under a day, revalidated
    at every use; inputs and simulators read fresh per launch.
    `EngineeringStatus` `ready` (with the `claude` tag, stripped below
    37) only with F1 to F4, F6, F7 at their success verdicts, the guard
    passing, no taint, nothing unproven and a usable connection; F5
    decides `xcode_access`. P2 gains the token sources. Exceptions
    recorded in the task 14 brief (fprobe drafted before its tests;
    F2's other-home sentinel is the OS's, not the sandbox's). Astra: r1
    NOT READY (2 Critical, 8 Important), r2 NOT READY (1 Critical, 7
    Important), r3 NOT READY (4); those fixed after r3 (9c429dc8)
    without a fourth round.
13. **Ask the implementer, pinned exactly** (b3eebcc6, 0cc6ca8c,
    3b166611). Every runner reports the kept session at 37; a question
    freezes attempt, account, session, runner, base and candidate at
    creation, and dispatch, cancel, replies and reconnect use the frozen
    values. The worker answers only from that kept session with the
    read-only settings and git tools over its store, after confirming
    the lease as a question inside its turn; any mismatch is refused
    before anything runs. Answers redacted whole (across stream chunks)
    before the 16 KiB clip; the ask prompt quotes title and question
    with source labels (shared with the Linux primary and Pi; their
    golden changed only in that quoting). An offline Mac answers "Tito
    Studio is offline. Ask again when it is back." (`work.ask.mac_offline`,
    pending), as HTML, JSON and in the script composer as text. Also
    fixed: a worker's owner list was read only at start. Process note:
    four tests after their code, mutation-backed. Astra: r1 NOT READY (5
    Important), r2 NOT READY (1), r3 READY.
12. **Worker Engineering `Exec`, object scan, outbound pack** (64e64327,
    24a53f2e, f494162e; `worker_checks.go`, `worker_engineering.go`,
    `worker_scan.go`, `worker_store.go`, `worker_launch.go`). Guards,
    then `Turns`, marker and lease; readiness and trusted Xcode access
    re-checked inside the held turn. Inbound pack compared with the
    step row on every chunk (`State.pack`, the one check), inventory
    checked, named commits merged into the store's `shallow`. Fresh tree
    per connection on failover; the kept session resumed through the
    pinned project dir. Commit, then the candidate copied into the store
    and pinned by `refs/equipo/<task>/<step>/<attempt>` with the session
    binding and report metadata in the same durable transition. Object
    scan before anything leaves: every new object read with `cat-file
    --batch`, every known secret of the worker searched raw, base64
    (standard and URL) and hex, then pinned gitleaks offline under the
    P2-proven srt checks profile with original file names and no path
    exclusions; a hit, scanner error, unproven scanner, over-bound
    object or unreadable list ends `secret_in_candidate` and nothing is
    uploaded; logs name only object ids and kinds; every report string
    and the step log redacted before persisting. Upload of the thin pack,
    `done` with `pushed: false`; a restart after `committed` resumes the
    upload and never relaunches; a second `send_pack` is answered from
    the kept candidate; `KeepUntil` checked before serving any pack;
    `forget_task` reaches workers. `ErrUnproven`/`ErrRecord` keep the
    step unterminated. Process note: some tests after their code;
    recorded exception backed by named mutations (24a53f2e's body).
    Astra: r1 NOT READY (8 Important), r2 NOT READY (3), r3 READY.
11. **Worker connections, routed by runner** (10dd3978, d77c9c64,
    a1a2c293). A worker at 37 opens `Conns` over its own accounts root,
    sends `Connections` and `SealKey` in hello, and accepts only Claude
    token connections (pasted or the darwin sign-in) addressed to its
    runner id; other kinds refused with a reason. Every connection
    operation is routed by the row's `runner_id` and matched by
    `(runner_id, local_id)`; a sealed token for one runner cannot be
    accepted by another; Connections page grouped by machine with "Add
    Claude to <Mac>" for a worker at 37. Durable credential hold on both
    sides from `connecting` until files gone, no Keychain residue and
    nothing `credential_unproven`; the handshake hello is never a
    complete inventory (only a post-welcome `Hello.Inventory` with an
    accepted capability report signs out); sync sets the hold, never
    releases it; below 37 worker connection commands are held unacked
    and replays refused; `chat_usage.runner_id` only at 37. Process note:
    some tests came after their code; recorded exception, each backed by
    a named mutation (d77c9c64's body). Astra: r1 NOT READY (4
    Important), r2 NOT READY (1), r3 READY.
    **Follow-up (2026-11-29, 3545d40a, e60ab737, 0338fdd4, a16e4bee):
    clearing a turn left unproven after a crash.** Asked for by the
    coordinating session after task 16's M9e: an incomplete record used
    to keep a Mac's step unretryable for good. First clearance, an idle
    read under `Turns`, at runner start and on Retry: two complete reads
    of the runner uid find only the runner, its tracked helpers and
    processes older than the earliest unresolved turn, and every
    obligation of every unresolved turn is gone across all uids; allowed
    only when no unresolved turn ran anything outside a sandbox
    (`unsandboxed_ran`, written durably before such code starts; a
    uid switch needs a setuid exec, which task 1 R4 found Seatbelt
    refuses). Fallback, a reboot (`kern.boottime` and
    `kern.bootsessionuuid`): per-marker, boot-qualified completions,
    acknowledged by each consumer only after it commits. One deadline
    covers reads, cleanup, discharge and the final save. The Machines
    page shows a count only (`processes_left`) and "Restart the Mac to
    clear it." (pending, re-review after Luna). Astra: r1 NOT READY (3
    Critical, 2 Important), r2 NOT READY (1 Critical new, 3 partly), r3
    NOT READY (3 partly); those fixed after r3 (a16e4bee) without a
    fourth round.
10. **Darwin credentials, home guard, taint gate** (b2d8a17c, a8b97126,
    7029e88a, 1e1bad03; package `internal/runner/mac/creds`). Token
    check, auth status and sign-in by link through the darwin launcher
    inside `Turns`, the token only by descriptor. Each launch is watched:
    a durable before-listing of the runner user's login keychain (by
    path, fail closed), an after-listing, and deletion only of an item
    positively the launch's own (stable attributes: keychain, class,
    service `Claude Code-credentials-<hash>`, account); an ambiguous or
    unreadable CLI-prefixed item refuses the connection; the hold clears
    only when `Verify` proves the launch's recorded run ended, or the Mac
    rebooted after the watch began, and a clean listing follows.
    Otherwise every Claude store and use is refused and the Machines page
    shows `credential_unproven` (pending copy). Home guard from
    ownership, mode bits and ACLs only, protected roots precomputed,
    ancestors checked, re-checked before every use (the Studio's
    `paulequipo` home, `drwxr-x---` staff, fails it: `runner.mac.home_open`).
    Taint gate per D2. Process note: the thin wiring's code came before
    its tests; recorded exception on task 9's condition, all 29 original
    guards mutated and killed (a8b97126's body). Astra: r1 NOT READY (6
    Important), r2 NOT READY (1), r3 NOT READY (2 new); those fixed after
    r3 (1e1bad03) without a fourth round.
9. **Darwin executor, termination, machine lock, cleanup** (4cc9a164,
   0feb233e, 569cdb51, ab7a5de0; new package `internal/runner/mac/proc`).
   Marker before start, group after (kill on a failed write). Stop: stdin
   close, SIGTERM, 10 s, SIGKILL to every group and session recorded
   while the turn ran, the marked sweep, and a sweep of every runner-uid
   process born during the turn that is not the runner's own (PID and
   start time, including helper descendants seen while the helper
   lived; no exemption by path), one re-snapshot after the first kill
   pass; a launchd-parented system-path process born after that pass
   began is a relaunch and is spared. Proof within one absolute 30 s
   deadline covering every read, note and fsync, only when every target,
   recorded group and session and marked process is gone and no non-own
   runner-uid process born during the turn is alive; EPERM is not gone;
   a failed scan voids earlier clearance. A record is complete only
   when every launch of the turn wrote its evidence; an incomplete one
   is never proven after a restart (`runner.unproven.record_incomplete`,
   pending). Restart never kills a recorded group that holds no marked
   process and never proves while it lives. `mac.Turns` per operation;
   the pending cleanup owned by its turn; cross-process obligations
   under one flock. Spec §8.8 records the setsid and platform-binary
   findings, the sweep and the one honest limit (identifying a launchd
   relaunch). Process note: the first commit's code came before its
   tests; the coordinating session accepted a recorded one-off on the
   condition that every original guard be mutated (20, all killed, in
   0feb233e's body). Astra: r1 NOT READY (1 Critical, 10 Important, 1
   Minor), r2 NOT READY (4 partly, 2 new), r3 NOT READY (3 partly); the
   three fixed after r3 (ab7a5de0) without a fourth round, for the
   whole-branch review to check.
4. **Primary: bases, packs, publication diffs, outcomes** (5fb353cd,
   5f233ecc, 7006e3de, 8d83ec65, cfbbc476). `prepareBase` resolves the
   default tip as `Engineer.Exec` does (unborn refused as
   `base_unavailable`), durable and idempotent. `packCommits` packs
   exactly `header.Commits()` (`rev-list --objects --no-walk`), refusing
   bad SHAs, missing commits and non-`ValidHub` repositories before git
   runs; the inventory test reads the pack itself. After a worker's push,
   the primary computes change files and publication-bound diffs (its
   known secrets withheld, file names and old names screened: a secret
   there sends no files or diffs, the push stands). The instance accepts
   them only from the publication's own primary
   (`chat_steps.publication_runner`, in 0120), in either order with the
   worker's `done`, which never touches them; a replaced primary fails
   its pending publication and Retry re-sends the kept candidate to the
   new one. The worker's outcome is recorded only at 37, survives
   publication and republish, and `Pushed` comes only from `published`.
   Oversize Engineering pack ends `workspace_too_large` with Needs you.
   Astra: r1 NOT READY (3 Important), r2 READY.
6. **Darwin MCP tool endpoint** (5bece793, ecd60076; merged, budgets
   d1c3e9bf). `equipo-runner tool-proxy --socket` on darwin speaks the
   Linux proxy's protocol (strict transcript oracle recorded on docs-t1
   2026-11-28); peer uid by `LOCAL_PEERCRED`; sockets under
   `<scratch>/t/`, 103 bytes served, 104 refused before any dial; at
   startup it closes inherited descriptors without close-on-exec and
   empties its environment. `internal/toolproxy` and the Linux digest
   unchanged; the Linux release runner has no darwin endpoint. Astra: r1
   READY AFTER FIXES (3 Important, 1 Minor), r2 READY.
8. **Darwin Engineering policy and settings** (b38a187d, abfcb79e,
   e35b4b5c). Its own certified shape (pinned CLI digest, argv,
   settings, MCP JSON, roots, scratch, denied paths, environment keys,
   `xcode_access`), regenerated and compared byte for byte before every
   launch. `sandbox.enabled`, `failIfUnavailable`, no unsandboxed
   commands, `network.strictAllowlist: true` with no domains, no unix
   sockets, no local binding; Mach lookups only with sandboxed Xcode
   access. Denied both ways: §4.2, the connection's home and runtime
   copy, `<scratch>/t`, and an Engineering-only list of 33 default
   credential places in the home (`~/.claude`, `~/.claude.json`,
   `~/.codex`, gh, git, netrc, Docker, npm, App Store Connect keys,
   shell histories); write-only: the install dir and the pinned CLI's
   dir, with matching native Write/Edit denies. Token only on fd 3
   (`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`); environment from scratch.
   A read-only ask variant and a check-only variant. Required roots
   refused when empty. Linux certified hashes identical (23 shapes).
   Astra: r1 NOT READY (3 Important), r2 READY.
5. **Darwin Claude Code pin** (053eab8f, 491b09c4; merged e67a8903).
   `claude.ExecutableSHA256DarwinArm64`; the runner provisions 2.1.312
   from downloads.claude.ai through an `os.Root`, 512 MB bound, digest
   checked before the file is made executable and before every launch;
   every directory from the home down is a real directory owned by the
   runner user with no group or other write, tool dirs 0700; the hashed
   file is held open to `start` and the path re-checked as the same file
   just before it. Discovery never runs an unpinned `claude`. The real
   binary matched the pin (env-gated test, docs-t1). Astra: r1 READY
   AFTER FIXES (2 Important), r2 READY.
7. **Native permission port and paths** (af270613, 0418722d, ad68f025;
   merged ead74b4a; merge fix 1614ca81 moved the §4.2 list to the leaf
   package `internal/runner/mac/denylist`). On darwin each file request
   gets one allow or deny, never a person; paths resolved against the
   real root, compared per component in NFC and case-folded; Grep walks
   its target with no-follow, inode-checked opens in 256-entry batches up
   to 200,000 entries and refuses hard links, escaping links, errors and
   changed types; Bash is allowed (every command sandboxed),
   `SandboxNetworkAccess` denied; `CLAUDE_CODE_PROJECT_DIR_NAME=-workspace`
   pins the transcript directory. Linux settings and certified hashes
   identical for 21 launch shapes. Astra: r1 NOT READY (Critical: Grep
   read hard links; Important: Unicode), r2 NOT READY (3), r3 READY.

## Decisions

- **Protocol 1 primary exception (task 3): declined.** The plan keeps
  "the protocol 1 primary exception from `mac-placement-wait`", but that
  branch's own Astra round (74140828) removed it: an older primary is no
  exception, and Mac work waits. The brief resolves conflicts in favour
  of what landed. Astra round 2 on task 3 agreed.
- **Termination sweep (task 9), approved by the coordinating session
  2026-11-28:** besides the attempt's group and the marker, the runner
  records every group and session seen under the CLI while the turn
  runs, and at stop sweeps every runner-uid process started after the
  turn began, except the runner and the helpers it started for itself
  (tracked by PID and start time, never by name) and launchd-started
  system agents. Recorded as a spec §5 addendum in task 9.

- **Network deny (task 8):** settings add `network.strictAllowlist:
  true`, and the permission tool denies `SandboxNetworkAccess`. Empty
  `allowedDomains` alone asks (task 1, S2).
- **Token by descriptor (tasks 8, 10):** the token goes only through
  `CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`, never in `claude`'s
  environment (R4: a sandboxed command can read it through
  `KERN_PROCARGS2`), and no `.oauth_token` file exists in the runtime
  config dir. F3 proves it, including that the descriptor is not open in
  Bash children.
- **Scrub side effects (tasks 7, 8):** `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1`
  stays. It forces permission mode `default` and turns off
  `autoAllowBashIfSandboxed`, so the permission tool answers Bash
  itself: allow, since every command is sandboxed
  (`allowUnsandboxedCommands: false`, `failIfUnavailable: true`). The
  golden settings and argv record what the CLI is given; the plan's
  `autoAllowBashIfSandboxed: true` stays set but is not relied on.
- **Transcript dir (task 7):** on darwin the launch pins
  `CLAUDE_CODE_PROJECT_DIR_NAME=-workspace` (a certified environment
  key), so a kept session resumes in any worktree without a move, and
  the layout matches Linux. `transcriptPath` uses the pinned name. If a
  live resume shows the variable ignored, fall back to the S6 rule and
  the move (cost: task 7 rework, seen at the witness).
- **Startup Keychain reads (task 10):** accepted. With a per-attempt
  `CLAUDE_CONFIG_DIR` the service name is unique, so the reads find
  nothing. No `security` shim. Task 10's before and after listing still
  catches any write.

- **D1 (Paul, 2026-11-28): no.** Once the Studio holds a Claude token,
  checks there run sandboxed or not at all. This is the plan's default
  (task 15's `unsandboxedAllowed(runner)` predicate on each side).
- **D2 (Paul, 2026-11-28): keep `paulequipo`.** Paul signs in Claude for
  it at the witness (task 18) and runs `chmod 700 ~` as `paulequipo` if
  the home-folder guard asks. The taint gate stays as built (a runner
  tainted on its instance record or in its own state takes no model
  connection); the Studio's production enrolment carries no taint.

## Only the Mac can show

- Recordings owed from tito-studio as the runner user: `security
  dump-keychain` of the login keychain (the fixture is constructed from
  the documented format), its `cdat` format, whether the listing works
  in a launchd session without a prompt, and `kern.boottime` through
  `unix.SysctlTimeval` on macOS 27.2 (task 10).
- `proc_pidpath`, `getsid` (also for other users' processes) and
  `kern.proc` on 27.2, and whether kernel start times and the runner's
  clock agree closely enough for the relaunch cutoff (task 9).
- Whether the token descriptor stays open in Bash children, whether the
  CLI re-reads it, and whether a managed settings file overrides the
  per-attempt settings (task 8, F3).
- The check-to-use race and hard links from Bash (task 7, F6).
- The whole of F1 to F7 (task 14) has run only against fakes: whether
  the CLI asks the permission tool for every Bash command, whether
  `xcodebuild` builds from a read-only fixture directory, the CLI's
  permission-denied wording, `/bin/ps` exiting 126 in the Bash sandbox,
  the runner's reader inside the sandbox, the hostile Swift added to the
  P2 fixture, and launch A's roughly 100 tool calls on the small model.
  Each fails closed. A probe run can hold the Mac's turn for up to
  about 50 minutes.

## Open issues

- Do not release between task 2 and task 4: the build says 37 before the
  behaviour behind it lands.
- The four new reasons are not in `StepReasons` yet; the task that first
  sends each adds it with pending copy (3: `base_unavailable`; 4 and 10:
  the others).
- Pre-existing, not slice F: downgrades for protocols 26, 28, 31 and 35
  keep explicitly empty keys on message types slice F does not touch
  (for example a lease with `"access_card":""` below 26). A general fix
  (re-encode every decoded frame below the current protocol) is for the
  parent to schedule.
- Seen while verifying task 2 on docs-t1: 28 `internal/runner/thin`
  preview, devbox and site tests fail at 697ff1bc as well (to check
  against `origin/main` before `make ci`); `TestPlan3ReleaseBoundaries`
  fails on `work.needs.mac_runner`, copy pending from
  `mac-placement-wait`.

- **Termination of Bash commands (task 9), raised with the parent
  2026-11-28.** Each Bash tool command runs in its own session and
  process group (`detached: true`), so signalling the attempt's group
  misses them, and on 27.2 `ps -E` cannot see the marker on the platform
  binaries that make up the chain. The §5 sweep as written misses a
  sandboxed `sleep 1000 &`.
- Spec §4.1 says sandbox-runtime 0.0.81 and "empty means no network";
  2.1.312 differs (see Decisions). Spec §4.5's
  `log stream --predicate 'process == "sandbox-exec"'` does not match
  this build's tagging; match `Sandbox:` deny lines.
- The Studio has three iOS runtimes, one device-specific
  (`iOS-27-2-iPhone19-4`); simulator choice must not assume one runtime
  per version.
- Studio Machines page line (protocol, P1 to P7, taint): needs Paul's
  sign-in; the parent is relaying it.

## Copy
