TaskFlow
DashboardFreewriteWhiteboardsProjectsCRMTasksNotificationsSettingsAgent TowerAPI Docs
OpenClaw Docs
?

User

Member

Caricamento in corso...

Home
Progetti
Task
Notifiche
CRM

    OpenClaw

    Documentation Mirror

    Documentation Overview

    Docs

    Auth credential semantics
    Scheduled tasks
    Hooks
    Automation & tasks
    Standing orders
    Task flow
    Background tasks
    BlueBubbles
    Broadcast groups
    Channel routing
    Discord
    Feishu
    Google Chat
    Group messages
    Groups
    iMessage
    Chat channels
    IRC
    LINE
    Channel location parsing
    Matrix
    Matrix migration
    Matrix push rules for quiet previews
    Mattermost
    Microsoft Teams
    Nextcloud Talk
    Nostr
    Pairing
    QA channel
    QQ bot
    Signal
    Slack
    Synology Chat
    Telegram
    Tlon
    Channel troubleshooting
    Twitch
    WeChat
    WhatsApp
    Yuanbao
    Zalo
    Zalo personal
    CI pipeline
    ACP
    Agent
    Agents
    Approvals
    Backup
    Browser
    Channels
    Clawbot
    `openclaw commitments`
    Completion
    Config
    Configure
    Cron
    Daemon
    Dashboard
    Devices
    Directory
    DNS
    Docs
    Doctor
    Flows (redirect)
    Gateway
    Health
    Hooks
    CLI reference
    Inference CLI
    Logs
    MCP
    Memory
    Message
    Migrate
    Models
    Node
    Nodes
    Onboard
    Pairing
    Plugins
    Proxy
    QR
    Reset
    Sandbox CLI
    Secrets
    Security
    Sessions
    Setup
    Skills
    Status
    System
    `openclaw tasks`
    TUI
    Uninstall
    Update
    Voicecall
    Webhooks
    Wiki
    Active memory
    Agent runtime
    Agent loop
    Agent runtimes
    Agent workspace
    Gateway architecture
    Channel docking
    Inferred commitments
    Compaction
    Context
    Context engine
    Delegate architecture
    Dreaming
    Experimental features
    Features
    Markdown formatting
    Memory overview
    Builtin memory engine
    Honcho memory
    QMD memory engine
    Memory search
    Messages
    Model failover
    Model providers
    Models CLI
    Multi-agent routing
    OAuth
    OpenClaw App SDK
    Presence
    QA overview
    Matrix QA
    Command queue
    Steering queue
    Retry policy
    Session management
    Session pruning
    Session tools
    SOUL.md personality guide
    Streaming and chunking
    System prompt
    Timezones
    TypeBox
    Typing indicators
    Usage tracking
    Date and time
    Node + tsx crash
    Diagnostics flags
    Authentication
    Background exec and process tool
    Bonjour discovery
    Bridge protocol
    CLI backends
    Configuration — agents
    Configuration — channels
    Configuration — tools and custom providers
    Configuration
    Configuration examples
    Configuration reference
    Diagnostics export
    Discovery and transports
    Doctor
    Gateway lock
    Health checks
    Heartbeat
    Gateway runbook
    Local models
    Gateway logging
    Multiple gateways
    Network model
    OpenAI chat completions
    OpenResponses API
    OpenShell
    OpenTelemetry export
    Gateway-owned pairing
    Prometheus metrics
    Gateway protocol
    Remote access
    Remote gateway setup
    Sandbox vs tool policy vs elevated
    Sandboxing
    Secrets management
    Secrets apply plan contract
    Security audit checks
    Security
    Tailscale
    Tools invoke API
    Troubleshooting
    Trusted proxy auth
    Debugging
    Environment variables
    FAQ
    FAQ: first-run setup
    FAQ: models and auth
    GPT-5.5 / Codex agentic parity
    GPT-5.5 / Codex parity maintainer notes
    Help
    Scripts
    Testing
    Testing: live suites
    General troubleshooting
    OpenClaw
    Ansible
    Azure
    Bun (experimental)
    ClawDock
    Release channels
    DigitalOcean
    Docker
    Docker VM runtime
    exe.dev
    Fly.io
    GCP
    Hetzner
    Hostinger
    Install
    Installer internals
    Kubernetes
    macOS VMs
    Migration guide
    Migrating from Claude
    Migrating from Hermes
    Nix
    Node.js
    Northflank
    Oracle Cloud
    Podman
    Railway
    Raspberry Pi
    Render
    Uninstall
    Updating
    Logging
    Network
    Audio and voice notes
    Camera capture
    Image and media support
    Nodes
    Location command
    Media understanding
    Talk mode
    Node troubleshooting
    Voice wake
    Pi integration architecture
    Pi development workflow
    Android app
    Platforms
    iOS app
    Linux app
    Gateway on macOS
    Canvas
    Gateway lifecycle
    macOS dev setup
    Health checks (macOS)
    Menu bar icon
    macOS logging
    Menu bar
    Peekaboo bridge
    macOS permissions
    Remote control
    macOS signing
    Skills (macOS)
    Voice overlay
    Voice wake (macOS)
    WebChat (macOS)
    macOS IPC
    macOS app
    Windows
    Plugin internals
    Plugin architecture internals
    Building plugins
    Plugin bundles
    Codex Computer Use
    Codex harness
    Community plugins
    Plugin compatibility
    Google Meet plugin
    Plugin hooks
    Plugin manifest
    Memory LanceDB
    Memory wiki
    Message presentation
    Agent harness plugins
    Building channel plugins
    Channel turn kernel
    Plugin entry points
    Plugin SDK migration
    Plugin SDK overview
    Building provider plugins
    Plugin runtime helpers
    Plugin setup and config
    Plugin SDK subpaths
    Plugin testing
    Skill workshop plugin
    Voice call plugin
    Webhooks plugin
    Zalo personal plugin
    OpenProse
    Alibaba Model Studio
    Anthropic
    Arcee AI
    Azure Speech
    Amazon Bedrock
    Amazon Bedrock Mantle
    Chutes
    Claude Max API proxy
    Cloudflare AI gateway
    ComfyUI
    Deepgram
    Deepinfra
    DeepSeek
    ElevenLabs
    Fal
    Fireworks
    GitHub Copilot
    GLM (Zhipu)
    Google (Gemini)
    Gradium
    Groq
    Hugging Face (inference)
    Provider directory
    Inferrs
    Inworld
    Kilocode
    LiteLLM
    LM Studio
    MiniMax
    Mistral
    Model provider quickstart
    Moonshot AI
    NVIDIA
    Ollama
    OpenAI
    OpenCode
    OpenCode Go
    OpenRouter
    Perplexity
    Qianfan
    Qwen
    Runway
    SGLang
    StepFun
    Synthetic
    Tencent Cloud (TokenHub)
    Together AI
    Venice AI
    Vercel AI gateway
    vLLM
    Volcengine (Doubao)
    Vydra
    xAI
    Xiaomi MiMo
    Z.AI
    Default AGENTS.md
    Release policy
    API usage and costs
    Credits
    Device model database
    Full release validation
    Memory configuration reference
    OpenClaw App SDK API design
    Prompt caching
    Rich output protocol
    RPC adapters
    SecretRef credential surface
    Session management deep dive
    AGENTS.md template
    BOOT.md template
    BOOTSTRAP.md template
    HEARTBEAT.md template
    IDENTITY template
    SOUL.md template
    TOOLS.md template
    USER template
    Tests
    Token use and costs
    Transcript hygiene
    Onboarding reference
    Contributing to the threat model
    Threat model (MITRE ATLAS)
    Formal verification (security models)
    Network proxy
    Agent bootstrapping
    Docs directory
    Getting started
    Docs hubs
    OpenClaw lore
    Onboarding (macOS app)
    Onboarding overview
    Personal assistant setup
    Setup
    Showcase
    Onboarding (CLI)
    CLI automation
    CLI setup reference
    ACP agents
    ACP agents — setup
    Agent send
    apply_patch tool
    Brave search
    Browser (OpenClaw-managed)
    Browser control API
    Browser troubleshooting
    Browser login
    WSL2 + Windows + remote Chrome CDP troubleshooting
    BTW side questions
    ClawHub
    Code execution
    Creating skills
    Diffs
    DuckDuckGo search
    Elevated mode
    Exa search
    Exec tool
    Exec approvals
    Exec approvals — advanced
    Firecrawl
    Gemini search
    Grok search
    Image generation
    Tools and plugins
    Kimi search
    LLM task
    Lobster
    Tool-loop detection
    Media overview
    MiniMax search
    Multi-agent sandbox and tools
    Music generation
    Ollama web search
    PDF tool
    Perplexity search
    Plugins
    Reactions
    SearXNG search
    Skills
    Skills config
    Slash commands
    Sub-agents
    Tavily
    Thinking levels
    Tokenjuice
    Trajectory bundles
    Text-to-speech
    Video generation
    Web search
    Web fetch
    Linux server
    Control UI
    Dashboard
    Web
    TUI
    WebChat

    OpenAPI Specs

    openapi
    TaskFlow
    docs/openclaw
    Original Docs

    Real-time Synchronized Documentation

    Last sync: 01/05/2026 07:04:05

    Note: This content is mirrored from docs.openclaw.ai and is subject to their terms and conditions.

    OpenClaw Docs

    v2.4.0 Production

    Last synced: Today, 22:00

    Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.

    Use this file to discover all available pages before exploring further.

    Background tasks

    note

    Looking for scheduling? See [Automation and tasks](/automation) for choosing the right mechanism. This page is the activity ledger for background work, not the scheduler.

    Background tasks track work that runs outside your main conversation session: ACP runs, subagent spawns, isolated cron job executions, and CLI-initiated operations.

    Tasks do not replace sessions, cron jobs, or heartbeats — they are the activity ledger that records what detached work happened, when, and whether it succeeded.

    note

    Not every agent run creates a task. Heartbeat turns and normal interactive chat do not. All cron executions, ACP spawns, subagent spawns, and CLI agent commands do.

    TL;DR

    • Tasks are records, not schedulers — cron and heartbeat decide when work runs, tasks track what happened.
    • ACP, subagents, all cron jobs, and CLI operations create tasks. Heartbeat turns do not.
    • Each task moves through
      text
      queued → running → terminal
      (succeeded, failed, timed_out, cancelled, or lost).
    • Cron tasks stay live while the cron runtime still owns the job; if the in-memory runtime state is gone, task maintenance first checks durable cron run history before marking a task lost.
    • Completion is push-driven: detached work can notify directly or wake the requester session/heartbeat when it finishes, so status polling loops are usually the wrong shape.
    • Isolated cron runs and subagent completions best-effort clean up tracked browser tabs/processes for their child session before final cleanup bookkeeping.
    • Isolated cron delivery suppresses stale interim parent replies while descendant subagent work is still draining, and it prefers final descendant output when that arrives before delivery.
    • Completion notifications are delivered directly to a channel or queued for the next heartbeat.
    • text
      openclaw tasks list
      shows all tasks;
      text
      openclaw tasks audit
      surfaces issues.
    • Terminal records are kept for 7 days, then automatically pruned.

    Quick start

    ```bash} # List all tasks (newest first) openclaw tasks list
    text
    # Filter by runtime or status openclaw tasks list --runtime acp openclaw tasks list --status running ```
    ```bash} # Show details for a specific task (by ID, run ID, or session key) openclaw tasks show ``` ```bash} # Cancel a running task (kills the child session) openclaw tasks cancel
    text
    # Change notification policy for a task openclaw tasks notify <lookup> state_changes ```
    ```bash} # Run a health audit openclaw tasks audit
    text
    # Preview or apply maintenance openclaw tasks maintenance openclaw tasks maintenance --apply ```
    ```bash} # Inspect TaskFlow state openclaw tasks flow list openclaw tasks flow show openclaw tasks flow cancel ```

    What creates a task

    SourceRuntime typeWhen a task record is createdDefault notify policy
    ACP background runs
    text
    acp
    Spawning a child ACP session
    text
    done_only
    Subagent orchestration
    text
    subagent
    Spawning a subagent via
    text
    sessions_spawn
    text
    done_only
    Cron jobs (all types)
    text
    cron
    Every cron execution (main-session and isolated)
    text
    silent
    CLI operations
    text
    cli
    text
    openclaw agent
    commands that run through the gateway
    text
    silent
    Agent media jobs
    text
    cli
    Session-backed
    text
    music_generate
    /
    text
    video_generate
    runs
    text
    silent

    Task lifecycle

    mermaid
    stateDiagram-v2 [*] --> queued queued --> running : agent starts running --> succeeded : completes ok running --> failed : error running --> timed_out : timeout exceeded running --> cancelled : operator cancels queued --> lost : session gone > 5 min running --> lost : session gone > 5 min
    StatusWhat it means
    text
    queued
    Created, waiting for the agent to start
    text
    running
    Agent turn is actively executing
    text
    succeeded
    Completed successfully
    text
    failed
    Completed with an error
    text
    timed_out
    Exceeded the configured timeout
    text
    cancelled
    Stopped by the operator via
    text
    openclaw tasks cancel
    text
    lost
    The runtime lost authoritative backing state after a 5-minute grace period

    Transitions happen automatically — when the associated agent run ends, the task status updates to match.

    Agent run completion is authoritative for active task records. A successful detached run finalizes as

    text
    succeeded
    , ordinary run errors finalize as
    text
    failed
    , and timeout or abort outcomes finalize as
    text
    timed_out
    . If an operator already cancelled the task, or the runtime already recorded a stronger terminal state such as
    text
    failed
    ,
    text
    timed_out
    , or
    text
    lost
    , a later success signal does not downgrade that terminal status.

    text
    lost
    is runtime-aware:

    • ACP tasks: backing ACP child session metadata disappeared.
    • Subagent tasks: backing child session disappeared from the target agent store.
    • Cron tasks: the cron runtime no longer tracks the job as active and durable cron run history does not show a terminal result for that run. Offline CLI audit does not treat its own empty in-process cron runtime state as authority.
    • CLI tasks: isolated child-session tasks use the child session; chat-backed CLI tasks use the live run context instead, so lingering channel/group/direct session rows do not keep them alive. Gateway-backed
      text
      openclaw agent
      runs also finalize from their run result, so completed runs do not sit active until the sweeper marks them
      text
      lost
      .

    Delivery and notifications

    When a task reaches a terminal state, OpenClaw notifies you. There are two delivery paths:

    Direct delivery — if the task has a channel target (the

    text
    requesterOrigin
    ), the completion message goes straight to that channel (Telegram, Discord, Slack, etc.). For subagent completions, OpenClaw also preserves bound thread/topic routing when available and can fill a missing
    text
    to
    / account from the requester session's stored route (
    text
    lastChannel
    /
    text
    lastTo
    /
    text
    lastAccountId
    ) before giving up on direct delivery.

    Session-queued delivery — if direct delivery fails or no origin is set, the update is queued as a system event in the requester's session and surfaces on the next heartbeat.

    tip

    Task completion triggers an immediate heartbeat wake so you see the result quickly — you do not have to wait for the next scheduled heartbeat tick.

    That means the usual workflow is push-based: start detached work once, then let the runtime wake or notify you on completion. Poll task state only when you need debugging, intervention, or an explicit audit.

    Notification policies

    Control how much you hear about each task:

    PolicyWhat is delivered
    text
    done_only
    (default)
    Only terminal state (succeeded, failed, etc.) — this is the default
    text
    state_changes
    Every state transition and progress update
    text
    silent
    Nothing at all

    Change the policy while a task is running:

    bash
    openclaw tasks notify <lookup> state_changes

    CLI reference

    Chat task board (
    text
    /tasks
    )

    Use

    text
    /tasks
    in any chat session to see background tasks linked to that session. The board shows active and recently completed tasks with runtime, status, timing, and progress or error detail.

    When the current session has no visible linked tasks,

    text
    /tasks
    falls back to agent-local task counts so you still get an overview without leaking other-session details.

    For the full operator ledger, use the CLI:

    text
    openclaw tasks list
    .

    Status integration (task pressure)

    text
    openclaw status
    includes an at-a-glance task summary:

    text
    Tasks: 3 queued · 2 running · 1 issues

    The summary reports:

    • active — count of
      text
      queued
      +
      text
      running
    • failures — count of
      text
      failed
      +
      text
      timed_out
      +
      text
      lost
    • byRuntime — breakdown by
      text
      acp
      ,
      text
      subagent
      ,
      text
      cron
      ,
      text
      cli

    Both

    text
    /status
    and the
    text
    session_status
    tool use a cleanup-aware task snapshot: active tasks are preferred, stale completed rows are hidden, and recent failures only surface when no active work remains. This keeps the status card focused on what matters right now.

    Storage and maintenance

    Where tasks live

    Task records persist in SQLite at:

    text
    $OPENCLAW_STATE_DIR/tasks/runs.sqlite

    The registry loads into memory at gateway start and syncs writes to SQLite for durability across restarts. The Gateway keeps the SQLite write-ahead log bounded by using SQLite's default autocheckpoint threshold plus periodic and shutdown

    text
    TRUNCATE
    checkpoints.

    Automatic maintenance

    A sweeper runs every 60 seconds and handles four things:

    Reconciliation

    Checks whether active tasks still have authoritative runtime backing. ACP/subagent tasks use child-session state, cron tasks use active-job ownership, and chat-backed CLI tasks use the owning run context. If that backing state is gone for more than 5 minutes, the task is marked `lost`.

    ACP session repair

    Closes terminal or orphaned parent-owned one-shot ACP sessions, and closes stale terminal or orphaned persistent ACP sessions only when no active conversation binding remains.

    Cleanup stamping

    Sets a `cleanupAfter` timestamp on terminal tasks (endedAt + 7 days). During retention, lost tasks still appear in audit as warnings; after `cleanupAfter` expires or when cleanup metadata is missing, they are errors.

    Pruning

    Deletes records past their `cleanupAfter` date.

    note

    **Retention:** terminal task records are kept for **7 days**, then automatically pruned. No configuration needed.

    How tasks relate to other systems

    Related

    • Automation & Tasks — all automation mechanisms at a glance
    • CLI: Tasks — CLI command reference
    • Heartbeat — periodic main-session turns
    • Scheduled Tasks — scheduling background work
    • Task Flow — flow orchestration above tasks

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine