Skip to content
Automation
Agent

PLAN_TASK_STATUS

Each task has one source of status. A parent-run task stores its status and timestamps in the plan. A delegated task stores one owning job ID. A group calculates its status from its children.

From plugin
n8n
209k10 skills10 agents2 commands

Claude Code

$ npx -y skills add n8n-io/n8n --agent claude-code

Agent definition

PLAN_TASK_STATUS.md

Plan task status

Each task has one source of status. A parent-run task stores its status and timestamps in the plan. A delegated task stores one owning job ID. A group calculates its status from its children.

`agent-plan-state.ts` calculates the current view. Plan reads, dependency checks, delegation, and continuation use this calculation. Job transitions do not update the plan document or its revision. Revisions track plan edits and job bindings.

| Job status | Task status | | --- | --- | | `running` | `in_progress` | | `suspended` for approval | `in_progress` | | `suspended` for a resume reservation | `paused` | | `paused` | `paused` | | `completed` | `done` | | `failed` | `failed` | | `cancelled` | `cancelled` |

Groups use this priority: `in_progress`, `paused`, `pending`, `failed`, `cancelled`, then `done`. Empty groups stay `pending`. A successful fallback replaces its original task in this calculation.

The parent can change titles and result summaries after completion. It cannot override the status of a delegated task. Further delegated work needs a new task. The parent still uses `update_plan` for work that it does itself.

`AgentPlanRepository` owns plan persistence. `AgentPlanService` validates edits and returns the calculated view. The current-plan GET routes use the existing project and thread access checks.

Development upgrade

Plan format 2 replaces the unreleased format 1. The irreversible `ResetAgentPlansForJobStatus1793353273511` migration deletes old plans and their revision history. It clears their job links and plan references in Stop and checkpoint metadata. It preserves chat messages, executions, jobs, outcomes, and unrelated checkpoint data.

Stop the development instance before the upgrade. Upgrade all application processes together. Do not run mixed versions against the same database. Existing conversations can create new plans after the upgrade. The chat card must use the current-plan endpoint, because historical tool results can still contain deleted plans.

Stop and Continue

Stop captures the current executions and jobs. It pauses unfinished parent-run tasks. Delegated task status follows the owning job. Continue selects tasks whose prerequisites are ready. A paused sub-agent resumes the same job. A cancelled workflow needs a new task and job.

The Stop acknowledgement uses the existing message queue. It starts after the captured work stops and the parent turn ends. The execution record keeps the acknowledgement ID, so chat history can show the reply and its trace.

Stop is best effort. It does not fence work that starts after capture. It does not guarantee recovery across an instance restart. A running tool can delay a pause until the runtime reaches its next pause check.

Read more
@n8n-io
Ships withn8n

Fair-code platform to build and deploy AI agents and workflows. Combine a visual canvas with custom code, run it self-hosted or in the cloud, and connect to 1500+ integrations. AI automation you can trust with real work, from prototype to production.

209k12 skills10 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
209.2k
Star history of n8n-io/n8n on GitHub, a chart by star-history.com

Other agents on n8n.

developer
Agent

developer

Use this agent for any n8n development task - frontend (Vue 3), backend (Node.js/TypeScript), workflow engine, node creation, or…

@n8n-io@n8n-ioInstall Agent
prompt-caching
Agent

prompt-caching

`Agent.promptCaching()` generates provider-specific `providerOptions` for Anthropic, Claude on OpenRouter and Vertex, and OpenAI.…

@n8n-io@n8n-ioInstall Agent
BUILT_IN_TOOLS
Agent

BUILT_IN_TOOLS

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

@n8n-io@n8n-ioInstall Agent

More agents from other plugins.

GLOBAL
Agent

GLOBAL

本文件包含所有 Agent 必须遵守的通用规则。各 Agent 的 SOUL.md 可覆盖此处设定。

@cft0808@cft0808Install Agent

Questions about PLAN_TASK_STATUS.

Which coding agents can use PLAN_TASK_STATUS?
PLAN_TASK_STATUS installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.