cockpit autorun
cockpit autorunの構文、オプション、結果、制約をcockpit CLIの正本から自動生成したリファレンスです。
最新バージョンでは、画面や操作が一部異なる場合があります。
このReference本文は、アプリが配布するcockpit CLIヘルプと同じ英語の正本から自動生成されています。日本語の概念説明と安全な使い方はcockpit CLIを参照してください。
Usage: cockpit autorun <command> [options] [--host <host|alias>] [--port <sync-port>] [--https true|false]
Antigravity uses a fixed account. Omitted or explicit account: auto / --account auto resolves to the default account and never rotates accounts on a usage limit. Choose an existing account explicitly for manual binding; additional profiles are available only on macOS.
Manage scheduled automatic tasks. Autorun can create a task on each schedule, send an instruction to one existing task while preserving its conversation, or send it to a Crew (cockpit help crew). Newly created tasks appear in cockpit task list. As with normal tasks, check cockpit workspaces and specify the directory with --directory — if omitted, a new task starts in the OS temporary folder.
Autorun requires an AGI Lab membership. Cockpit verifies the signed-in member for CLI and API operations and again when a schedule executes. Not being signed in (sign-in-required), an expired or revoked sign-in session (authentication-required), an inactive membership (membership-required), and a temporary verification failure (verification-unavailable) return distinct errors with that code. Temporary verification failures are not cached.
At a scheduled run, a confirmed guest or inactive membership disables a one-time Autorun without starting it; recurring Autoruns remain enabled for their next schedule. The run is recorded as skipped-membership with its reason in lastRunDetail; for a guest, the Desktop and PWA lists explain that Autorun is an AGI Lab member feature. After signing in with a member account, enable the Autorun again. A sign-in session that needs renewal or a temporary verification failure instead stores a retry one minute later and keeps the Autorun enabled, including a one-time Autorun.
The scheduler remains active when all macOS windows are closed and re-arms every timer after system resume. When Cockpit restarts or resumes with an unhandled scheduled time, it runs one catch-up immediately if the scheduled time is no more than 24 hours old. Older occurrences are recorded as missed without starting stale work. Catch-up starts at most one task per Autorun.
cockpit autorun list
cockpit autorun get <id>
cockpit autorun create --name "Name" --instruction "Instruction" --directory /path/to/repo --type cron --expression "0 9 * * *"
cockpit autorun create --name "Name" --instruction "Instruction" --directory /path/to/repo --type interval --minutes 30
cockpit autorun create --name "Auto account" --instruction "Instruction" --directory /path/to/repo --agent-type codex --account auto --type interval --minutes 30
cockpit autorun create --name "Profile task" --instruction "Instruction" --directory /path/to/repo --agent-type claude --claude-profile work --type interval --minutes 30
cockpit autorun create --name "Visual check" --instruction "Instruction" --directory /path/to/repo --agent-type codex --ui-mode visual --type interval --minutes 30
cockpit autorun create --name "Pinned runtime" --instruction "Instruction" --directory /path/to/repo --agent-type codex --ui-mode visual --model gpt-5.4 --effort high --service-tier fast --system-prompt codex-friendly --approval-mode accept-edits --type interval --minutes 30
cockpit autorun create --name "Qoder review" --instruction "Review the repository" --directory /path/to/repo --agent-type qoder --ui-mode visual --system-prompt cockpit --type interval --minutes 30
cockpit autorun create --name "Codex profile task" --instruction "Instruction" --directory /path/to/repo --agent-type codex --codex-profile work --type interval --minutes 30
cockpit autorun create --name "Work browser" --instruction "Check the dashboard" --directory /path/to/repo --browser-identity work --type interval --minutes 30
cockpit autorun create --name "One-time" --instruction "Instruction" --type once --at "2025-06-01T09:00:00"
cockpit autorun create --name "Nightly report" --instruction "Summarize yesterday and post it" --directory /path/to/repo --complete-on-finish true --type cron --expression "0 9 * * *"
cockpit autorun create --name "Continue review" --instruction "Check progress and continue" --execution-target existing-task --target-task <task-id> --type interval --minutes 30
cockpit autorun create --name "Morning digest" --instruction "Post today's plan in #general" --target-crew <crew> --type cron --expression "0 9 * * *"
cat instruction.md | cockpit autorun create --name "Weekly review" --stdin --directory /path/to/repo --type cron --expression "0 9 * * 1" # Long instruction, no shell quoting
cockpit autorun create --name "Weekly review" --instruction-file instruction.md --directory /path/to/repo --type cron --expression "0 9 * * 1" # Same, from a file
cockpit autorun update <id> --name "New name" --enabled false
cockpit autorun update <id> --model gpt-5.4 --effort xhigh --service-tier standard --system-prompt cockpit
cockpit autorun update <id> --claude-profile default
cockpit autorun update <id> --codex-profile default
cockpit autorun update <id> --browser-identity default
cockpit autorun update <id> --crew-notify failure # Crew-created terminal Autorun: tell the parent Crew only about runs that do not end normally
cat instruction.md | cockpit autorun update <id> --stdin
cockpit autorun delete <id>
cockpit autorun delete --finished-once --target-crew <crew> # Delete one Crew's finished one-time Autoruns
cockpit autorun delete --finished-once --confirm # Delete every finished one-time Autorun
cockpit autorun run <id> # Run immediately
cockpit autorun toggle <id> # Toggle enabled/disabled
Create/Update options:
| Option | Description |
|---|---|
| --name | Task name |
| --instruction | Instruction |
| --instruction-file | Read the instruction from a file instead of --instruction |
| --stdin | Read the instruction from standard input instead of --instruction |
| --execution-target | new-task (default), existing-task, or crew |
| --target-task | Existing target task id. Implies --execution-target existing-task. --target-task-id is an alias |
| --target-crew | Crew id or name from cockpit crew list. Implies --execution-target crew. Cannot be combined with --target-task |
| --mission | create and update: show the Autorun as scheduled under this active Mission of the calling Crew (cockpit help crew). Only a Crew's session or its child tasks can use it. Pausing or ending the Mission stops the Autorun, and until the owner turns it back on, a Crew can neither turn it on nor move it to another Mission (mission_not_active). Refused with mission_requires_crew, mission_not_found, mission_not_active, or mission_autorun_not_owned when the Autorun runs for another Crew: it targets one, or it targets none and another Crew created it |
| --directory | Working directory. If omitted, uses a temporary folder. master selects the Master Agent directory. Deprecated: see --master |
| --agent-type | claude, codex, antigravity, cursor, qoder, grok, muse, terminal, cockpit. Defaults to the defaultAgent setting |
| --claude-profile | Claude account profile name or id from cockpit accounts; use default to select the default account. Claude agent only |
| --codex-profile | Codex account profile name or id from cockpit accounts --agent-type codex; use default to select the default account. Codex agent only |
| --account | auto, an account profile name or id, or default for Claude, Codex, Grok Build, Antigravity, Cursor, or Qoder. Defaults to auto |
| --browser-identity | Browser Identity name or id; use default for the legacy browser profile. Available for every agent type |
| --command | Command to run |
| --ui-mode | visual or terminal when supported by the selected agent |
| --model | Runtime model. Supported for visual Claude, Codex, Antigravity, Cursor, Qoder, Grok Build, Muse Code, and Cockpit Autoruns. Muse Code lists its models only after you sign in. For Codex, default leaves the model to Codex |
| --effort | Reasoning level supported by the selected model. When the Codex model is left to Codex, levels are checked against the default it reports, and default clears the saved level |
| --service-tier | Codex service tier: standard, fast, or ultrafast. fast and ultrafast require a model that offers them; when the model is left to Codex, they are checked against the default it reports. Cockpit never takes the default from service_tier in Codex's config.toml; Fast runs only when chosen in Cockpit |
| --system-prompt | Built-in or custom system prompt for visual Claude, visual Codex, visual Qoder, or Cockpit. --system-prompt-preset is a compatibility alias |
| --approval-mode | supervised, accept-edits, auto, or full-access, when supported by the selected agent. auto is available for visual Claude, Codex, and Grok Build. Antigravity supports supervised, accept-edits, and full-access; saved approval auto selections use supervised. It asks for permission in supervised mode. Increased access begins on the next new turn, while restrictions apply immediately. Muse Code accepts only accept-edits and full-access |
| --type | once, interval, cron |
| --at | ISO datetime for once |
| --minutes | Interval in minutes for interval |
| --expression | Cron expression for cron |
| --enabled | true / false. Defaults to true |
| --complete-on-finish | true / false. Defaults to false. When true, Cockpit completes the task the Autorun created once that run finishes. New-task Autoruns only; not supported by the terminal agent |
| --crew-notify | always (default) or failure. When the parent Crew hears about each run: always after every run, failure only when a run does not end normally. Only for a terminal Autorun that a Crew created and that creates a new task on each run |
| --master | Deprecated: the master is going away; use --target-crew or a Crew instead. Still runs as Master Agent with the directory set automatically |
--master and --directory master on create, and --directory master on update, are deprecated. The Autorun still runs as Master Agent as before; Cockpit also prints one warning line to standard error and adds deprecated: true to the JSON answer when the request succeeds. Standard output stays a single JSON document. Existing Master Agent Autoruns keep running. update does not accept --master.
delete --finished-once deletes only finished one-time Autoruns: --type once, already run (lastRunAt is set), with no next run (nextRunAt is null), and with nothing still outstanding — no run starting, no delivery waiting in the queue (lastRunStatus queued), and no delivered turn still waiting-response or in-progress. Cockpit checks each Autorun against its current state at the moment it deletes it. Recurring Autoruns and one-time Autoruns that have not run yet, including disabled ones, are never deleted. --target-crew <crew> (a Crew id or name from cockpit crew list) limits it to the Autoruns that send to that Crew; an unknown Crew answers target_crew_not_found (HTTP 404) and deletes nothing. Without --target-crew, it deletes every finished one-time Autorun, whatever its target, and requires --confirm (option_required otherwise). It answers {"ok":true,"data":{"deleted":[<id>...],"count":<n>,"targetCrewId":<id or null>}}; when nothing matches, deleted is empty and count is 0. The Crew settings Schedule tab shows the same Autoruns under Finished, with a Delete all button that asks Cockpit to do the same for that Crew and shows how many it deleted.
--complete-on-finish true completes the task the Autorun created when that run ends: a turn_complete that was not interrupted, with no Ask, no permission prompt, no usage limit, and no message still waiting to be delivered to the task. Cockpit does not wait for the agent to run cockpit task complete. Tasks stopped by an Ask, a permission prompt, a usage limit, a process error, an interrupted turn (for example, a message you send stops the running turn, or you stop it), or any other state that waits for user input stay open, and queued messages stay in the queue instead of being cancelled. The next turn that ends uninterrupted with nothing left in the queue completes the task. existing-task Autoruns never complete their target, and the terminal agent does not support the option because a terminal task never reports turn_complete.
--crew-notify failure stops the notice "The command of child task … exited with code 0." that the parent Crew gets after each normal run of a Crew-created terminal Autorun. A normal run is one whose command ends with exit code 0. The Crew is still told, as before, when the command ends with another exit code, its exit code is unknown (for example, Cockpit restarted while it ran), or the task stops with an error, reaches a usage limit, is stopped by the memory guard, asks something, or is completed. Only the notice is left out: the run's task, its report (cockpit task get, cockpit task wait), lastRunStatus, runHistory, and autorun-executions.jsonl stay the same, and the task is not completed or removed. always, or no value, keeps a notice after every run. The setting belongs to one Autorun; there is no global default. Create and update refuse it, with nothing saved, for other agents, including agents in terminal UI mode, for existing-task and crew targets, and for an Autorun the owner created; the CLI refuses it before sending anything when the agent is not terminal (create defaults to claude) or a target task or Crew is given. When an update makes an Autorun one the setting does not apply to, Cockpit drops it, so a later switch back to terminal starts from always. list and get return crewNotify for each Autorun the setting applies to, and always for one saved before it existed or with an unknown value.
Create and update reject options that the selected agent, UI mode, or model does not support. Each Autorun stores a runtime snapshot, so changing global model, reasoning, service tier, system prompt, approval, account, or UI defaults does not change existing Autoruns. Auto is stored as the account selection mode rather than a concrete profile; Cockpit chooses the best available account independently for every execution and can switch again if that task reaches a usage limit. A value cannot start with --, so create --instruction "--- x" is rejected as an unknown option. Pass an instruction that starts with --, is longer than one line, or contains backticks, quotes, $, or a code fence with --stdin or --instruction-file, as with cockpit task create: the shell rewrites such text inside a quoted argument before cockpit sees it. Give exactly one of --instruction, --instruction-file, and --stdin; two of them, or one given twice, answer input_source_conflict. --stdin does not wait at a terminal: without piped text it answers stdin_no_input. Both send the instruction as it is, except that NUL characters are dropped and one byte order mark (U+FEFF) at the start of a file or of standard input is not part of the instruction (see cockpit help transport); Cockpit stores every instruction without leading and trailing whitespace.
When an existing target is busy, Cockpit stores the instruction in a persistent main-process queue and delivers it after the task reaches readyForNextPrompt; there is no timeout. Completed and error tasks are resumed automatically. Usage-limited tasks stay queued until account recovery or reset. If the target is deleted, cannot be resumed, or is a Windows Terminal task whose foreground process cannot be verified, Cockpit records a failed delivery, disables the Autorun, and sets needsAttention.
An existing-task target cannot be a Crew's internal task: create and update answer task_owned_by_crew (HTTP 409); use --target-crew instead. A Crew target receives the instruction in its Queue, the same as cockpit crew send, and the run is recorded as delivered. If the Crew is removed, Cockpit disables the Autorun and sets needsAttention with target-crew-unavailable, and a run that finds the Crew missing does the same. Such an Autorun cannot be enabled again until it targets an existing Crew (target_crew_not_found, HTTP 409): update --target-crew <crew> --enabled true does both. A Crew's internal task cannot be an existing-task target (create and update answer an error; an older Autorun that targets one is disabled with target-task-owned-by-crew when it runs); use --target-crew instead.
Run inside a Cockpit task, cockpit autorun tells Cockpit which task sent the command, by the task's secret (cockpit help crew). Cockpit records the task that creates or changes an Autorun as createdByTask (taskId, taskName, and the crewId of the Crew the task belongs to, or null), keeps it when the owner edits the Autorun later, and keeps the recorded Crew when a task without a Crew changes it. When crewId is set, the Autorun delivers to a Crew wrapped in <task_message>, like text that a Crew's task sends with cockpit crew send, and the tasks it creates are child tasks of that Crew: they run with its limits, including its approval mode as their upper bound (cockpit help crew), appear under it, and the Crew hears when they finish a turn, ask something, stop with an error, or are completed. An Autorun that the owner or the owner's other tasks (including the former master) created delivers as the owner's text. If that Crew is removed, Cockpit disables the Autorun with creator-crew-unavailable, and a run that finds the Crew missing does the same. Only the owner or the owner's own tasks (including the former master) can enable it again (forbidden_from_crew for a Crew or its child task); enabling it makes it the owner's Autorun, so Cockpit removes createdByTask. A request that names one of this Cockpit's tasks without that task's secret cannot create an Autorun, change its fields, or enable one whose creating Crew was removed (task_unverified); toggle, run, and delete accept it otherwise. A request that names a task this Cockpit does not know is treated as the owner's, like a command run outside Cockpit. Requests sent with --host to another device never carry a task's identity.
An Autorun created by an authenticated owner-request Crew turn or marked child carries ownerRequest: { ref }. Its runs count as owner requests, and new child tasks inherit the original ref. A non-owner-request update removes the mark; owner updates preserve an existing mark but never add it later. The task secret and server turn records establish it, not instruction text or request fields.
list and get return lastRunStatus (created, queued, delivered, skipped-membership, skipped-lock, skipped-period, missed, or failed), lastRunScheduledAt, lastRunDetail, and lastTaskId in addition to lastRunAt, nextRunAt, and nextRunScheduledAt. skipped-lock means another launch for the same Autorun was still starting; Cockpit never holds an occurrence back because a previously created task is unfinished. nextRunAt is the next attempt time, while nextRunScheduledAt preserves the original occurrence during retries. They also return executionTarget, targetTaskId, targetCrewId, createdByTask (when a task created or changed the Autorun), crewNotify (Crew-created terminal new-task Autoruns), plus effectiveRuntimeSettings for new-task Autoruns. If a saved fixed account profile is no longer available, another saved combination becomes invalid, or an existing target becomes unavailable, Cockpit disables the Autorun instead of silently switching settings and returns needsAttention with the affected field.
Every created, queued, delivered, skipped, missed, or failed occurrence is appended as one JSON line to data/cockpit/logs/autorun-executions.jsonl under the AGI Tools data directory. A queued occurrence gets a later delivered or failed record when delivery finishes. Repeated retries of the same unchanged outcome are recorded once. Authentication or membership skips, missed runs, and failures surface an attention state and notification; overlap and period-dedup skips remain informational. The log rotates at 5 MB and keeps two archives.
Existing-task acceptance and turn history
delivered continues to mean local acceptance by the agent input path. It does not mean a model responded or a turn succeeded. Existing records keep their original meaning and are not rewritten.
list and get also return runHistory and lastRunOutcome. Each tracked occurrence has a unique deliveryId, taskId, and, when the adapter returns a receipt, turnId. acceptance is queued, delivered, or failed. Separately, outcome is waiting-response, in-progress, completed, failed, interrupted, or unknown. queued is waiting to send; delivered is locally accepted. waiting-response means no first progress has been observed and its cause is unknown. Only a matching turn completion records a completed outcome. A local turn.started is never first progress.
History includes confirmed scheduledAt, queuedAt, acceptedAt, firstProgressAt, completedAt, and trackingEndedAt when available. elapsedMs measures time since queue registration through completion, loss of tracking, or now. responseWaitMs measures acceptance to first observed progress, completion, loss of tracking, or now. waits records ready-wait reasons, including Ask answers and earlier deliveries, with startedAt, releasedAt, and releasedBy (task state update, system resume recheck, queue restore, runtime ready, or earlier-delivery-completed). diagnostics contains timestamped provider warnings/errors, including Claude SDK API retry notices when exposed. Missing diagnostics never imply sleep or thinking.
Desktop and PWA show this same history, with acceptance, outcome, elapsed time, task/turn IDs, timestamps, waits, and diagnostics. Provider completions and Cockpit-recorded turn settlements use the task's restriction/failure classification; a usage-limit reply is an interruption even if the provider reports completion. Confirmed terminal outcomes cannot be overwritten by later events. The latest 50 closed occurrences per Autorun are retained alongside all queued/active occurrences in autorun-occurrences.json; deleting an Autorun removes its occurrence history. This separate history leaves the existing execution log format and its status entries unchanged for existing consumers.
After app restart or runtime reconnect, an accepted turn whose outcome can no longer be tracked is unknown. Terminal and other send paths without an exact turn receipt also have an unknown outcome. Legacy delivered records have lastRunOutcome: "unknown" and no invented history or timestamps. No automatic resend, stale-instruction expiry, or guarantee of execution during sleep is added.
Errors
Every command prints Cockpit's JSON answer. When it is {"ok":false,...}, the command exits 1; the answer carries a code when Cockpit gives one, such as task_unverified (HTTP 403) or forbidden_from_crew. Errors that the CLI reports itself also exit 1 and carry a code, except file reads such as --instruction-file on a missing or empty file, which answer only error (File not found: …):
| code | Meaning |
|---|---|
invalid_arguments |
A missing <id>, an unknown subcommand, an unknown option or extra argument on any subcommand (the error names a close option and returns it in suggestion; nothing is created, changed, deleted, or run), or an option without its value, including --host, --port, and --https |
option_required |
--name, --instruction, or --type is not given at all, the option that an --execution-target needs is not given, or delete was given --target-crew or --confirm without --finished-once, or --finished-once without --target-crew or --confirm |
option_value_invalid |
An invalid --type, agent, --ui-mode, --port, or --https value |
option_conflict |
Two options that exclude each other were given |
input_source_conflict |
More than one of --instruction, --instruction-file, and --stdin, or one of them twice |
stdin_no_input |
--stdin was given but no text arrived on standard input |
option_agent_invalid |
The option is not available for the selected agent |
cockpit_unreachable |
Cockpit is not running or could not be reached |
host_unreachable |
The device given with --host could not be reached |
Remote Devices
Configure aliases with cockpit devices first, then target a remote Cockpit with autorun commands, same as cockpit task. --host can be placed before or after the subcommand.
cockpit autorun list --host studio
cockpit autorun run <id> --host studio
| Option | Description | Default |
|---|---|---|
| --host | Target remote device via sync server (host or alias) | - |
| --port | Remote sync server port | 47280 |
| --https | Use HTTPS for the remote sync server | true |