veirox task
Manage scheduled and triggered tasks — the agent's recurring work unit.
Synopsis
veirox task <subcommand> [args] [flags]
Description
A task is a named, idempotent unit of agent work. Tasks can fire on a cron schedule, on an inbound webhook, on a Slack mention, or be invoked directly via the CLI. Each invocation creates a session with its own streaming transcript, cost, and audit trail.
Use the CLI for CI integration (deterministic triggers with --idempotency-key), bulk operations, and scripting. Use the Console at /console/<org>/tasks for visual editing and run history.
Subcommands
| Command | Description |
|---|---|
task list | List tasks with optional filters (enabled, search). |
task stats | Aggregate task statistics (count, last-run, success rate). |
task info <task-id> | Show full task details including schedule, MCP servers, repos. |
task new | Create a new task (interactive wizard or flags). |
task update <task-id> | Update an existing task (rename, change schedule, swap prompt). |
task run <task-id> | Trigger a task immediately; idempotency-key auto-attached. |
task clone <task-id> | Duplicate a task as a new task (handy for staging copies). |
task delete <task-id> | Soft-delete a task. Use --yes to skip confirmation. |
task rm-many | Bulk soft-delete multiple tasks by id. |
task templates | List available task templates (org + global). |
task list
List tasks visible to the current project. Filter by enabled state or substring search.
| Flag | Type | Default | Description |
|---|---|---|---|
--enabled | bool | — | If set, list only enabled tasks (use --enabled=false for disabled). |
--search | string | — | Substring match against task name + description. |
--limit | int | 50 | Maximum tasks to return (backend caps at 500). |
--offset | int | 0 | Offset for pagination. |
veirox task list --enabled --limit 20 veirox task list --search "deploy"
task run <task-id>
Trigger a task immediately. Creates a new session and returns the session ID (or streams the live transcript if --wait). Every run carries an auto-generated Idempotency-Key so safe to retry from CI.
| Flag | Type | Default | Description |
|---|---|---|---|
--idempotency-key | string | auto-UUID | Override the auto-generated key. Useful for CI retry loops where you want the second attempt to be deduplicated. |
--wait | bool | false | Block until the session completes; stream transcript inline. |
veirox task run b1f5b1d4-... --wait veirox task run b1f5b1d4-... --idempotency-key "$GITHUB_RUN_ID"
task new
Create a new task. Flags are interactive when omitted (TTY only).
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | — | Task display name. |
--prompt | string | — | Inline prompt body. Use --prompt-file for files. |
--prompt-file | string | — | Path to a file whose contents become the prompt. |
--cron | string | — | Cron schedule (e.g. 0 9 * * *). |
--enabled | bool | true | Whether the task is active when created. |
veirox task new \ --name "morning-health-check" \ --prompt-file ./prompts/health.md \ --cron "0 9 * * *"
Remaining subcommands (stats, info, update, clone, delete, rm-many, templates) follow the same pattern — flag table + example. See the binary with veirox task <sub> --help for the exact flags shipped in your version.
Examples
List enabled tasks and trigger the first one:
ID=$(veirox task list --enabled --limit 1 -o json | jq -r '.[0].id') veirox task run "$ID" --wait
Trigger from GitHub Actions with run-id as idempotency key:
# .github/workflows/nightly.yml - run: | veirox task run "$VEIROX_TASK_ID" --idempotency-key "$GITHUB_RUN_ID" --wait env: VEIROX_API_KEY: <set-in-your-ci-secret-store>
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | Generic error (network, API 5xx). |
2 | Validation error (bad flag, missing required arg). |
3 | Unauthenticated. Run veirox login or set VEIROX_API_KEY. |
4 | Not found (task id doesn't exist in this project). |
5 | Permission denied (your role / API key lacks the scope). |
See also
- 📘 Concept: Sessions — what a triggered task spawns
- 📘 Concept: Approvals — when tasks pause for human consent
- 🧑🍳 Recipe: Trigger a task from CI
- 📚 Reference:
veirox session - 📚 Reference:
veirox live— tail running sessions - 📚 Reference:
veirox webhook— external triggers