# Retained legacy worker files

On the next normal start, King removes the retired AgentSpine plugin registration, its hooks and MCP entry, managed plugin copies, plugin state under `state/agent-spine` and `agentspine` in the King application directory, the copied skill and the old reader launcher. This covers the shared King directory and its named profiles, including orphaned plugin copies from previous updates. Inherited AgentSpine runtime variables are not passed to the new core process.

## Retained working files

Five known paths are excluded from automatic deletion. Their expected schema names are listed beside them; every log line must have the stated log schema:

- `worker/goal-status-v2.json` — `blun.king-goal-status/v2`
- `worker/goal-status-v2.json.lock` — `agentspine.owned-file-lock/v1`
- `worker/goal-queue-checkpoint.json` — `blun.king-goal-queue-checkpoint/v1`
- `worker/worker.log` — `blun.king-goal-worker-log/v1`
- `skills/.agent-spine-install.lock` — `agentspine.owned-file-lock/v1`

A separately started old worker can remain active after a King window closes. Its acceptance and delivery records prevent duplicate jobs and messages. A missing or old lock does not prove that its process has stopped. The installer reports these candidate paths as pending; it does not read their contents or delete them. A clean active profile can still start.

For manual cleanup, first stop the clearly identified old worker and any old skill installation process. Verify the exact active or shared King home, the ownership and schema of each file, and that no parent or target is a link or shared hardlink. Only then remove the individual obsolete files listed above. If a file is unknown, malformed, inaccessible or still in use, leave it in place for inspection. Keep the `worker` and `skills` directories and every other file. This procedure does not mean that automatic data removal is complete.

## What startup checks

The report uses only the presence of the five candidate names and canonical parent paths. It does not open file contents, inspect process arguments, infer abandonment from file age, stop a worker, or delete any working file. An inaccessible or redirected parent is reported conservatively as pending. Unrelated directory entries are not enumerated or removed.

Presence is not an ownership or quiescence proof. The aggregate candidate list does not preserve profile attribution and must not be used as a deletion manifest. A pending candidate makes cleanup incomplete while allowing the clean active profile to launch. Separate inactive-profile failures retain their existing notice.

No new persistent record, recipient or network request is introduced. The existing plugin/settings/payload retirement still runs; these additional working files and installation locks remain an explicit exception. No operating-system restart detection or automatic process termination is implemented.
