{
  "summary": "## Verdict\n\n**The current Psyche implementation cannot launch an OMP session that independently registers as adapter `boot` under supported OMP behavior.** The only daemon-driven Psyche execution is `[session.psyche_resume]`; `[session.psyche_init]` is a declarative go-live gate and is never spawned according to the published spt-core contract. `psyche_omp::turn_cmd` always supplies `--no-extensions`, supplies no `--extension`, and OMP's published extension-loading contract says the CLI flag disables every extension source, including CLI paths. The same is true of the echo-commune OMP child.\n\n**The normal native hosted OMP is different and can load two independently registering extensions.** `launch_omp::omp_argv` always supplies the packaged `omp-spt.mjs` with `--extension`, but does not supply `--no-extensions`. OMP therefore loads the packaged extension *and* its normal discovery/config/plugin extension inputs. The packaged extension pins its bind to `--adapter omp-spt`. A separately discovered extension that registers or binds with `--adapter boot` can produce the second history session. [INFERENCE] This is the only code- and public-contract-consistent route to the exact pair `omp-spt` + `boot`; no live repository code contains a `boot` adapter registration producer.\n\n### Exact registration-producing paths\n\n1. **Manifest-selected native launch**\n   - Fresh: `adapter/omp-spt.toml:68-74`, `[session.self]` → `{adapter_dir}/omp-spt launch-omp --id {id} --extension {adapter_dir}/strings/omp-spt.mjs`.\n   - Resume: `adapter/omp-spt.toml:76-81`, `[session.resume]` → same helper plus `--resume {session_id}`.\n   - `tools/omp-spt/src/launch_omp.rs:48-58`, `omp_argv`: fresh becomes `omp --extension <packaged>`; resume becomes `omp -r <sid> --extension <packaged>`. Neither disables discovery.\n   - `tools/omp-spt/src/launch_omp.rs:405-469`, `run`: resolves OMP, snapshots endpoint environment, then execs/spawns the native OMP command with inherited stdio.\n   - `adapter/strings/omp-spt.mjs:3` fixes `ADAPTER = \"omp-spt\"`; `:427-429` activates only when `SPT_ENDPOINT_ID` is nonblank; `:1023-1031` handles every OMP `session_start` by spawning `spt api --adapter omp-spt bind <id> --set-session-id <sid>`; `:929-937` subsequently starts `spt ready <id>` as the relay holder. **The bind at 1027 is the repository's sole session-registration producer.** Searches found no `api seed` producer and no `--adapter boot`/`SPT_ADAPTER=boot` producer in active omp-spt source or manifest.\n   - `adapter/strings/omp-spt.mjs:248-270`, `runSpt`: all extension API calls are external `spt` child processes; `OMP_SPT_SPT_BIN` can substitute a recorder/fake for deterministic testing.\n\n2. **Psyche role**\n   - `adapter/omp-spt.toml:50-66`: both role tables name `psyche-omp`, but the public spt contract at `https://sabermage.github.io/spt-releases/llms-full.txt` lines 2892-2923 explicitly says `psyche_init` is gate-only and `psyche_resume` is the sole driven role, one captured bounded turn per event.\n   - `tools/omp-spt/src/psyche_omp.rs:66-77`: nonempty mind file means first turn; empty file means continuation.\n   - `:80-98`: private session root is `<psyche-context-parent>/omp-sessions`; a continuation requires an existing JSONL.\n   - `:103-123`, `turn_cmd`: `-p`, optional `-c`, private `--session-dir`, restricted tools, and always `--no-extensions --no-skills --no-rules`; there is no packaged extension argument.\n   - `:156-181`: daemon invocation reloads the endpoint's eight-selector environment snapshot.\n   - `:208-235`: blank mind+event acks without spawning; missing continuation session exits 95 before spawning.\n   - `:261-292`: only after those checks does it resolve OMP and run the extension-free command.\n   - `tools/omp-spt/src/digest_omp.rs:201-279`, `SessionEnv::{install_process,apply_to_command}`: only eight OMP locator/profile variables are overwritten. Other inherited variables, including `SPT_ENDPOINT_ID` or `SPT_ADAPTER` if a caller supplied them, are not scrubbed here. The manifest itself strips only `OWL_SESSION_ID` and `SPT_AGENT_ID` (`omp-spt.toml:55-56,64-65`). **Even with such leaked identity variables, no registration code executes because all extension loading is disabled.** Counterfactual: if OMP ignored/regressed `--no-extensions`, a discovered external extension could then see those inherited variables and register; that would be an unsupported OMP behavior or an external-extension defect, not the current Psyche launch design.\n\n3. **Echo-commune child**\n   - `adapter/omp-spt.toml:83-93` selects `echo-commune-omp` and strips the same two identity variables.\n   - `tools/omp-spt/src/echo_commune_omp.rs:201-218`, `turn_cmd`: `-p --no-session ... --no-extensions --no-skills --no-rules`.\n   - `:783-842`: restores the endpoint selector snapshot, version-resolves OMP, and launches the bounded extension-free turn. It cannot register through an OMP extension under the supported CLI contract.\n\n4. **OMP subagent/nested-session path inside the native host**\n   - `adapter/strings/omp-spt.mjs:1023-1031` does not distinguish the root hosted session from an in-process task/subagent session; it responds to every `session_start` with a bind attempt using the process-wide `SPT_ENDPOINT_ID`.\n   - OMP's public development docs state task subagents are in-process and created through normal session creation. Observable local OMP logs corroborate this: `C:/Users/decid/.omp/logs/omp.2026-07-15.log:46-48,159-163,291-294` shows repeated `omp-spt could not bind emphasys`/`CONFLICT`/`AUTH_REFUSED` adjacent to `phase:subagent:*`, all under the same PID. This is a real additional registration-attempt path, but it is pinned to **`omp-spt`**, not `boot`, and the observed conflicts prevent it from explaining a successful `boot` history row by itself.\n\n### Environment and extension inputs that can produce `boot`\n\nOMP's public `docs/extension-loading.md` (`https://raw.githubusercontent.com/can1357/oh-my-pi/master/docs/extension-loading.md`, especially lines 15-120) defines the inputs active on native launch:\n\n- cwd-local `<cwd>/.omp/extensions`;\n- active-profile user directory `~/.omp/agent/extensions`, or `~/.omp/profiles/<profile>/agent/extensions`;\n- `PI_CODING_AGENT_DIR` relocation of the user agent directory;\n- `<cwd>/.omp/settings.json#extensions` and user `settings.json#extensions`;\n- merged user/project `config.yml` `extensions` arrays;\n- discovered JS/TS hook factories;\n- extension entries from enabled installed plugins (`omp.extensions` / legacy `pi.extensions`);\n- explicit CLI `--extension/-e` and `--hook` paths.\n\n`OMP_PROFILE`/`PI_PROFILE`, `PI_CODING_AGENT_DIR`, `HOME`/`USERPROFILE`, and cwd select those sources; `launch-omp` snapshots/restores them for daemon lifecycle continuity. `SPT_ENDPOINT_ID` activates the packaged extension. `SPT_ADAPTER` is unused by omp-spt, but an external generic boot extension could read it. On this workstation, `C:/Users/decid/.omp/agent/config.yml:1-12` declares no extension list; no user extension directory and no repo `.omp` directory were present. Therefore a locally observed `boot` producer, if still reproducible, is more likely an installed plugin/hook entry or a separately supplied extension than these two visible config locations. [INFERENCE]\n\n### Fresh versus resume\n\nOMP public issue `can1357/oh-my-pi#3073` documents that fresh startup and CLI restore/resume both emit the same opaque `{type:\"session_start\"}`. `/clear` and `/compact` use other lifecycle events. Therefore neither the packaged extension nor any boot extension listening only to `session_start` can distinguish `[session.self]` fresh launch from `[session.resume]` native `-r` resume. Both paths load the same packaged extension plus normal discovery, so the duplicate should occur on both if an external boot extension is the cause.\n\n### Falsifiable predictions\n\n1. With isolated cwd and isolated `PI_CODING_AGENT_DIR` containing no plugin/hook/extensions, fresh and `-r` native launches produce exactly one bind call, and its argv contains `--adapter omp-spt`; there is no `boot` history session.\n2. Put a probe extension that records/registers adapter `boot` in any one documented discovery source. Both fresh and resume produce two startup calls: packaged `omp-spt` plus discovered `boot`. Remove/disable that extension and the `boot` row disappears.\n3. A Psyche pulse produces either no OMP child (blank ack or exit-95 reseed) or one `omp -p [optional -c] ... --no-extensions` child. It produces no extension bind call even when the same probe exists in project/user/plugin discovery.\n4. `omp --version` version-probe children do not emit `session_start` and therefore never create history entries; registrations begin only with the real OMP invocation.\n5. If `boot` appears only after task/subagent creation, the foreign boot extension is also being loaded into in-process subagent sessions. If it appears immediately on every clean root launch before any subagent, the native startup discovery path alone is sufficient.\n6. If a `boot` row still appears from the isolated Psyche command with `--no-extensions`, then at least one premise is false: the selected OMP binary ignored the public flag, an external process made the API call, or `boot` is not actually the adapter field. The current repository has no path that can emit it.\n\n### Proposed deterministic repro seam (no production edit required to exercise concept)\n\nUse OMP's public headless mode plus `OMP_SPT_SPT_BIN` as an argv recorder, in an isolated temporary cwd and `PI_CODING_AGENT_DIR`:\n\n1. Install two tiny test extensions: an explicit packaged-probe equivalent that calls/logs `api --adapter omp-spt bind`, and an auto-discovered `<tmp-project>/.omp/extensions/boot.mjs` that calls/logs `api --adapter boot bind`. Both register only on `session_start` and exit through a fake `spt` recorder rather than touching real SPT state.\n2. Run a one-turn real OMP matrix so it exits deterministically:\n   - native-equivalent: `omp -p --no-session --extension <omp-spt-probe> @prompt` from the project cwd → expect both recorder lines;\n   - isolated native: same command from a clean cwd/user dir → expect only `omp-spt`;\n   - Psyche-equivalent: `omp -p --session-dir <private> --no-extensions @prompt` → expect zero recorder lines.\n3. Pair that loader matrix with the existing pure argv seams: `launch_omp::omp_argv` and `psyche_omp::turn_cmd`. This avoids endpoint-history internals entirely and deterministically proves which OMP invocation permits which registration extension.\n4. Existing test infrastructure already supplies the other half: `tools/omp-spt/tests/launch_omp.rs:157-178,324-351` records fresh/resume argv through a fake OMP; `tests/omp-extension.mjs:144-180,286-324` injects a fake environment and records exact `spt`/listener children. The missing regression is a discovery-isolation matrix asserting native allows only the intentionally packaged extension or explicitly documenting that foreign discovery is allowed. Current tests assert forwarded `--extension` but never assert absence/presence of auto-discovered extensions at the real OMP boundary.\n\nNo files were edited and no tests were run. No spt-core source was inspected.",
  "files": [
    {
      "path": "adapter/omp-spt.toml",
      "description": "Lines 9-18 define adapter identity and `host_binaries=[\"omp\"]`; 38-43 post-spawn identity; 50-66 Psyche gate/driven roles and identity scrub; 68-81 fresh/resume native launch commands; 83-109 echo role and injected endpoint id."
    },
    {
      "path": "tools/omp-spt/src/launch_omp.rs",
      "description": "`omp_argv` at 48-58 is the native fresh/resume shape; `probe_omp_binary`/`resolve_omp` at 318-389 creates a short `--version` child; `run` at 405-469 snapshots env then execs/spawns OMP with the packaged extension and normal discovery still enabled."
    },
    {
      "path": "tools/omp-spt/src/psyche_omp.rs",
      "description": "First/continue planning and private directory at 66-145; execution at 156-312; `turn_cmd` 103-123 always disables extensions; pre-spawn ack/reseed paths 208-235; OMP child launch 261-292."
    },
    {
      "path": "tools/omp-spt/src/digest_omp.rs",
      "description": "Lines 201-279 define the eight-variable endpoint snapshot and show that applying it changes only OMP profile/storage/executable selectors, leaving unrelated inherited identity env untouched."
    },
    {
      "path": "tools/omp-spt/src/echo_commune_omp.rs",
      "description": "Lines 201-218 define the extension-free/no-session summarizer argv; 783-842 restore selectors and launch the bounded OMP child."
    },
    {
      "path": "adapter/strings/omp-spt.mjs",
      "description": "The sole in-repo registration producer: `ADAPTER` line 3; external command spawn 248-270; endpoint-id activation 427-429; state/session-end 574-599; `spt ready` relay child 929-937; unfiltered `session_start` → pinned `api --adapter omp-spt bind` at 1023-1031."
    },
    {
      "path": "tools/omp-spt/tests/launch_omp.rs",
      "description": "Lines 157-178 and 324-351 deterministically record fresh/resume OMP argv, but do not exercise real OMP discovery. Lines 493-538 cover only Psyche resolution failure."
    },
    {
      "path": "tools/omp-spt/src/psyche_omp.rs",
      "description": "Unit seam at 389-431 proves fresh omits `-c`, continuation adds it, and both include `--no-extensions`; 440-470 proves private directory and exit-95 preconditions."
    },
    {
      "path": "tests/omp-extension.mjs",
      "description": "`createHarness` around 144-180 is the exact fake-env/fake-spawn seam; lifecycle assertion at 286-324 proves the extension pins `--adapter omp-spt` and starts one ready listener."
    },
    {
      "path": "tests/manifest-shortcut.sh",
      "description": "Lines 34-49 assert exactly two native manifest launch templates; 94-125 assert both Psyche role declarations, supported keys, identity scrubs, and captured resume behavior. It does not prove OMP discovery isolation."
    },
    {
      "path": "tests/native-launch-manifest.sh",
      "description": "Lines 20-44 assert fresh/resume templates and keys, but only as manifest text; no real extension-loader coverage."
    },
    {
      "path": "OMP-ADAPTER-PLAN.md",
      "description": "Lines 15-74 document native process ownership and start/resume; 107-118 state Psyche is a bounded private OMP turn, not a second endpoint; 166-175 list intended release acceptance."
    },
    {
      "path": "docs-site/src/reference/harness-contract.md",
      "description": "Lines 25-69 document fresh/resume loading the same packaged extension and the `session_start` bind lifecycle."
    },
    {
      "path": "C:/Users/decid/.omp/logs/omp.2026-07-15.log",
      "description": "Observable runtime corroboration at 46-48, 159-163, and 291-294: in-process subagent phases trigger repeated packaged-extension bind attempts under the same native OMP PID; attempts are `omp-spt` conflicts/auth refusals, not `boot` registrations."
    },
    {
      "path": "C:/Users/decid/.omp/agent/config.yml",
      "description": "Current visible user config has no `extensions` declaration; no user extension directory or project `.omp` directory was found."
    }
  ],
  "architecture": "```text\nFRESH SPT-HOSTED ENDPOINT\nspt endpoint run\n  └─ broker PTY\n      └─ omp-spt launch-omp --id E --extension omp-spt.mjs\n          ├─ omp --version                    # short validation child; no session\n          └─ native omp --extension omp-spt.mjs\n              ├─ explicitly packaged omp-spt extension\n              │   └─ session_start\n              │       ├─ spt api --adapter omp-spt bind E --set-session-id S\n              │       └─ spt ready E          # persistent relay child\n              └─ normal OMP discovery remains enabled\n                  ├─ cwd .omp/extensions + config/settings\n                  ├─ active-profile user extensions + config/settings\n                  ├─ JS/TS hook factories\n                  └─ installed plugin entries\n                      └─ [if a boot extension exists] independent spt call with adapter boot\n\nNATIVE RESUME\nspt endpoint run/resume\n  └─ same tree, except actual argv is omp -r S --extension omp-spt.mjs\n     OMP emits the same opaque session_start as fresh, so extension behavior is identical.\n\nPSYCHE EVENT\nspt daemon\n  └─ [session.psyche_resume] omp-spt psyche-omp\n      ├─ blank mind+event -> <psyche-ack/>; no child\n      ├─ continuation without JSONL -> exit 95; no child\n      ├─ omp --version                         # validation only\n      └─ omp -p [-c] --session-dir PRIVATE ... --no-extensions @turn-prompt\n          └─ no extension factory, no SPT registration, bounded exit\n\n[session.psyche_init]\n  └─ no process: manifest presence is only the LiveAgent/go-live gate.\n\nECHO-COMMUNE EVENT\nspt daemon\n  └─ omp-spt echo-commune-omp\n      ├─ omp --version\n      └─ omp -p --no-session ... --no-extensions\n          └─ no extension factory, no SPT registration, bounded exit\n\nIN-PROCESS OMP TASK SUBAGENT\nnative omp process (same PID)\n  └─ child AgentSession emits session_start\n      └─ packaged handler attempts another --adapter omp-spt bind with process-wide E\n          └─ currently observed as CONFLICT/AUTH_REFUSED; cannot itself emit adapter boot\n```\n\nThe architectural fault line is therefore **extension discovery on the root native launch**, not Psyche. Psyche and echo are deliberately discovery-free. Native fresh and resume intentionally load the packaged extension but currently do not isolate it from other OMP extensions, hooks, or plugins; any one of those can become an independent registration producer. Separately, the packaged handler assumes every `session_start` is the root hosted session, while OMP also constructs in-process subagent sessions, creating duplicate `omp-spt` bind attempts."
}