{
  "contractVersion": "1.2.0",
  "verified": false,
  "note": "How a client starts a run without a terminal conversation. The claude argv is launchArgv() and the environment is launchEnv() in scripts/autopilot-runner.mjs; test/launch-contract.test.mjs holds this file to both. The shape awaits a live launch trial, so a client treats it as provisional until verified is true.",
  "requestFile": {
    "env": "MA_LAUNCH_REQUEST",
    "directory": "$MA_AUTOPILOT_ROOT/requests",
    "directoryDefault": "$HOME/.claude/autopilot/requests",
    "name": "{requestId}.json",
    "fileMode": "0600",
    "schema": "launch-request.schema.json",
    "lifetime": "Written by the client before launch and removed by it once agent-state.json carries launchRequest; Phase 0 only reads it."
  },
  "placeholders": {
    "input": "the request's input as launch-request.mjs promptArgument renders it: a structured reference (Jira key, GitHub issue URL, repo#N, #N, Jira URL on the configured host) as is, or desktop free text as one double-quoted argument",
    "sessionId": "a UUID the client chooses; Phase 0 records it as sessionId, which is how the client finds this run's state",
    "requestFile": "the absolute path of the request file",
    "settingsFile": "the absolute path of the unattended permission profile install --unattended writes: $HOME/.claude/multi-agent-unattended.settings.json",
    "repoPath": "the working directory: a configured autopilot repo (config.json repos[].localPath) or one registered with `launch-request.mjs register-repo`, compared by real path",
    "runLogsRoot": "the log root an unattended run writes its state under: $HOME/.multi-agent-unattended/logs, the one directory outside the worktree the unattended profile's OS sandbox lets a run write (lib/pr-request-location.mjs unattendedLogsRoot)",
    "resumeArgument": "the run's task id as runs-index.mjs lists it, followed by ` autopilot` when the run is in autopilot mode: what `/multi-agent:resume` takes to re-enter that run"
  },
  "hosts": {
    "claude": {
      "supported": true,
      "bin": "claude",
      "cwd": "{repoPath}",
      "modes": {
        "autopilot": {
          "argv": [
            "--bg",
            "--session-id",
            "{sessionId}",
            "--permission-prompts",
            "none",
            "--settings",
            "{settingsFile}",
            "/multi-agent {input} autopilot"
          ],
          "env": {
            "MULTI_AGENT_UNATTENDED": "1",
            "MULTI_AGENT_SESSION_ID": "{sessionId}",
            "MCP_TOOLKIT_URL_POLICY": "strict",
            "MCP_TOOLKIT_INDEX_DENY": "~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains",
            "LOGS_ROOT": "{runLogsRoot}",
            "MA_LAUNCH_REQUEST": "{requestFile}"
          }
        }
      },
      "note": "Only unattended shapes are declared: a background session with no permission prompts has nobody to answer an interactive run. autopilot resolves every picker without asking; background runs the same pipeline without autopilot and parks on a picker the request did not answer (pendingQuestion, answered through answer-question.mjs or the contract server); resume re-enters a run recorded under the unattended log root. An interactive request is used by a person who sets MA_LAUNCH_REQUEST in their own terminal before typing /multi-agent.",
      "background": {
        "development": {
          "argv": [
            "--bg",
            "--session-id",
            "{sessionId}",
            "--permission-prompts",
            "none",
            "--settings",
            "{settingsFile}",
            "/multi-agent {input}"
          ],
          "env": {
            "MULTI_AGENT_UNATTENDED": "1",
            "MULTI_AGENT_SESSION_ID": "{sessionId}",
            "MCP_TOOLKIT_URL_POLICY": "strict",
            "MCP_TOOLKIT_INDEX_DENY": "~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains",
            "LOGS_ROOT": "{runLogsRoot}",
            "MA_LAUNCH_REQUEST": "{requestFile}"
          }
        },
        "analysis": {
          "argv": [
            "--bg",
            "--session-id",
            "{sessionId}",
            "--permission-prompts",
            "none",
            "--settings",
            "{settingsFile}",
            "/multi-agent:analysis {input}"
          ],
          "env": {
            "MULTI_AGENT_UNATTENDED": "1",
            "MULTI_AGENT_SESSION_ID": "{sessionId}",
            "MCP_TOOLKIT_URL_POLICY": "strict",
            "MCP_TOOLKIT_INDEX_DENY": "~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains",
            "LOGS_ROOT": "{runLogsRoot}",
            "MA_LAUNCH_REQUEST": "{requestFile}"
          }
        }
      },
      "resume": {
        "argv": [
          "--bg",
          "--session-id",
          "{sessionId}",
          "--permission-prompts",
          "none",
          "--settings",
          "{settingsFile}",
          "/multi-agent:resume {resumeArgument}"
        ],
        "env": {
          "MULTI_AGENT_UNATTENDED": "1",
          "MULTI_AGENT_SESSION_ID": "{sessionId}",
          "MCP_TOOLKIT_URL_POLICY": "strict",
          "MCP_TOOLKIT_INDEX_DENY": "~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains",
          "LOGS_ROOT": "{runLogsRoot}"
        }
      }
    },
    "copilot": {
      "supported": false,
      "note": "The autopilot runner launches only the claude host. No argv is declared for Copilot CLI until one is verified."
    },
    "codex": {
      "supported": false,
      "note": "The autopilot runner launches only the claude host. No argv is declared for Codex CLI until one is verified."
    }
  }
}
