Manage workflow state in .agents/tmp/state.json with atomic writes
View on GitHubplugins/subagents/skills/state-manager/SKILL.md
February 5, 2026
Select agents to install to:
npx add-skill https://github.com/kenkenmain/ken-cc-plugins/blob/main/plugins/subagents/skills/state-manager/SKILL.md -a claude-code --skill state-managerInstallation paths:
.claude/skills/state-manager/# State Manager
Manage subagents workflow state with file-based persistence.
## State Location
`.agents/tmp/state.json` - All workflow state persisted here.
## State Schema (v2)
```json
{
"version": 2,
"task": "<task description>",
"status": "pending|in_progress|stopped|completed|failed|blocked|restarting|skipped",
"currentStage": "EXPLORE|PLAN|IMPLEMENT|TEST|FINAL",
"currentPhase": "0|1.1|1.2|1.3|2.1|2.2|2.3|3.1|3.2|3.3|3.4|3.5|4.1|4.2|4.3",
"pipelineProfile": "minimal|standard|thorough",
"codexAvailable": true,
"ownerPpid": "<session PID for scoping>",
"worktree": {
"path": "/absolute/path/to/repo--subagent",
"branch": "subagents/task-slug",
"createdAt": "<ISO timestamp>"
},
"reviewer": "subagents:codex-reviewer|subagents:claude-reviewer",
"failureAnalyzer": "subagents:codex-failure-analyzer|subagents:failure-analyzer",
"difficultyEstimator": "subagents:codex-difficulty-estimator|subagents:difficulty-estimator",
"testDeveloper": "subagents:codex-test-developer|subagents:test-developer",
"docUpdater": "subagents:codex-doc-updater|subagents:doc-updater",
"taskAnalysis": {
"complexity": "simple|medium|complex",
"needsTests": true,
"needsDocs": true,
"reasoning": "..."
},
"schedule": [
{ "phase": "0", "stage": "EXPLORE", "name": "Explore", "type": "dispatch" },
{
"phase": "1.1",
"stage": "PLAN",
"name": "Brainstorm",
"type": "subagent"
},
{ "phase": "1.2", "stage": "PLAN", "name": "Plan", "type": "dispatch" },
{
"phase": "1.3",
"stage": "PLAN",
"name": "Plan Review",
"type": "review"
},
{
"phase": "2.1",
"stage": "IMPLEMENT",
"name": "Task Execution",
"type": "dispatch"
},
{
"phase": "2.2",
"stage": "IMPLEMENT",
"name": "Simplify",
"type": "subagent"
},
{
"phase": "2.3",
"stage": "IMPLEMENT",
"name": "Implementation Review",
"type": "revie