{
  "summary": "## Verdict\n\n`--create` is **not a force-fresh guarantee**.\n\nFor the exact command `spt endpoint run --id perri --create`, current source parses `create=true`, but dispatch immediately discards that boolean. From that point forward, “create” means only **`--resume` is absent**. If no live broker session exists, core mints a fresh provisional SPT session identifier, selects the adapter’s merged `[session.self]` role, and asks the broker to create a new PTY-hosted SPT session. Core does **not** possess or transmit a `fresh_claude_conversation` semantic: `SpawnReq` has no create/resume/fresh field, manifest commands are opaque, and the installed `claude-spt:ccs` `[session.self]` template does not even consume the minted `{session_id}`.\n\nMore strongly, `--create` does **not always guarantee a fresh SPT broker session**. If `perri` already has a broker session, the default terminal action (`start=false`) is `RunOnLive::Reattach`; core attaches to the old session and never spawns. If the CLI’s preliminary live probe misses a race, the broker independently deduplicates the spawn request to the already-live session and returns that old numeric broker session ID as a successful `Spawned` response.\n\n## Exact parsed and generated semantics for the requested command\n\nGiven only `spt endpoint run --id perri --create`, clap produces the semantic equivalent of:\n\n- `adapter = None`\n- `id = Some(\"perri\")`\n- `create = true`\n- `resume = None`\n- `start = false`\n- `attach = false` (attach is nevertheless the default action because neither `start` nor `view` branches)\n- `view = false`\n- `subnet = None`\n- `save = false`\n\nAt `crates/spt/src/cli.rs:1385-1414`, `create` is bound as `create: _` and discarded. The existing perch is then read because no adapter was supplied. The current installed record at `C:/Users/decid/AppData/Local/spt-core/owlery/perri/info.json:1` says `adapter=\"claude-spt:ccs\"`, so `resolve_run_target` yields:\n\n- `RunTarget::Direct { adapter: \"claude-spt:ccs\", id: \"perri\" }`\n\n`cmd_endpoint_run` resolves that composite option through `registry::resolve_option`; shipped profile overlay leaf-replacement selects the current installed ccs session roles. Since `resume=None`, `crates/spt/src/cli.rs:1947-1966` generates:\n\n- `is_resume = false`\n- `session_id = mint_session_id()` = a newly generated, exactly 16-character lowercase hexadecimal provisional ID, e.g. `<fresh-16-lower-hex>`\n\nThis ID is an SPT spawn-time placeholder, not the broker’s numeric session ID and not necessarily Claude’s post-spawn UUID.\n\nIf the live-session gate reports **already live**, the effective semantic input is simply:\n\n- `run_on_live_decision(true, start=false) = RunOnLive::Reattach`\n- no manifest expansion\n- no `SpawnReq`\n- `run_attach_session_confirmed(\"perri\", Control)` attaches the existing broker PTY\n\nIf the gate reports **not live**, the exact manifest-expansion catalog at `crates/spt-daemon/src/harnesshost.rs:129-157` is:\n\n- `{id}` = `perri`\n- `{adapter_name}` = `claude-spt:ccs`\n- `{session_id}` = `<fresh-16-lower-hex>`\n- `{session_name}` = `perri`\n- `{adapter_dir}` = `C:\\Users\\decid\\AppData\\Local\\spt-core\\adapters\\_github\\SaberMage-claude-spt`\n- `{node}` = the value returned by `hostlabel::node_fill_label(None)`; `[INFERENCE]` on this machine it is `HFENDULEAM`, corroborated by the installed-session/daemon diagnostics, but the source contract is the resolver result rather than a hard-coded name.\n\nThe current installed ccs fresh role at installed manifest lines 1080-1086 is:\n\n`{adapter_dir}/claude-spt launch --cli ccs --id {id} --node {node}`\n\nThus the filled/tokenized fresh argv is:\n\n1. program: `C:\\Users\\decid\\AppData\\Local\\spt-core\\adapters\\_github\\SaberMage-claude-spt\\claude-spt.exe` (the `.exe` resolution is defined by `runtime.rs:959-990`, and that file exists in the installed adapter directory)\n2. args: `launch`\n3. `--cli`\n4. `ccs`\n5. `--id`\n6. `perri`\n7. `--node`\n8. `[INFERENCE] HFENDULEAM`\n\nCritically, this fresh command contains **no `--resume` and no `{session_id}`**. The newly minted provisional ID therefore has no effect on the adapter command for this installed profile.\n\nThe installed manifest’s inject directives produce:\n\n- `SPT_ENDPOINT_ID=perri`\n- `SPT_INJECT_VERIFY_ECHO=1`\n\n`CLAUDE_CONFIG_DIR` is `direction=\"read\"`, so it is not added to `SpawnReq.env`. The child still inherits the broker environment because broker injection is additive.\n\nThe generated `SpawnReq` at `harnesshost.rs:280-295` is therefore semantically:\n\n- `program = <absolute installed claude-spt.exe above>`\n- `args = [\"launch\", \"--cli\", \"ccs\", \"--id\", \"perri\", \"--node\", <node-label>]`\n- `rows = 24`\n- `cols = 80`\n- `endpoint = \"perri\"`\n- `cwd = current invocation directory` for a fresh run; fresh mode explicitly does not reuse `perri`’s recorded cwd\n- `env = { SPT_ENDPOINT_ID: \"perri\", SPT_INJECT_VERIFY_ECHO: \"1\" }`\n- `translation_binary = [<absolute installed claude-spt.exe>, \"translate\"]`\n- `adapter = \"claude-spt:ccs\"`\n- `install_dir = Some(<installed adapter directory>)`\n\nThere is no `create`, `resume`, `fresh`, or Claude conversation ID field in `SpawnReq`.\n\n## Ranked, source-grounded failure mechanisms\n\n1. **Existing broker session wins over `--create`; CLI reattaches.** `cmd_endpoint_run` probes the broker and `run_on_live_decision(true, false)` returns `Reattach` (`cli.rs:1977-2016`; unit matrix at 2383-2390). The explicit `create` bit has already been discarded. Current installed-state evidence is especially strong: `C:/Users/decid/AppData/Local/spt-core/logs/daemon.stderr.log:79-84` records `WAKE_RESUME:perri: resuming session anchor-int-proof under claude-spt:ccs` into broker session 5. A subsequent default-action `--create` while that session exists attaches session 5 rather than launching fresh. This is the most direct core-side explanation for seeing an existing/resume UI.\n\n2. **A real spawn selects “self,” but “self” is only an opaque adapter declaration, not a core-enforced fresh Claude conversation.** `prepare_harness_spawn(..., is_resume=false)` selects `[session.self]` (`harnesshost.rs:114-125`), but core deliberately does not parse or enforce harness-specific flags. The installed ccs self role delegates to `claude-spt launch --cli ccs ...` and does not consume the fresh provisional ID. Consequently, if that downstream launcher or CLI prompts to resume, core has no semantic signal with which to forbid it. Adapter binary internals were intentionally not inspected; this conclusion is confined to the manifest/SpawnReq boundary.\n\n3. **Probe-to-spawn race or transient probe miss deduplicates to an old session.** A failed/unreachable `SessionProbe` is treated as “not live” (`cli.rs:1983-1991`), but `broker.rs:3235-3305` performs its own endpoint-keyed single-flight check. If a session is live by broker dispatch time, the broker returns that existing `(session_id, pid)` as `KIND_SPAWNED` without starting the requested command. The caller then reports a successful launch and, with default attach semantics, attaches the old session. The pure gate is tested at `broker.rs:5875-5892`, and concurrent same-endpoint dedup is integration-tested in `crates/spt-daemon/tests/wake_single_flight.rs:129-175`.\n\n4. **The omitted `--adapter` deterministically reuses perri’s stored ccs profile, not the base Claude adapter.** `resolve_run_target` reads `info.adapter` for a lone `--id` (`cli.rs:1817-1831`), and current perri state records `claude-spt:ccs`. The resulting fresh template invokes ccs. If the operator expected base `claude-spt`, `--create` does not alter adapter/profile selection. This mechanism is deterministic and independently covered by `resolve_run_target_quadrants`.\n\n5. **The “fresh session ID” is only provisional and can be semantically inert.** `mint_session_id` makes a new 16-hex placeholder (`harnesshost.rs:54-62`), but the installed ccs `[session.self]` omits `{session_id}`. Core therefore creates a distinct PTY/broker session when it truly spawns, while providing no unique conversation identifier to the declared launcher. The real harness UUID arrives later via hooks/bind; it cannot force freshness before launch.\n\n## Ruled out on the direct `--create` path\n\n- **`sessions.log` does not directly choose a prior session for `--create`.** Ledger resolution occurs only inside `Some(requested)` for `--resume` at `cli.rs:1949-1966`. `resume=None` never reads the ledger. Current perri’s newest ledger row is `anchor-int-proof`, but that cannot directly turn the requested command into `[session.resume]`; it matters indirectly because daemon lifecycle already resumed that row, producing mechanism 1.\n- **Manifest role selection is not accidentally choosing `[session.resume]` when `is_resume=false`.** `harnesshost.rs:117-125` is explicit, and both unit and real-fixture integration tests prove the branch.\n\n## Existing deterministic tests and exact repro seams\n\n- `crates/spt/src/cli.rs:1848` — `resolve_run_target_quadrants`: proves a lone existing `--id` reuses the recorded adapter.\n- `crates/spt/src/cli.rs:2345` — `resume_never_feeds_a_provisional`: proves ledger recovery is resume-only and provisional IDs never reach native resume.\n- `crates/spt/src/cli.rs:2383` — `run_on_live_never_duplicates`: directly proves live + default attach reattaches, while live + `--start` refuses.\n- `crates/spt-daemon/src/harnesshost.rs:315` — `provisional_session_id_recognizes_own_mint_only`.\n- `crates/spt-daemon/src/harnesshost.rs:334` — `prepare_fills_id_and_session_into_self_command`: pure prepared-argv seam.\n- `crates/spt-daemon/src/harnesshost.rs:453` — `prepare_fills_env_inject_values_with_substitution`: pure prepared-env seam.\n- `crates/spt-daemon/src/harnesshost.rs:565` — `prepare_selects_resume_template_on_resume_else_self`: exact role-selection unit.\n- `crates/spt-daemon/src/harnesshost.rs:614` — `prepare_resume_falls_back_to_self_when_no_resume_role`.\n- `crates/spt-daemon/src/harnesshost.rs:640` — `mint_session_id_is_fresh_hex`.\n- `crates/spt/tests/resume_template_e2e.rs:107`, especially lines 196-205 and 251-268, with assertions at 335-358 — real CLI → manifest → SpawnReq → broker PTY test proving no-`--resume` uses self and `--resume` uses resume. Its fresh leg currently omits explicit `--create`, so it proves default-fresh equivalence but not the explicit flag’s parser plumbing.\n- `crates/spt/tests/run_no_dup_session_e2e.rs:138`, assertions at 285-319 — real broker-session map test proving repeated headless run/resume does not mint a second session. It currently uses `--start` and does not include explicit `--create`; the pure unit covers the default-attach reattach branch.\n- `crates/spt-daemon/src/broker.rs:5881` — `wake_gate_decision_truth_table`: broker dedup truth table.\n- `crates/spt-daemon/tests/wake_single_flight.rs:129-175` — two same-endpoint concurrent spawns return the same broker session ID and one launch tree.\n- `crates/spt-daemon/tests/broker.rs:422` — `spawn_env_reaches_child`: proves `SpawnReq.env` reaches the PTY child.\n- `crates/spt/src/picker/shortcut.rs:209` and `:241` — shortcut generation proves `--create` is emitted when resume is absent and `--resume` replaces it.\n\n### Coverage gaps / best minimal repro additions\n\n1. There is no explicit clap unit asserting `--create` parses to `create=true,resume=None` and conflicts with `--resume`; the existing `parse` seam is `cli.rs:12601`.\n2. The sharpest integration repro is to add `--create` to the fresh invocation in `resume_template_e2e.rs:199-204`. It should still write only the self marker. This proves explicit flag → discarded create bit → `resume=None` → self selection end to end.\n3. Extend `run_no_dup_session_e2e.rs` with `--create --start` against the already-live fixture. Expected: `ENDPOINT_ALREADY_LIVE`, no `ENDPOINT_RUN ... pid=`, unchanged singleton broker session ID. This deterministically locks down the fact that `--create` is not a force-replace flag.\n4. For the exact default-action symptom, use the same live fixture with an attach pump bounded by scripted detach, invoke `--create` without `--start`, and assert the attached broker session ID is unchanged. That exercises `RunOnLive::Reattach` rather than only the headless refusal.\n5. At the manifest boundary, a tiny capture fixture matching the installed ccs overlay can assert the prepared fresh argv is `launch --cli ccs --id perri --node …`, contains no `--resume`, and does not contain the minted session ID. This is deterministic without entering adapter internals.\n6. A genuine assertion about Claude Code’s own resume prompt belongs downstream of the opaque command boundary; core tests can prove only selected role, exact argv/env/cwd, and whether the broker session was reused.\n\nNo files were edited. Per constraint, no formatter, linter, build, test, endpoint-control, or other state-mutating command was run; all evidence came from read-only source and installed-state inspection.",
  "files": [
    {
      "path": "crates/spt/src/cli.rs",
      "description": "Primary CLI and lifecycle trace. `EndpointCmd::Run` declares `create`/`resume` at 349-365; dispatch discards `create` at 1385-1414; `resolve_run_target` at 1817-1831 reuses the stored adapter for lone `--id`; `cmd_endpoint_run` at 1884-2149 resolves the manifest, maps `resume=None` to a provisional ID, gates existing broker sessions, constructs cwd, and launches; pure tests at 1848, 2345, and 2383."
    },
    {
      "path": "crates/spt-daemon/src/harnesshost.rs",
      "description": "Manifest-to-spawn core. `mint_session_id` 54-62; provisional classifier 64-74; `prepare_harness_spawn` 91-203 selects self/resume and expands key/env catalogs; `launch_harness_brokered_in` 232-298 builds `SpawnReq`; relevant unit seams at 315, 334, 453, 565, 614, 640."
    },
    {
      "path": "crates/spt-daemon/src/msg.rs",
      "description": "`SpawnReq` wire type at 260-315. Contains program/args/PTY geometry/endpoint/cwd/env/translation/adapter/install_dir, but no create/resume/fresh/Claude-conversation semantic."
    },
    {
      "path": "crates/spt-daemon/src/brain.rs",
      "description": "`Brain::spawn_session_pid` at 466-486 serializes `SpawnReq`, waits for `KIND_SPAWNED`, and returns the broker numeric session ID and child PID."
    },
    {
      "path": "crates/spt-daemon/src/broker.rs",
      "description": "`dispatch_spawn` at 3235-3450. Endpoint-keyed live/racing dedup can return an existing session at 3289-3305; otherwise PTY spawn occurs at 3308-3321 and a new numeric broker ID is allocated at 3320, inserted at 3423-3437, and acknowledged at 3439-3448. Dedup truth-table test at 5881."
    },
    {
      "path": "crates/spt-runtime/src/registry.rs",
      "description": "`resolve_option` at 769-784 loads active adapter record and applies the shipped/local profile overlay; this resolves current `claude-spt:ccs` before spawn."
    },
    {
      "path": "crates/spt-runtime/src/profile.rs",
      "description": "Profile merge contract: `merge_leaf_replace` 27-40 and `resolve_overlay` 101-111. Explains why ccs wholly replaces the base self/resume command leaves."
    },
    {
      "path": "crates/spt-runtime/src/runtime.rs",
      "description": "`fill_template_tokens` at 279-302 tokenizes before placeholder substitution; `resolve_program_in_dir` at 975-990 resolves installed Windows `claude-spt.exe`."
    },
    {
      "path": "crates/spt/tests/resume_template_e2e.rs",
      "description": "Real end-to-end self-vs-resume role selection test at 107-388. Fresh leg at 196-205 currently uses absence of `--resume`, not explicit `--create`; assertions at 335-358 prove fresh uses self and resume uses resume."
    },
    {
      "path": "crates/spt/tests/run_no_dup_session_e2e.rs",
      "description": "Real broker map regression at 138-319 proving runs over a live endpoint retain exactly one identical broker session. Existing coverage is headless and does not explicitly pass `--create`."
    },
    {
      "path": "crates/spt-daemon/tests/wake_single_flight.rs",
      "description": "Concurrent same-endpoint spawn integration seam at 129-175: both requests receive the same broker session ID and only one session exists."
    },
    {
      "path": "crates/spt-daemon/tests/broker.rs",
      "description": "`spawn_env_reaches_child` at 422 proves prepared `SpawnReq.env` reaches the spawned PTY child."
    },
    {
      "path": "crates/spt/src/picker/shortcut.rs",
      "description": "Shortcut tests at 209-248 prove generated launchers emit `--create` for resume=None and `--resume` otherwise; this is presentation/argv coverage, not lifecycle enforcement."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/owlery/perri/info.json",
      "description": "Current installed-state record: perri is stamped with adapter `claude-spt:ccs`, recorded cwd `omp-spt`, and a prior harness UUID. This is why `--id perri` without `--adapter` resolves the ccs profile."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/owlery/perri/sessions.log",
      "description": "Current perri ledger. Its newest row is `anchor-int-proof`; direct `--create` does not read it, though daemon resume lifecycle did use it before the CLI live-session gate."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/adapters/claude-spt/record.toml",
      "description": "Active pointer record mapping `claude-spt` to the installed GitHub adapter directory."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/adapters/_github/SaberMage-claude-spt/manifest.toml",
      "description": "Installed manifest boundary. Base self/resume at 863-890; env injects at 948-964; translation command 994-995; ccs profile self/resume at 1080-1086. The ccs self command has no `--resume` and no `{session_id}`."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/logs/daemon.stderr.log",
      "description": "Current-daemon evidence at lines 79-84: broker session 5 for perri was launched through `WAKE_RESUME` with ledger ID `anchor-int-proof`; a later `--create` while that broker session is live necessarily reattaches/deduplicates rather than forcing replacement."
    }
  ],
  "architecture": "```text\nspt endpoint run --id perri --create\n  │\n  ├─ clap: create=true, resume=None\n  │\n  ├─ CLI dispatch: discards create boolean\n  │      semantic becomes only “resume is absent”\n  │\n  ├─ resolve_run_target(None, perri)\n  │      reads perri/info.json.adapter\n  │      -> claude-spt:ccs\n  │\n  ├─ resolve_option(claude-spt:ccs)\n  │      parent manifest + shipped ccs leaf overlay\n  │\n  ├─ resume=None\n  │      -> is_resume=false\n  │      -> mint provisional 16-hex session placeholder\n  │\n  ├─ SessionProbe(perri)\n  │    ├─ live -> Reattach existing broker PTY (NO SPAWN)\n  │    └─ not live -> prepare_harness_spawn\n  │                    selects [session.self]\n  │                    expands argv/env\n  │                    -> SpawnReq\n  │\n  └─ broker dispatch_spawn(SpawnReq)\n       ├─ endpoint already live/racing -> acknowledge existing numeric session\n       └─ free -> spawn new PTY, allocate new numeric broker session\n```\n\nThree session identities must remain distinct:\n\n1. **SPT provisional spawn-time ID** — 16 lowercase hex from `mint_session_id`; only a template key. For current installed ccs self it is generated but unused.\n2. **SPT broker session ID** — numeric `u64` allocated by `Broker::next_id`; the `spt rc` attach handle. A true new spawn gets a new one, while dedup/reattach preserves an existing one.\n3. **Harness/Claude session ID** — post-spawn UUID reported by hooks and stored in `info.json`/`sessions.log`; native resume uses this through `[session.resume]`. Core does not know a fresh harness-generated UUID before the child starts.\n\nTherefore the clean semantic statement is: **absence of `--resume` selects `[session.self]`; it does not constitute an enforceable “new Claude conversation” instruction. A new SPT PTY/session is created only if no existing endpoint session wins either the CLI live gate or broker dedup gate.**"
}