ドキュメント

cockpit task

cockpit taskの構文、オプション、結果、制約をcockpit CLIの正本から自動生成したリファレンスです。

対象
CLI
WindowsmacOSLinux
ゲストAGIラボ会員

最終検証 2026-08-27 · v4.61.0

Markdown

このReference本文は、アプリが配布するcockpit CLIヘルプと同じ英語の正本から自動生成されています。日本語の概念説明と安全な使い方はcockpit CLIを参照してください。

Local task commands authenticate the task API over loopback first and automatically use file IPC when a sandbox blocks loopback or process visibility. The same transport-aware preflight is shared by task, talk, HTML, side-panel, and current-task context resolution. Do not request broader sandbox permissions; use cockpit doctor to inspect pidVisibility, both transport results, and effectiveTransport if the command exits 7.

Usage: cockpit task <command> [options] [--host <host|alias>] [--port <sync-port>] [--https true|false]

Create, monitor, respond to, and finish Cockpit tasks.

Inspect

cockpit task list                               # List active tasks (excludes completed)
cockpit task list --status waiting_confirmation # Only tasks waiting for a response
cockpit task list --pinned                      # Pinned incomplete tasks, including Master Agent tasks
cockpit task list --all                         # All tasks in every status
cockpit task list --directory /path/to/repo     # Filter by directory (partial match)
cockpit task list --name "keyword"              # Filter by task name (partial match, case-insensitive)
cockpit task current                            # Resolve the current task from this session
cockpit task get <id>                           # Latest 1 conversation turn
cockpit task get <id> --turns 3 --max-lines 500 # More history / larger terminal output
cockpit task goto <id>                          # Open Cockpit and select the task
cockpit task pin <id>                           # Pin a task in focus lists
cockpit task unpin <id>                         # Unpin a task

cockpit task get <id> includes:

  • model, effort, and serviceTier: the effective model, reasoning effort, and Codex speed tier selected for the task, or null when the task runtime does not expose them. The same stable fields are returned by task list, task create, and under task in task run / task wait
  • conversation: normalized task history limited to the latest N turns. Each item has role, text, kind, and source; kind: "message" is a user/agent message and kind: "terminal_output" is raw terminal fallback
  • terminalOutput: raw terminal output, useful for understanding live state while the task is waiting
  • readyForNextPrompt: when status is waiting_confirmation, send a new prompt only when this is true; handle permission or question reasons as in-progress user confirmations
  • waitingReason and optional waitingReasonSource (hook, status_file, pty_idle, pty_pattern, permission_queue, question_queue, sessionid_fallback, runtime_event, runtime_fallback)
  • statusSources: optional status source hints mirroring waitingReasonSource when available
  • latestReportSeq: sequence number of the newest report. Use it as the --since cursor for cockpit task wait

turn_complete means one response turn completed and the task can accept another prompt. It does not mean the whole task is completed.

Statuses

Status Meaning Action
running The agent is working Wait, or block with cockpit task wait <id>
waiting_confirmation The agent waits for input Fetch the report with cockpit task wait <id> (or inspect with task get), then respond with task send
completed Work finished or the process ended Review the result. Remove only when cleanup is requested
error The task process failed to start (for example posix_spawnp failed.) Check errorMessage in task get, fix the cause, then create a new task
  • needsResume: true -> the process stopped but the task is not completed (for example after an app restart). Resume with cockpit task resume <id>. A Terminal task resumes with a fresh shell in the same directory because its previous shell process cannot be restored.
  • isPinned: true -> the task is pinned in focus lists

Create

Use --directory /path/to/repo when working in an existing repository. If omitted, the task starts in a temporary folder.

cockpit task create --instruction "Instruction text" --directory /path/to/repo
cockpit task create --instruction "Instruction text" --directory /path/to/repo --agent-type codex
cockpit task create --instruction "Check the work account" --directory /path/to/repo --browser-identity work
cockpit task create --instruction "Investigate the failure" --directory /path/to/repo --agent-type codex --model gpt-5.5 --effort high --service-tier fast
cockpit task create --instruction "Investigate deeply" --directory /path/to/repo --agent-type codex --effort high
cockpit task create --instruction "Review this repository" --directory /path/to/repo --agent-type qoder --system-prompt cockpit
cockpit task create --instruction "Summarize the repository" --agent-type cockpit --model openrouter/openai/gpt-5.4 --effort medium
cockpit task create --instruction "npm test" --directory /path/to/repo --agent-type terminal --command "npm test"
cockpit task create --instruction "Instruction text" --directory /path/to/repo --worktree feature/my-branch
cat instruction.md | cockpit task create --stdin --directory /path/to/repo         # Long instruction, no shell quoting
cockpit task create --instruction-file instruction.md --directory /path/to/repo    # Same, from a file

Pass any instruction that is longer than one line, or that contains backticks, quotes, $, or a code fence, with --stdin or --instruction-file. Inside a double-quoted shell argument the shell runs backticks as command substitution and rewrites $..., so the instruction is already damaged before cockpit sees it — sometimes silently, sometimes as unmatched quote with nothing sent at all. --stdin and --instruction-file deliver the bytes unchanged, including the trailing newline.

Option Description Default
--instruction Task instruction (required) -
--instruction-file Read the instruction from a file instead of --instruction -
--stdin Read the instruction from standard input instead of --instruction -
--directory Working directory. Use master for the Master Agent directory Temporary folder
--agent-type claude, codex, antigravity, cursor, qoder, grok, terminal, cockpit The defaultAgent setting
--claude-profile Claude account for the task (profile name or id from cockpit accounts; claude agent only) Default account
--codex-profile Codex account for the task (profile name or id from cockpit accounts --agent-type codex; codex agent only) Default account
--account auto, default, or an account profile name/id for Claude, Codex, Grok, Antigravity, Cursor, or Qoder Auto
--browser-identity Browser Identity name or id; use default for the legacy browser profile. Available for every agent type Default Identity
--model Model id for cockpit, or for Claude, Codex, Antigravity, Cursor, Qoder, or Grok when that agent's current UI mode is visual. Cursor accepts a CLI id such as composer-2.5, claude-sonnet-5-thinking-high, cursor-grok-4.6-high, or auto, an ACP-advertised name, or a full ACP id. Cockpit ids start with openrouter/, opencode-go/, or lmstudio/ and include a non-empty id after the provider Agent setting
--effort Reasoning effort. When --model is omitted, applies to the agent's current effective default model Model setting or model default
--service-tier Codex visual speed tier: standard or fast. When --model is omitted, applies to the current effective default model Model setting or standard
--system-prompt Built-in or custom system prompt for visual Claude, visual Codex, visual Qoder, or Cockpit Agent setting
--command Command to run Configured value
--name Task name, up to 50 characters First line of the instruction
--worktree Branch name for creating a git worktree -
--worktree-base Base path where the worktree is created ~/.agi-tools/worktrees
--studio Launch a Creative Studio task (model or picturebook). Creates a managed workspace; ignores --directory/--worktree -
--parent-task-id Parent task used for nesting in the task UI Caller task

Model selection is limited to runtimes that consume the existing model settings: cockpit, Claude visual, Codex visual, Antigravity visual, Cursor visual, Qoder visual, and Grok visual. Antigravity visual model ids come from agy models, plus auto-gemini-3 which lets the CLI pick. Terminal UI modes and unsupported agents reject the option instead of ignoring it. --effort remains limited to Cockpit, Claude visual, Codex visual, Cursor visual, Grok visual, and Qoder visual. --service-tier is limited to Codex visual tasks. --system-prompt accepts built-in presets or names from cockpit system-prompt list; --system-prompt-preset remains a compatibility alias. Change the agent UI mode in Cockpit Settings before creating a runtime-specific visual task.

cockpit effort values are none, minimal, low, medium, high, and xhigh. Claude visual accepts low, medium, high, xhigh, and max. Codex visual accepts low, medium, high, xhigh, max, and ultra; minimal is not accepted because the visual runtime normalizes it to low. Grok visual accepts low, medium, high, and xhigh, and only when the selected model advertises reasoning effort. Qoder visual accepts none, low, medium, high, xhigh, and max, and only when the selected model advertises reasoning effort. Cursor visual accepts minimal, low, medium, high, xhigh, and max, per model — the levels mirror the thought level in Cursor's model picker (Cursor's extra-high maps to xhigh), a model with no thought level (composer-2.5, auto) rejects the option, and a model id that encodes a level (claude-sonnet-5-thinking-high) applies it without --effort. Cursor's cursor-grok-4.6-low, cursor-grok-4.6-medium, cursor-grok-4.6-high, and cursor-grok-4.6-xhigh CLI ids resolve to the ACP model grok-4.6 with the encoded effort. Known Claude, Codex, Cursor, Grok, and Qoder models are validated against their model-specific capabilities. Unknown dynamic models use the agent's effort enum so newly available models are not rejected only because the local catalog has not caught up.

When an LM Studio task has no configured model, Cockpit selects the first loaded usable model at the first prompt. The immediate create response may return model and effort as null; after runtime resolution, task settings and subsequent list/get/run/wait responses contain the selected lmstudio/<id> and its effective effort.

Creative Studio examples (model requires the modeling toolchain set up in the app first):

cockpit task create --instruction "A toy car that rolls when printed" --studio model
cockpit task create --instruction "A picture book for 4-year-olds about a lost fox cub finding its way home" --studio picturebook

Delegate And Wait (Preferred)

Prefer cockpit task run when delegating work. It creates the task and blocks until the first report, then returns report with status (waiting_confirmation, error, completed), waitingReason, seq, and the task's latest message in report.message — no polling needed.

cockpit task run --instruction "Instruction text" --directory /path/to/repo --agent-type codex
cockpit task run --instruction "Review this change" --directory /path/to/repo --agent-type codex --model gpt-5.5 --effort high --service-tier fast
cockpit task run --instruction "Instruction text" --directory /path/to/repo --timeout 300
cat instruction.md | cockpit task run --stdin --directory /path/to/repo --agent-type codex
cockpit task run --instruction-file instruction.md --directory /path/to/repo --agent-type codex
cockpit task wait <id>                            # Return the latest report, or block until the next one
cockpit task wait <id> --since <seq> --timeout 110
cockpit task send <id> --text "continue" --wait   # Send a prompt and block until that turn's report
cat message.md | cockpit task send <id> --stdin --wait

Every task keeps a persistent report log. A report is appended when a turn completes, the runtime errors (status: error with the error message — including startup failures), or the task completes. report.seq increases per task. task wait is level-triggered: without --since it returns the latest report immediately when the task is at rest; pass --since <last seq you processed> to block until the next new report. A {"timeout": true} result is normal — re-run task wait to keep waiting, or run it in the background with a larger --timeout for long tasks.

Reports never inject a prompt into another task or resume a parent task. Nesting via --parent-task-id only controls the task hierarchy shown in Cockpit. Use task run, task wait <id>, or task send <id> --wait whenever an agent needs a child result.

Option Description Default
--stdin (run) Read the instruction from standard input instead of --instruction -
--instruction-file (run) Read the instruction from a file instead of --instruction -
--timeout Seconds to wait before returning {"timeout": true} 110
--since Return only reports with seq greater than this value (wait only) -

Respond

cockpit task send <id>              # Send Enter for approval or continue
cockpit task send <id> --text "yes" # Send text
cockpit task send <id> --text "2"   # Send a choice number
cat message.md | cockpit task send <id> --stdin   # Long or Markdown message, no shell quoting
cockpit task send <id> --text-file message.md     # Same, from a file
Option Description Default
--text Text to send Enter key
--text-file Read the text from a file instead of --text -
--stdin Read the text from standard input instead of --text -
--wait Block until the task produces a report after this send -
--timeout (with --wait) Seconds to wait 110

Use --stdin or --text-file for anything longer than one line and for anything containing backticks, quotes, $, or a code fence. A message embedded in a double-quoted shell argument is rewritten by the shell before it reaches cockpit: backticked spans run as commands and disappear, and an unbalanced quote aborts the command so nothing is sent.

Finish And Clean Up

cockpit task complete <id>                 # Stop the process and move the task to completed. Worktrees are deleted automatically
cockpit task complete <id> --keep-worktree # Complete but keep the worktree
cockpit task remove <id>                   # Remove from Cockpit (complete + delete)
cockpit task resume <id>                   # Resume the session for a stopped task
cockpit task rename <id> --name "New name" # Rename the task

Do not complete or remove tasks unless the user explicitly instructs you to do so.

Switch Task Account

cockpit task account <id>           # Show the account the task runs on
cockpit task account <id> work      # Switch to the account named "work" (name or profile id from `cockpit accounts`)
cockpit task account <id> default   # Switch back to the default account

Switching works mid-task for Claude, Codex, Grok, Antigravity, Cursor, and Qoder tasks: the running session stops, its transcript moves to the target account, and the same session resumes there. The target account must be signed in. If the previous turn stopped with waitingReason: "usage_limit", send a prompt after switching to continue the work on the new account.

Switch Browser Identity

cockpit task browser-identity <id>              # Show the task's assigned Browser Identity
cockpit task browser-identity <id> work         # Assign by Identity name or id
cockpit task browser-identity <id> default      # Return to the Default Identity
cockpit task browser-identity                   # Show the calling task's assignment
cockpit task browser-identity work              # Assign the calling task
cockpit task browser-identity --task-id <id>    # Explicitly inspect another task from task context

Switching an Identity detaches the task's current browser panel so its next browser session consistently uses the new persistent partition. Existing sessions stay with their original Identity and become available again if the task switches back. The operation does not copy cookies, cache, localStorage, or other browser data between Identities. Use cockpit browser identity list --json to discover names and ids.

Remote Devices

Configure aliases with cockpit devices first, then target a remote Cockpit with task commands. --host can be placed before or after the subcommand.

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

Guidance

  • Prefer delegating implementation work to Cockpit tasks when the user asks for orchestration or parallel work.
  • Create tasks sequentially unless there is a clear reason to fan out.
  • Inspect task output before responding to a waiting task; increase --turns or --max-lines when context is insufficient.
  • Keep user-facing summaries concise and report unverified work plainly.