{
  "summary": "Diagnosis: `perri`'s adapter create path is locally fresh (no `-r`, `--resume`, `--continue`, or `--session-id`), but it is not prompt-free because the launcher unconditionally enables Claude Remote Control. Anthropic documents that a Remote Control launch asks whether to continue the existing session or start a new one whenever the environment already has an active session. This prompt is therefore compatible with a correctly selected spt `--create` path and does not prove that spt expanded `[session.resume]`.\n\nInstalled registration and manifest:\n- `C:/Users/decid/AppData/Local/spt-core/adapters/claude-spt/record.toml` registers active adapter `claude-spt` in pointer mode at `C:\\Users\\decid\\AppData\\Local\\spt-core\\adapters\\_github\\SaberMage-claude-spt`.\n- The registered `manifest.toml` and repository `adapter/claude-spt.toml` have the same relevant declarations at lines 863-890 and 1080-1086.\n- Base create: `[session.self] command = \"{adapter_dir}/claude-spt launch --id {id} --node {node}\"`.\n- Base resume: `[session.resume] command = \"{adapter_dir}/claude-spt launch --id {id} --resume {session_id} --node {node}\"`.\n- CCS create override: `[profiles.ccs.session.self] command = \"{adapter_dir}/claude-spt launch --cli ccs --id {id} --node {node}\"`.\n- CCS resume override: `[profiles.ccs.session.resume] command = \"{adapter_dir}/claude-spt launch --cli ccs --id {id} --resume {session_id} --node {node}\"`.\n\nExpected expansion for the observed `perri`/CCS/`omp-spt` case (node evidence is `HFENDULEAM`):\n1. Create manifest command: `<registered-adapter-dir>/claude-spt launch --cli ccs --id perri --node HFENDULEAM`.\n2. `launch.rs::cli_argv` emits the real harness argv: `ccs -n \"perri @ HFENDULEAM (omp-spt/)\" --remote-control \"perri--HFENDULEAM--omp-spt\" --dangerously-skip-permissions`.\n3. Resume manifest command differs only by `--resume <session_id>`.\n4. Resume real harness argv differs by a leading native Claude resume pair: `ccs -r <session_id> -n \"perri @ HFENDULEAM (omp-spt/)\" --remote-control \"perri--HFENDULEAM--omp-spt\" --dangerously-skip-permissions`.\n5. `-n` is only a display name. Claude's CLI reference says it names the session and makes it resumable later; only `-r`/`--resume` resumes by ID/name or opens the picker, and `-c`/`--continue` resumes the most recent current-directory conversation. There is no such native resume flag on create.\n\nCCS pass-through and relevant environment:\n- `ccs` sees a first argument beginning with `-`, so `detectProfile` selects its configured default profile; `C:/Users/decid/.ccs/config.yaml` sets that default to the account profile `bigscreen`.\n- `profile-resolver.js` preserves the remaining Claude arguments (apart from unrelated effort normalization); `account-flow.js` sends them through `resolveNativeClaudeLaunchArgs` and `execClaude`; `shell-executor.js` finally spawns Claude with the argument array.\n- CCS adds `CLAUDE_CONFIG_DIR=C:\\Users\\decid\\.ccs\\instances\\bigscreen`, `CCS_PROFILE_TYPE=account`, `CCS_WEBSEARCH_SKIP=1`, and `CCS_IMAGE_ANALYSIS_SKIP=1`; for account profiles it strips inherited `ANTHROPIC_*`, and it strips the nested-session `CLAUDECODE` guard before spawn.\n- The launch shim adds `SPT_SESSION_NAME=perri @ HFENDULEAM (omp-spt/)` for the post-`/clear` rename hook.\n- Current core applies manifest `[env] direction=\"inject\"` entries through a shared spawn path for both create and resume, so both receive `SPT_ENDPOINT_ID=perri` and `SPT_INJECT_VERIFY_ECHO=1`. This is an adapter-documentation discrepancy: the `[session.resume]` comment says a resumed session has no `$SPT_ENDPOINT_ID` bind path, but current core injection does not distinguish the roles.\n- `C:/Users/decid/.ccs/instances/bigscreen/settings.json:173` also has `remoteControlAtStartup: true`. Thus merely deleting the explicit `--remote-control` flag would still auto-connect Remote Control for this profile unless the launch also overrides/disables that setting.\n\nWhy the prompt occurs:\n- `tools/claude-spt/src/launch.rs:179-187` conditionally adds `-r <sid>` only when `Args.resume` is present, but unconditionally adds `-n`, `--remote-control <RC-name>`, and `--dangerously-skip-permissions` for both roles.\n- Anthropic's Remote Control documentation states verbatim: “If the environment already has an active session, you'll be asked whether to continue it or start a new one.” It also says Remote Control is activated by `--remote-control` or by the auto-connect setting. Source: https://code.claude.com/docs/en/remote-control#connect-from-another-device and https://code.claude.com/docs/en/remote-control#enable-remote-control-for-all-sessions.\n- Therefore a fresh spt create invokes a Claude feature that intentionally presents a continue/new choice. The adapter's local-session create intent is intact, but Remote Control interposes its own active-environment resolution UI.\n- Existing local history by itself is not the trigger on a plain fresh launch. CWD matters to Claude's transcript namespace and to explicit `--continue`/ID lookup, and it likely participates in identifying the Remote Control environment, but the documented extra condition is an *active* Remote Control session, not merely JSONL history. [INFERENCE] The exact server-side composition of “environment” is not documented.\n- Multiple local histories under `C:/Users/decid/.ccs/instances/bigscreen/projects/C--Users-decid-Documents-projects-omp-spt` carry the same title `perri @ HFENDULEAM (omp-spt/)` (observed session IDs include `058dcb6f-1586-47a0-a0cd-0a4a085881ca`, `b4fe0587-e19f-4b78-81a8-c97931c52126`, and `c1427211-6e8d-4571-aeb8-30d36fa816a6`). This is consistent with `-n` creating/naming distinct sessions rather than implicitly resuming by name. A named collision matters only when that name is supplied to `--resume`.\n\nStartup hooks do not cause the picker:\n- The enabled installed `sptc@cplugs` 0.1.13 plugin wires Claude's `SessionStart` event to `sh \"$CLAUDE_PLUGIN_ROOT/hooks/dispatch.sh\" SessionStart`.\n- `dispatch.sh` resolves the registered adapter binary and execs `claude-spt hook SessionStart --host-pid <pid>` with Claude's hook payload on stdin.\n- `hook.rs::register_verb` maps only `clear`/`compact` to `boundary`; every other source with `SPT_ENDPOINT_ID` maps to `bind`, so both `source=startup` and `source=resume` bind after Claude has selected/created the session. The transcript contains both `SessionStart:startup` and later `SessionStart:resume` examples plus Remote Control bridge records.\n- Since `SessionStart` fires after Claude's startup/session decision, the adapter hook can observe and bind the selected result but cannot be the source of the pre-session continue/new prompt.\n\nWhat “fresh launch” means here:\n- The repository's expected fresh command is exactly the current no-`-r` command above, including Remote Control. It asks Claude to mint its own new local session ID (`identity.session_id_source = post_spawn`).\n- A *deterministically prompt-free* fresh Claude control command would have neither `-r`/`-c` nor `--remote-control`, and would override this profile's auto-connect, e.g. `claude --settings '{\"remoteControlAtStartup\":false}' -n \"<display>\" --dangerously-skip-permissions`. That changes the adapter's Remote Control availability, so it is a diagnostic control, not a drop-in behavioral fix. The documented CLI exposes no force-new variant for interactive `--remote-control`.\n\nSafe deterministic repro (standalone Claude only; no spt endpoint operations):\n1. Use an already-trusted scratch cwd and a dedicated test Claude config/auth lane with no active Remote Control sessions. Run Claude directly rather than through spt, add `--safe-mode` to disable plugins/hooks, and clear inherited `SPT_ENDPOINT_ID`, `SPT_ADAPTER`, `OWL_SESSION_ID`, `SPT_AGENT_ID`, `SPT_SESSION_NAME`, and `SPTC_HOOK_BIN` if launching from an agent-owned shell.\n2. Terminal A, in that cwd/lane: `claude --safe-mode --remote-control \"rc-repro-A\"`; keep it open. This establishes one active environment without any resume flag.\n3. Terminal B, same cwd/lane but a deliberately different name: `claude --safe-mode --remote-control \"rc-repro-B\"`. Expected: continue-existing versus start-new prompt, despite no `-r` or `-c`. Different names eliminate name collision as the variable.\n4. Exit both standalone processes normally. Their local histories remain but no Remote Control session is active.\n5. In the same cwd/lane run the history-only control: `claude --safe-mode --settings '{\"remoteControlAtStartup\":false}' -n \"rc-history-control\"`. Expected: a new session with no resume/continue picker even though the cwd now has history.\n6. Positive native-resume control: add `-r <known-session-id>` while keeping `remoteControlAtStartup:false`; expected direct resume of that ID. Running `-r` without a value is the separate documented interactive picker seam.\n7. For a zero-network deterministic argv check, the existing `launch.rs` tests are the exact seam: `fresh_argv_has_names_then_skip_perms` asserts no `-r`, while `resume_argv_leads_with_native_resume_verb` asserts `-r <sid>` precedes otherwise-identical argv. `tests/manifest-shortcut.sh` separately asserts exactly two fresh commands without `--resume` and two resume commands with `--resume {session_id}`.\n\nNo files, endpoints, processes, manifests, settings, or state were modified; no endpoint was started/stopped/refreshed and no tests were executed, per the read-only constraint.",
  "files": [
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/adapters/claude-spt/record.toml",
      "description": "Active pointer registration; identifies the registered manifest/binary source directory."
    },
    {
      "path": "C:/Users/decid/AppData/Local/spt-core/adapters/_github/SaberMage-claude-spt/manifest.toml",
      "description": "Installed manifest source. Lines 863-890 define base create/resume; 948-950 inject SPT_ENDPOINT_ID; 1033-1035 capture CLAUDE_CONFIG_DIR; 1080-1086 define CCS create/resume overrides."
    },
    {
      "path": "C:/Users/decid/Documents/projects/spt-claude-code/adapter/claude-spt.toml",
      "description": "Repository manifest with the same relevant role/profile commands and detailed intended semantics; its resume comment contains the stale/no-env-bind assertion that disagrees with current core injection behavior."
    },
    {
      "path": "C:/Users/decid/Documents/projects/spt-claude-code/tools/claude-spt/src/launch.rs",
      "description": "Authoritative adapter argv construction. `Args.resume` is optional; `cli_argv` conditionally adds only `-r <sid>` and unconditionally adds `-n`, `--remote-control`, and skip-permissions. Also derives node/project names and sets SPT_SESSION_NAME."
    },
    {
      "path": "C:/Users/decid/Documents/projects/spt-claude-code/tests/manifest-shortcut.sh",
      "description": "Manifest-level guards: four launch-shim commands; two fresh commands with no `--resume`; two resume commands with `--resume {session_id}`; CCS pass-through and name/RC invariants."
    },
    {
      "path": "C:/Users/decid/Documents/projects/spt-claude-code/tools/claude-spt/src/hook.rs",
      "description": "SessionStart handler. `register_verb` and its tests show startup/resume bind when SPT_ENDPOINT_ID exists; hook runs after Claude session selection and cannot originate the startup picker."
    },
    {
      "path": "C:/Users/decid/.claude/plugins/cache/cplugs/sptc/0.1.13/hooks/hooks.json",
      "description": "Enabled installed sptc plugin hook registry; SessionStart dispatches through the thin shell wrapper."
    },
    {
      "path": "C:/Users/decid/.claude/plugins/cache/cplugs/sptc/0.1.13/hooks/dispatch.sh",
      "description": "Installed dispatcher; resolves registered `claude-spt`, caches it, and execs `claude-spt hook <event>` with hook payload stdin."
    },
    {
      "path": "C:/Users/decid/.ccs/config.yaml",
      "description": "CCS default is the isolated account profile `bigscreen`."
    },
    {
      "path": "C:/Users/decid/.ccs/instances/bigscreen/settings.json",
      "description": "Runtime profile settings; line 173 enables `remoteControlAtStartup`, independently capable of activating RC on an interactive fresh launch."
    },
    {
      "path": "C:/Users/decid/AppData/Local/nvm/v25.8.2/node_modules/@kaitranntt/ccs/dist/dispatcher/cli-argument-parser.js",
      "description": "A first flag selects the CCS default profile and preserves all arguments as remaining Claude args."
    },
    {
      "path": "C:/Users/decid/AppData/Local/nvm/v25.8.2/node_modules/@kaitranntt/ccs/dist/dispatcher/flows/account-flow.js",
      "description": "Adds the isolated CLAUDE_CONFIG_DIR/account environment and forwards launch args to Claude."
    },
    {
      "path": "C:/Users/decid/AppData/Local/nvm/v25.8.2/node_modules/@kaitranntt/ccs/dist/utils/shell-executor.js",
      "description": "Final native Claude spawn seam; preserves argv, merges CCS environment, strips inherited account routing and nested-session guard variables."
    },
    {
      "path": "C:/Users/decid/.ccs/instances/bigscreen/projects/C--Users-decid-Documents-projects-omp-spt/b4fe0587-e19f-4b78-81a8-c97931c52126.jsonl",
      "description": "Observed Claude 2.1.211 transcript evidence: SessionStart:startup, active Remote Control bridge, and later SessionStart:resume records in the same named session."
    },
    {
      "path": "https://code.claude.com/docs/en/cli-reference",
      "description": "Official flag semantics: `-n` names; `-r` resumes/picks; `-c` continues current-directory history; `--remote-control` enables interactive RC."
    },
    {
      "path": "https://code.claude.com/docs/en/remote-control",
      "description": "Official decisive behavior: an environment with an active session prompts continue versus start-new; documents explicit and settings-based Remote Control activation."
    }
  ],
  "architecture": "Create and resume share one adapter pipeline:\n\n`spt endpoint run (profile claude-spt:ccs)` → select manifest role (`profiles.ccs.session.self` for create; `.resume` for resume) → substitute `{adapter_dir}`, `{id}`, `{node}`, and only on resume `{session_id}` → spawn `claude-spt launch` in the endpoint cwd → launch shim derives display/RC names and conditionally maps adapter `--resume` to native Claude `-r` → spawn `ccs` → CCS selects default account `bigscreen`, sets its isolated `CLAUDE_CONFIG_DIR`, and forwards native Claude flags → Claude performs startup/Remote-Control environment negotiation → only after a local session is created or selected does `SessionStart` run → installed sptc dispatcher invokes `claude-spt hook SessionStart` → hook binds the resulting Claude session ID to endpoint `perri`.\n\nCreate/resume delta at the final Claude boundary is exactly one pair: resume has `-r <session_id>`; create does not. Both still carry `--remote-control`, which is an independent continuation decision surface. That independent RC surface, reinforced by `remoteControlAtStartup:true`, is the deterministic explanation for a fresh create showing a continue/new prompt. Local cwd/history supplies resumable material and scopes normal CLI resume behavior, but static history alone does not turn the no-`-r` create argv into native resume."
}