@awebai/oats 0.22.1 → 0.22.2

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.
@@ -0,0 +1,217 @@
1
+ # Full operating-team migration
2
+
3
+ Planning record, 2026-09-05. Juan asked lead to discuss the migration with
4
+ Merlin and plan for all teams on this machine to be managed by OATS, with
5
+ harvesting fully working. This expands the earlier release/configuration
6
+ rollout. It does not describe an already completed migration.
7
+
8
+ The cjr runbook is owned by Merlin at
9
+ `~/cjr/agents/docs/2026-09-05-oats-migration.md`. This document records the
10
+ shared framework work and the wider rollout.
11
+
12
+ Fresh identities are authorized for specialists and reviewers. Merlin retains
13
+ both `cjr.aweb.ai/merlin` and his existing durable DID. Aweb clarified that
14
+ re-minting the same address changes identity and breaks continuity; the supported
15
+ path is an explicit transfer of his existing authority with one live process.
16
+ Other teams' retained identities follow the same requirement where applicable.
17
+
18
+ An isolated check against installed 0.22.1 confirmed that an explicit
19
+ existing spawn destination is refused without changing its instructions or
20
+ uncommitted notes. Purpose-based naming chooses an unused suffix. The old
21
+ cjr respawn-clobber report therefore is not reproduced by this journey;
22
+ identity adoption and concurrent handover still need their own tests.
23
+
24
+ ## Completion means operating teams
25
+
26
+ Every continuing seat must have a supported OATS launch, composition,
27
+ status, handover and retirement path. Its outstanding work, knowledge and
28
+ required skills must survive a change of runtime session; identity/address
29
+ continuity follows the explicit policy for that seat.
30
+ Every remembering role must have a tested learning path; reviewers retain
31
+ their explicit exclusion from accumulated memory. Config discovery alone
32
+ establishes none of this.
33
+
34
+ The published 0.22.1 release supports useful Pi/Claude worker work and
35
+ notes-based harvest. Its observed qualifications included operator-assisted
36
+ retirement. Standing-agent adoption, automatic service retirement and
37
+ record-fed learning remain work, not shipped guarantees.
38
+
39
+ ## Scope inventory
40
+
41
+ Reconfirm the live inventory with each owner at handover; process presence
42
+ and old directories are evidence to investigate, not the authoritative list
43
+ of continuing seats.
44
+
45
+ | Scope | Starting point | Required disposition |
46
+ | --- | --- | --- |
47
+ | `~/awebai/oats` | Live Claude coordinator and Codex lead; managed review workers also running | Oats owns coordinator handover; lead owns lead handover; preserve established identities |
48
+ | `~/cjr` | Knowledge/config preparation landed at `5afb3e8b`; managed developer pilot running; legacy Merlin and Minerva observed live | Merlin owns pilot and safe handovers; preserve his DID and address; harvest acceptance remains pending |
49
+ | `~/awebai/aweb` | Live Claude coordinator and frontend in legacy homes | Oats owns coordinator handover; lead coordinates frontend with aweb after its current work; preserve identities and cover child repositories |
50
+ | `~/tsm` | Five live seats: Zeus, Prometeo, Argos, Themis on Claude; Hermes on Codex. No OATS config/souls found | Lead coordinates with Zeus; cross-team handoff currently rejected by local identity routing; establish a supported route, then prepare souls/knowledge and safe handovers |
51
+ | `~/prj/beadhub-all` | Live Codex session, despite stale offline roster | Lead sent handover request to Beadhub; preserve its established identity and current work; no billing/production changes |
52
+ | `~/prj/docflow` | Live Claude session; credential workspace alias `alice` on `docflow:juan.aweb.ai` | Lead and Merlin establish responsible owner and handover; that alias is not proof of a globally routable address |
53
+ | `ai.aweb` on `aweb-agents` | Athena last seen 53 days ago; remote legacy home exists in inventory | Aweb and oats own archival inspection; do not resurrect as a continuing seat |
54
+ | `~/awebai/demo-aweb/bob` | Live Pi demo | Aweb owns safe stop and archival disposition; it is not an operating-team migration |
55
+ | `~/.turn-record` | Live Pi capture service under launchd | Retain as infrastructure; qualify record capture separately from standing seats |
56
+
57
+ The live inventory above was checked on 2026-09-05 using harness process
58
+ working directories, without interrupting them. Old aweb presence timestamps
59
+ are insufficient to decide whether a harness is alive. A migration plan or
60
+ new soul directory does not establish that the corresponding seat moved.
61
+
62
+ Grace's missing old local path and the offline retirement, docs, bertha,
63
+ cowork, federation, membership-review, aazb-reviewer, id-bugs, billing and
64
+ claweb entries are archival investigations, not launch requests. Preserve
65
+ homes until their work and authority have a recorded disposition. Do not
66
+ bulk-delete aliases based on roster age; certificate cleanup belongs to the
67
+ aweb lifecycle fix and its verified recovery procedure.
68
+
69
+ ## Shared prerequisites and owners
70
+
71
+ Oats coordinates framework/package work and the machine-wide inventory.
72
+ Lead independently reviews the design and concrete journey evidence. Merlin
73
+ owns cjr's repository changes, task selection and eventual handovers. Other
74
+ teams' owners control their work and handover sequence; oats records those
75
+ owners before scheduling each migration. Oats accepted ownership of
76
+ `aweb-abep` (service self-retirement), followed by `aweb-abfz` (record-fed
77
+ learning). Self-retirement merged at 568eeae; record-fed learning is implemented
78
+ and under independent review, with package publication pending. Lead owns
79
+ the full-machine plan and runtime/wake qualification, including the Codex
80
+ support requirement. The aweb coordinator owns identity continuity and route
81
+ semantics, with oats coordinating the rehearsal and package changes.
82
+
83
+ ### Recreate or retain identities according to the actual requirement
84
+
85
+ Cjr's default is a new OATS-minted identity and an explicit handover of
86
+ outstanding work, knowledge, contacts and task responsibility. Old identities
87
+ are retired only after that handover is accepted. Pilot identities remain
88
+ uniquely named so no existing address has to be removed for the experiment.
89
+
90
+ Merlin is the exception. Oats owns the explicit source-authority binding in the
91
+ messaging capability; aweb supplied this supported handover:
92
+
93
+ 1. Rehearse using a disposable self-custodial global identity and a second-team
94
+ contact, checking DID, address, conversations and write attribution.
95
+ 2. Stop the old process. Copy authority only: signing.key, identity.yaml,
96
+ teams.yaml, team certificates, encryption.yaml and encryption keys. Keep
97
+ private files owner-only; exclude workspace.yaml and caches.
98
+ 3. In the new home run `aw workspace connect --service <url> --team <team>` to
99
+ rebind the existing identity. Do not mint or join as a new identity.
100
+ 4. Verify the same DID/address, host/path binding, heartbeat, message routes and
101
+ task writes. Preserve the old home for rollback until acceptance, then remove
102
+ its old credential copy. Never have two processes using the identity.
103
+
104
+ Do not delete Merlin's global workspace as part of handover: aweb reports that
105
+ this is unsupported and can release claims. Retiring a managed execution with
106
+ retained authority must release the execution without destroying the identity.
107
+ Never put credentials in Git or manufacture instance.json for adoption.
108
+
109
+ ### Make harvest finish without an operator
110
+
111
+ Kernel issue `aweb-abep` is real in 0.22.1: bare `retire --self` is refused,
112
+ while the harvester's instructions tell it to use that command. Oats owns
113
+ the supported service-exit path, with lead review. A deferred external
114
+ retirement is a candidate; the live agent must not inspect and delete its
115
+ own working state. Completion requires an actual harvester to finish,
116
+ report and clean up without operator retirement, with visible recoverable
117
+ failure rather than silent loss. Do not release capabilities while the
118
+ runtime can still act, or make the read-only status command delete homes.
119
+
120
+ Review cjr's local `memory-harvest` override before the pilot: selected
121
+ implementation, required skill, authenticated model, source worktree,
122
+ promotion destination and self-harvest exclusion. The configured model is
123
+ OpenAI via `openai-codex/gpt-5.5`, already used by the local record/mind setup.
124
+ Pi is needed even for Claude workers. A model setting is not proof of a run.
125
+
126
+ ### Finish temporary identity retirement
127
+
128
+ The aweb owner must resolve the remote lifecycle defect tracked under
129
+ `aweb-aaum.6`; oats coordinates package integration. The five leaked release
130
+ identities are a reproduction. Independently verify coordination cleanup,
131
+ claims and certificate state. Admin cleanup is a recovery procedure, not
132
+ proof of automatic retirement. This gates temporary-worker completion;
133
+ adopted standing executions instead must preserve their durable identity.
134
+
135
+ ### Recover standing executions after reboot
136
+
137
+ Tmux and Herdr keep agents alive when a viewer disconnects; a machine reboot
138
+ ends those executions. Replaying `instance.json.command` manually does not
139
+ refresh OATS's independent session receipt and is not a supported recovery.
140
+ The first planned recovery reuses the tested retained-authority handover:
141
+ preserve the stopped home, knowledge and identity, then create its replacement
142
+ with a new receipt and one active holder. That capability binding is not built
143
+ yet; until qualified, rebooted standing seats remain down. A terminal-only
144
+ restart operation may follow; it must refresh the receipt without rerunning
145
+ resource-provisioning hooks. No automatic supervisor is required for the first
146
+ supported manual recovery.
147
+
148
+ ### Include noncoding learning and all actual runtimes
149
+
150
+ `aweb-abfz` is the open record-fed learning epic. Its bounded acceptance is
151
+ a standing session that wrote no notes and made no code commit producing a
152
+ reviewed knowledge proposal with provenance to exact recorded turns, then a
153
+ successor reading that knowledge. Notes-based harvest must continue working.
154
+ Oats owns this after service self-retirement: select the source instance's
155
+ own recorded turns through a record helper, feed them to existing OKF
156
+ judgment, and deliver proposals through the same review path. Verify exact
157
+ source provenance, correct soul destination and safe repeat processing.
158
+ Storing transcripts or running the mind daemon alone does not satisfy this
159
+ gate.
160
+
161
+ The inventory includes Codex sessions. Main now includes reviewed native Codex launch (b7d4159), alongside Pi
162
+ and Claude; released Codex launch/status/stop/composition support is required
163
+ unless a seat's owner explicitly chooses a runtime change. No silent fallback
164
+ to Pi. Test channel delivery with the installed runtime and selected config;
165
+ manual polling is not wake-up. Establish any actual machine-policy change
166
+ needed before making it. Include daemon health and restart/recovery behavior
167
+ in the operating instructions.
168
+
169
+ ## Rollout sequence
170
+
171
+ 1. **Prepare without disturbing sessions.** Record each seat's identity,
172
+ home, work path/branch, outstanding tasks/messages, notes, skills and
173
+ launch mechanism. Review/commit the isolated config changes. Give every
174
+ knowledge store a disposition, preserving source material; migrate needed
175
+ context into indexed soul knowledge and team rules. Materialize required
176
+ skills explicitly instead of depending on a user's Claude skill links.
177
+ 2. **Rehearse required identity transitions on test identities.** Prove
178
+ temporary retirement and Merlin-style retained-authority handover, including
179
+ cross-team routing. If another team requires retained-key adoption, test
180
+ its write binding, exclusivity, failure recovery and retained-identity
181
+ retirement separately. Do not use the active Codex lead or a standing
182
+ coordinator as the initial experiment.
183
+ 3. **Run cjr's useful worker pilot.** Merlin selected extending
184
+ `kb/tools/kb-jobs-check.py` to cover the machine's launchd jobs. Limit the
185
+ task to health reporting; do not enable/disable jobs. Use a fresh named
186
+ developer in a worktree and a fresh code reviewer. Verify required skills,
187
+ aw communication, a reviewed task commit, a real harvested promotion on
188
+ the correct branch, and a second developer reading the promoted lesson
189
+ through the soul's index. Verify harvester and worker retirement. A
190
+ workaround-assisted run is recorded as partial, not automatic completion.
191
+ 4. **Transfer cjr seats at agreed safe boundaries.** Prove the never-run
192
+ roles with new managed workers. Then hand Hermione's and Dumbledore's work
193
+ to fresh identities, followed by Minerva's work; Merlin goes last using the
194
+ verified address-continuity procedure. Checkpoint work/mail/notes and
195
+ explicitly transfer responsibilities. Avoid duplicate owners of the same
196
+ task. Preserve old homes until successor acceptance; retire old identities
197
+ through the supported remote path. Every remembering role gets the learning
198
+ check; reviewers get the exclusion check.
199
+ 5. **Repeat across the inventory.** Prepare other scopes in parallel with
200
+ framework work; apply the proven handover with each team owner. Oats/aweb,
201
+ tsm, beadhub and docflow all need explicit outcomes. Offline homes receive
202
+ an explicit disposition. Retire old launch scripts only after no continuing
203
+ seat depends on them.
204
+ 6. **Qualify continuous operation.** Prove record-fed promotion for noncoding
205
+ sessions, successor knowledge use, wake-up and recovery, and working health
206
+ checks. Document one supported operator path to start, inspect, hand over,
207
+ harvest and retire each role. Close the full migration only then.
208
+
209
+ ## Evidence and progress
210
+
211
+ Keep separate milestones per team: config ready; skills/knowledge ready;
212
+ new workers qualified; standing seats transferred; learning qualified;
213
+ retirement/recovery verified. Record exact published versions and relevant
214
+ commits. Preserve failed-step evidence and outstanding limitations; do not
215
+ substitute a green `doctor`, a roster row or a successful hook report for
216
+ the corresponding live check. Keep credentials and private case data out of
217
+ the shared rollout record.
@@ -0,0 +1,69 @@
1
+ # OATS v0.22.2
2
+
3
+ OATS now launches native Codex, supports Herdr alongside tmux, and routes
4
+ agent lifecycle commands to registered SSH servers. This release also adds
5
+ record-fed harvesting and lets agents finish their own retirement.
6
+
7
+ ## Native runtimes and one permission setting
8
+
9
+ Choose Pi, Claude Code or Codex when creating or spawning an agent. Codex
10
+ uses its native CLI, instructions and skill discovery. Unknown runtimes are
11
+ rejected before provisioning.
12
+
13
+ Set `yolo: true` in a scope's `oats-config.yaml`, override it in a soul, or
14
+ use `oats spawn --yolo` / `--no-yolo`. Desktop offers the same launch choice.
15
+ Codex receives `--yolo` and a launch-local trust setting for the generated
16
+ home; Claude receives `--dangerously-skip-permissions`. Pi is unchanged.
17
+ With no setting, OATS leaves native permission policy in place.
18
+
19
+ ## Persistent terminals and SSH execution
20
+
21
+ Use `--backend tmux|herdr` at spawn. The instance's saved session receipt
22
+ identifies its execution; inspect, input, attach and retirement use that
23
+ original target. Closing a viewer leaves the agent running.
24
+
25
+ `oats session inspect|input|attach --home <absolute-home>` provides the
26
+ harness-neutral terminal interface. Input sends literal text and Enter;
27
+ submission is not proof that the agent processed a message.
28
+
29
+ Register an existing SSH host with `oats server add`, then use `--server`
30
+ on spawn, status, retire and session inspect/attach. Saved routes keep
31
+ retirement and attachment available if a registration changes. SSH retains
32
+ responsibility for keys and host verification. Desktop includes a server
33
+ selector and the remote terminal adapter; remote roster projection remains
34
+ a follow-up, so use the CLI to attach to a remote instance in this release.
35
+
36
+ Live checks covered native Codex launch and subsequent terminal input on
37
+ both local backends. A real remote Claude session accepted input through
38
+ the Desktop terminal helper, survived viewer closure, and ended its viewer
39
+ on retirement. Herdr roster checks include public IDs beyond the ninth
40
+ workspace. These checks do not establish reboot recovery.
41
+
42
+ ## Learning and retirement
43
+
44
+ The official `oats.okf` 1.5.0 capability can feed harvest from an instance's
45
+ captured turns even when it wrote no notes. It selects that home's sessions,
46
+ reads bounded windows, and advances its watermark over the supplied record.
47
+ Notes-based harvesting remains supported. Record commands require Node 22.5
48
+ or later on the execution host.
49
+
50
+ `oats retire --self` records retirement intent and starts detached completion.
51
+ Completion stops the runtime before releasing capability resources and
52
+ removing the home. Failed cleanup remains visible and recoverable through
53
+ status. The roster also stops treating retirement bookkeeping directories
54
+ as instances. Retiring an instance whose work tree is large no longer fails with
55
+ `git ENOBUFS` during work preservation: every git call on the retirement path
56
+ now runs with a buffer far above Node's 1 MiB default (found on a real
57
+ ~9,500-file tree).
58
+
59
+ ## Package versions and remaining work
60
+
61
+ The catalog pins `oats.okf` v1.5.0 and `oats.aweb` v1.9.0. The latter updates
62
+ native Codex's messaging instructions; its Pi and Claude channel delivery
63
+ is unchanged. Native Codex has no automatic aweb delivery in this release.
64
+
65
+ The aweb host wake broker, session-delivery capability glue, retained-identity
66
+ handover and supported standing-seat reboot recovery are still being
67
+ completed. Hosted temporary aliases also remain non-reusable until aweb's
68
+ certificate-retirement fix ships; use fresh purpose names. A configured
69
+ team or successful spawn does not mean its standing agents have migrated.
@@ -0,0 +1,94 @@
1
+ # Servers: running instances on another machine
2
+
3
+ A **server** is another machine with its own installed OATS, reached over an
4
+ OpenSSH host alias. Registering one lets `oats spawn`, `oats retire` and
5
+ `oats status` run there with the same flags and the same JSON envelope as
6
+ locally, and lets the Desktop offer it at spawn time. The contract behind
7
+ this is the execution-targets contract (`docs/execution-targets.md`, landing
8
+ with the transport work).
9
+
10
+ ## Register
11
+
12
+ ```bash
13
+ oats server add build --ssh build-host --workspace /srv/team --oats /usr/local/bin/oats
14
+ oats server check build # ssh reachability, remote oats version, workspace roster; no mutation
15
+ oats server list
16
+ ```
17
+
18
+ - `--ssh` is an OpenSSH host alias or host name. Keys, users, ports and host
19
+ verification live in your `~/.ssh/config`; the registry stores none of it and
20
+ refuses `user@host` or option-shaped values. Connections are non-interactive
21
+ (`BatchMode=yes`): a host that would prompt fails fast with ssh's message.
22
+ - `--workspace` is the absolute path of an OATS workspace on the server: the
23
+ same team repository checked out there, with its own `agents/`.
24
+ - `--oats` is the remote executable (default `oats` on the login shell's PATH).
25
+ - `--path` names directories to prepend to the remote PATH for every routed
26
+ command (`~/.local/bin:/opt/pi/bin`). A non-interactive ssh command runs in
27
+ the login shell's minimal PATH, and the remote kernel's spawn preflight looks
28
+ for the runtime binary (`claude`, `pi`, `codex`) there; without this, a
29
+ runtime installed under the user's home is "not found" even though it runs
30
+ fine in an interactive shell on that host.
31
+ - Registrations live in `~/.oats/servers.json` on this machine, never in a
32
+ repository scope.
33
+
34
+ ## Run there
35
+
36
+ ```bash
37
+ oats spawn dev --server build --purpose fix-123 --task-file task.md
38
+ oats status --server build
39
+ oats retire dev-fix-123 --server build
40
+ ```
41
+
42
+ The remote kernel does the work in its registered workspace: composition,
43
+ worktree, identity, launch, retirement. The local side only routes: a local
44
+ `--task-file` travels as text, every argument is quoted for the remote login
45
+ shell, and the remote's version and envelope are checked before either
46
+ mutation (spawn and retire). A spawn is also held to what the remote
47
+ advertises: a runtime it does not list (including the soul's own default as
48
+ the remote roster reports it), a session backend it lacks, or a launch option
49
+ such as `--yolo` it does not know is refused with `E_REMOTE_INCOMPATIBLE`
50
+ saying what was established. A remote that advertises nothing (any kernel
51
+ before 0.22.2) is assumed to run pi and claude on tmux with no options, and
52
+ the refusal says so rather than claiming the remote lacks the feature; a soul
53
+ the remote roster does not list with a runtime is validated by the remote
54
+ kernel itself at spawn. `--dir` and `--server` do not combine; the remote
55
+ workspace comes from the registration.
56
+
57
+ ```bash
58
+ oats session attach --server build --instance dev-fix-123 # viewer through an ssh PTY
59
+ ```
60
+
61
+ The viewer runs the execution host's own `oats session attach` (Herdr terminal
62
+ or an isolated tmux linked viewer) over `ssh -t`, addressed by the saved route:
63
+ the remote binary and path come from the snapshot, never from the caller. The
64
+ `oats session` commands ship in kernel 0.22.2: against an older server both
65
+ session routes refuse with `E_REMOTE_INCOMPATIBLE` before connecting a viewer,
66
+ and `ssh -t <host> tmux attach -t oats` remains the way in.
67
+
68
+ ## What this machine keeps
69
+
70
+ A **route snapshot** per remote instance under `~/.oats/remote/<server>/`,
71
+ taken at spawn: the ssh host, workspace and oats path the instance was spawned
72
+ through, plus the remote home. Later `retire --server` uses the snapshot, not
73
+ today's registry, so editing or removing a registration never orphans a remote
74
+ home; the snapshot is removed only when the remote kernel reports the home
75
+ gone. Remote state is never cached: `status --server` pulls it every time and
76
+ appends this machine's snapshots for that server.
77
+
78
+ ## Limits
79
+
80
+ - Routed: `spawn`, `retire`, `status`, and, against a 0.22.2 or later
81
+ server, `session inspect` (the execution host's envelope, relayed; a Desktop
82
+ preflight before attaching) and `session attach`. Session input runs on the
83
+ execution host, where the wake broker calls it.
84
+ Desktop projection of remote instances and remote viewer attachment are in
85
+ progress on the execution-targets work.
86
+ - No Git over SSH: repository operations always run on the server, by its
87
+ kernel, in its workspace.
88
+ - A remote needs an OATS at least 0.22.1 (`MIN_REMOTE_VERSION`) for spawn,
89
+ retire and status, and 0.22.2 for the session routes; the record commands
90
+ (`capture`, `recall`) need Node 22.5+ there for `node:sqlite`, which
91
+ lifecycle routing does not.
92
+ - After a remote spawn the Desktop reports the server and remote home; the
93
+ instance does not appear in the local roster (projection of remote instances
94
+ is the next step of the execution-targets work).
@@ -108,6 +108,24 @@ the same work tree. The harvester promotes, merges, or drops notes, commits a
108
108
  `memory-harvest:` change, deletes processed notes, and retires itself. This is
109
109
  how long-lived instances feed their souls while still alive.
110
110
 
111
+ Instances that write few notes still feed their souls. With no notes pending,
112
+ `oats okf harvest` asks the turn record for the instance's own captured
113
+ sessions (the transcripts whose working directory is the instance home), and
114
+ spawns the harvester on the turns captured since the last harvest, bounded by
115
+ exact turn ids. The harvester extracts candidates from them, judges each under
116
+ the same promotion bar as a note, and once its judgement is complete writes the
117
+ watermark `.okf-harvest-record.json` in the instance home, whether or not it
118
+ promoted anything; only a failed harvest leaves the watermark alone, so the same
119
+ window is read again. `oats okf harvest --from-record` consults the record even
120
+ when notes are pending. Windows are sized to one tool-output read (60 turns
121
+ or 96 KB of JSON by default; okf settings `record-window-turns` and
122
+ `record-window-bytes`), so a long backlog drains over several harvests, each
123
+ advancing the watermark only over what was read; the package prepares the next
124
+ watermark as `.okf-harvest-record.next.json` and the harvester's delivery is
125
+ one rename, so an abandoned harvest leaves that file beside the current one.
126
+ oats.okf 1.5.0 requires kernel 0.22.2 (the `capture --home` and `recall --json`
127
+ surfaces); the compatibility floor refuses to activate it on an older kernel.
128
+
111
129
  ### Spawning and coordinating with other agents
112
130
 
113
131
  OATS agents can run `oats spawn` when their instructions or the
@@ -156,9 +174,18 @@ integration self-deletes the instance identity here. For oats-okf, retirement
156
174
  is a knowledge no-op because harvest already happens after commits.
157
175
 
158
176
  `oats retire <instance> --self` lets an instance retire itself when the human
159
- or briefing says it is done. It runs hooks and removes the home first, then
160
- delays the tmux window kill for a few seconds so the instance can report
161
- final status.
177
+ or briefing says it is done. A live runtime cannot give a stable final
178
+ inspection of its own work, so the calling process inspects, runs, and removes
179
+ nothing: it records the intent beside its home as
180
+ `.oats-retire-pending-<instance>.json` and starts a detached completion, then returns so the instance can report final
181
+ status before its tmux window dies a few seconds later. The completion then
182
+ retires the instance exactly as an external `oats retire` would: quiesce the
183
+ runtime, preserve uncommitted work, run retire hooks, repair lineage, remove
184
+ the worktree and the home. Success leaves nothing behind: the home and the
185
+ marker are gone. A failure writes `.oats-retired-<instance>.json` beside the
186
+ retained home (plus the usual quarantine marker when hooks reported incomplete
187
+ cleanup), shows in `oats status` and the Desktop as a failed deferred
188
+ retirement, and is retried and cleared with `oats retire <instance>`.
162
189
 
163
190
  ## Work modes
164
191