spawnFlags: readonly [
{
description: "target space (default: the resolved mesh)";
name: "space";
short: "s";
type: "string";
value: "<s>";
},
{
description: "broker URL (overrides the mesh registry entry)";
name: "server";
type: "string";
value: "<url>";
},
{
completion: "files";
description: "retained credential-file option; a raw file cannot authorize a managed launch";
name: "creds";
type: "string";
value: "<path>";
},
{
description: "presence name override; does not choose the persona";
name: "name";
short: "n";
type: "string";
value: "<n>";
},
{
description: "persona catalog name or file path; defaults from COTAL_DEFAULT_PERSONA";
name: "config";
type: "string";
value: "<persona-or-path>";
},
{
description: "connector type (claude, opencode, hermes …); defaults from COTAL_DEFAULT_AGENT";
name: "agent";
type: "string";
value: "<a>";
},
{
description: "role override (wins over the agent file's role:)";
name: "role";
type: "string";
value: "<r>";
},
{
description: "model override (wins over the agent file's model:)";
name: "model";
short: "m";
type: "string";
value: "<m>";
},
{
description: "model variant override (connector-defined; wins over the agent file's variant:)";
name: "variant";
type: "string";
value: "<v>";
},
{
description: "model mode (repeatable): true or false for a toggle, an option id for a choice; `cotal models` lists them";
multiple: true;
name: "mode";
type: "string";
value: "<id=value>";
},
{
description: "connector-specific launch option (repeatable); wins per-key over the agent file's launchOptions:";
multiple: true;
name: "opt";
type: "string";
value: "<k=v>";
},
{
description: "working directory to root the agent at";
name: "cwd";
short: "C";
type: "string";
value: "<dir>";
},
{
description: "initial prompt auto-submitted at start";
name: "prompt";
short: "p";
type: "string";
value: "<text>";
},
{
description: "fork an existing session id into the mesh (only where the connector declares resume support; detached: pair with --cwd)";
name: "resume";
type: "string";
value: "<id>";
},
{
description: "force the session's AG-UI event plane on (already the default where supported)";
name: "events";
type: "boolean";
},
{
description: "opt out of the session's AG-UI event plane";
name: "no-events";
type: "boolean";
},
{
description: "withhold tool arguments and results, keeping event names and times";
name: "no-event-payloads";
type: "boolean";
},
{
description: "share named operator MCP servers with the agent";
name: "share-tools";
type: "string";
value: "<sel>";
},
{
description: "channel read set override";
name: "subscribe";
type: "string";
value: "<a,b>";
},
{
description: "read ACL override";
name: "allow-subscribe";
type: "string";
value: "<a,b>";
},
{
description: "post ACL override";
name: "allow-publish";
type: "string";
value: "<a,b>";
},
{
description: "application connector; an explicit flag wins over persona and saved defaults";
name: "harness";
short: "H";
type: "string";
value: "<connector>";
},
{
description: "run the application in this terminal, as a spawn without --detach or --on does; terminal exit may end it";
name: "foreground";
type: "boolean";
},
{
description: "with --detach or --on: maximum manager-supervised restarts in the selected restart window";
name: "restarts";
type: "string";
value: "<n>";
},
{
description: "time window for --restarts; both flags are required together";
name: "restart-window";
type: "string";
value: "<ms>";
},
{
description: "structured output on stdout";
name: "json";
short: "j";
type: "boolean";
},
{
description: "plain line-oriented output";
name: "plain";
type: "boolean";
},
{
description: "launch through a manager, await readiness and return without attaching";
name: "detach";
short: "d";
type: "boolean";
},
{
description: "foreground only: skip the durable backstop (no read-ACL row; messages missed while disconnected are not replayed)";
name: "live-only";
type: "boolean";
},
{
description: "foreground only, static mesh: end this seat's credential after this many seconds; omitted, it has no expiry and ends when the seat leaves cleanly";
name: "expires-in";
type: "string";
value: "<seconds>";
},
{
description: "foreground only, static mesh: end this seat's credential at this time; never with --expires-in";
name: "expires-at";
type: "string";
value: "<unix-seconds>";
},
{
description: "persona file on the execution host; never a manifest deploy or implicit upload";
name: "file";
short: "f";
type: "string";
value: "<persona-file>";
},
{
description: "preview the launch without allocation, provisioning or starting an application";
name: "dry-run";
type: "boolean";
},
{
description: "foreground only: protected file holding this one seat's enrollment URL; never print or forward it";
name: "enrollment-file";
type: "string";
value: "<private-file>";
},
{
description: "refused: a manifest deployment option; use `cotal team deploy <file>`";
name: "allow-stale";
type: "string";
value: "<a,b>";
},
{
description: "terminal runtime for this one managed seat; omitted, the serving manager uses its own";
name: "runtime";
type: "string";
value: "<name>";
},
{
description: "launch through this manager instance, by the id `ps` prints, and attach; with --detach, return once it joins";
name: "on";
type: "string";
value: "<instance>";
},
{
description: "with COTAL_MANAGED_HANDOFF_FILE: the owner the managed handoff must carry";
name: "expect-owner";
type: "string";
value: "<u_…>";
},
{
description: "with COTAL_MANAGED_HANDOFF_FILE: the lifecycle UID the managed handoff must carry";
name: "expect-lifecycle-uid";
type: "string";
value: "<uid>";
},
] = ...
cotal spawn's grammar: the application in this terminal by default, a manager's launch only with--detachor--on, and one positional persona or explicit persona file. Declaredas constso the values cast below is compile-checked against exactly these specs. Foreground and detached parse the SAME flags — the oldspawnvsstartability drift is structurally gone.