{"data":{"post":{"title":"How I Built The Dynamic Workflow 4 Months Before Anthropic","subtitle":"","isPublished":true,"createdTime":"2026-05-29T00:00:00.000Z","lastModifiedTime":null,"license":null,"tags":["AI","Agent"],"category":"Programming","file":{"childMdx":{"excerpt":"Last week, Opus 4.8 shipped with Claude Code  dynamic workflows . Four months earlier, I had built…","code":{"body":"function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nconst layoutProps = {};\nreturn class MDXContent extends React.Component {\n  constructor(props) {\n    super(props);\n    this.layout = null;\n  }\n\n  render() {\n    const _this$props = this.props,\n          {\n      components\n    } = _this$props,\n          props = _objectWithoutProperties(_this$props, [\"components\"]);\n\n    return React.createElement(MDXTag, {\n      name: \"wrapper\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Last week, Opus 4.8 shipped with Claude Code `, React.createElement(MDXTag, {\n      name: \"strong\",\n      components: components,\n      parentName: \"p\"\n    }, `dynamic workflows`), `. Four months earlier, I had built an equivalent plugin, `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"p\",\n      props: {\n        \"href\": \"https://github.com/WeZZard/charge\"\n      }\n    }, `charge`), `, on Opus 4.5: you give it a prompt, and it creates and orchestrates reusable subagent-driven workflows.`), React.createElement(MDXTag, {\n      name: \"blockquote\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"p\",\n      components: components,\n      parentName: \"blockquote\"\n    }, `“Charge” here means sending a lot of subagents charging into the task you assigned.`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `I abandoned the project soon after since dynamically spawning and reusing subagent workflows turned out to be a false need. However, subagent-based orchestration remains central to my daily work in Claude Code—now through `, React.createElement(MDXTag, {\n      name: \"strong\",\n      components: components,\n      parentName: \"p\"\n    }, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"strong\",\n      props: {\n        \"href\": \"https://github.com/WeZZard/skills\"\n      }\n    }, `amplify`)), ` (`, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `amplify@wezzard-skills`), `), which applies lessons I learned in building `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), `.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `If you build agents, I hope this story helps you spot the next meaningful capability jump in a new model—and design systems like Claude Code's dynamic workflow without repeating my detours. Anthropic does not publish implementation details or design notes; this post and open repos do.`), React.createElement(MDXTag, {\n      name: \"h2\",\n      components: components\n    }, `Why I Built Charge?`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Since August 2025, I had been running a long-running agentic loop with detailed plan files to drive development of my personal projects in Claude Code with Opus 4.1.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `In practice, it was a subagent-driven loop. Subagents segregate context well because LLMs work by next-token prediction; one of the most efficient ways to improve a system's bottom line is to keep unnecessary content out of context.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `The loop includes an evaluator and several executor subagents that carry out development, testing, troubleshooting, and integration gatekeeping against the plan. Each step benefits from the context segregation subagent-driven design provides.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"figure\",\n      components: components,\n      parentName: \"p\"\n    }, `\n    `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"figure\",\n      props: {\n        \"href\": \"/static/715b69812a52152afe3e9f4ed9eec165/28f65/figure-1-production-loop.webp\"\n      }\n    }, React.createElement(MDXTag, {\n      name: \"picture\",\n      components: components,\n      parentName: \"a\"\n    }, `\n  `, React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/715b69812a52152afe3e9f4ed9eec165/0cc25/figure-1-production-loop.png\",\n        \"srcSet\": [\"/static/715b69812a52152afe3e9f4ed9eec165/5116e/figure-1-production-loop.png 178w\", \"/static/715b69812a52152afe3e9f4ed9eec165/92f55/figure-1-production-loop.png 356w\", \"/static/715b69812a52152afe3e9f4ed9eec165/0cc25/figure-1-production-loop.png 712w\", \"/static/715b69812a52152afe3e9f4ed9eec165/7ae06/figure-1-production-loop.png 1068w\", \"/static/715b69812a52152afe3e9f4ed9eec165/eee47/figure-1-production-loop.png 1424w\", \"/static/715b69812a52152afe3e9f4ed9eec165/38407/figure-1-production-loop.png 2136w\", \"/static/715b69812a52152afe3e9f4ed9eec165/1f1c3/figure-1-production-loop.png 7019w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/715b69812a52152afe3e9f4ed9eec165/690c8/figure-1-production-loop.webp\",\n        \"srcSet\": [\"/static/715b69812a52152afe3e9f4ed9eec165/25c8a/figure-1-production-loop.webp 178w\", \"/static/715b69812a52152afe3e9f4ed9eec165/60698/figure-1-production-loop.webp 356w\", \"/static/715b69812a52152afe3e9f4ed9eec165/690c8/figure-1-production-loop.webp 712w\", \"/static/715b69812a52152afe3e9f4ed9eec165/d7e52/figure-1-production-loop.webp 1068w\", \"/static/715b69812a52152afe3e9f4ed9eec165/456ef/figure-1-production-loop.webp 1424w\", \"/static/715b69812a52152afe3e9f4ed9eec165/2a654/figure-1-production-loop.webp 2136w\", \"/static/715b69812a52152afe3e9f4ed9eec165/28f65/figure-1-production-loop.webp 7019w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), `\n  `, React.createElement(MDXTag, {\n      name: \"img\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/715b69812a52152afe3e9f4ed9eec165/28f65/figure-1-production-loop.webp\",\n        \"alt\": \"A diagram titled \",\n        \"production\": \"\",\n        \"loop\\\"\": \"\",\n        \"with\": \"\",\n        \"three\": \"\",\n        \"columns:\": \"\",\n        \"me,\": \"\",\n        \"claude\": \"\",\n        \"code,\": \"\",\n        \"and\": \"\",\n        \"external\": \"\",\n        \"agents.\": \"\",\n        \"the\": \"\",\n        \"user\": \"\",\n        \"starts\": \"\",\n        \"a\": \"\",\n        \"milestone\": \"\",\n        \"epic\": \"\",\n        \"iteration\": \"\",\n        \"into\": \"\",\n        \"code's\": \"\",\n        \"implement\": \"\",\n        \"hub,\": \"\",\n        \"which\": \"\",\n        \"requests\": \"\",\n        \"work\": \"\",\n        \"from\": \"\",\n        \"implementation-evaluator,\": \"\",\n        \"developer,\": \"\",\n        \"troubleshooter,\": \"\",\n        \"integration-tester,\": \"\",\n        \"integration\": \"\",\n        \"gate\": \"\",\n        \"keeper\": \"\",\n        \"subagents\": \"\",\n        \"spawns\": \"\",\n        \"next\": \"\",\n        \"agent\": \"\",\n        \"their\": \"\",\n        \"responses.\": \"\",\n        \"dotted\": \"\",\n        \"arrows\": \"\",\n        \"show\": \"\",\n        \"handoffs\": \"\",\n        \"when\": \"\",\n        \"evaluator\": \"\",\n        \"finds\": \"\",\n        \"gap,\": \"\",\n        \"developer\": \"\",\n        \"issues,\": \"\",\n        \"only\": \"\",\n        \"unit\": \"\",\n        \"tests\": \"\",\n        \"remain,\": \"\",\n        \"or\": \"\",\n        \"no\": \"\",\n        \"gap.\": \"\",\n        \"integration-tester\": \"\",\n        \"can\": \"\",\n        \"call\": \"\",\n        \"openai\": \"\",\n        \"codex\": \"\",\n        \"environmental\": \"\",\n        \"errors,\": \"\",\n        \"missing\": \"\",\n        \"tools,\": \"\",\n        \"similar\": \"\",\n        \"failures\": \"\",\n        \"go\": \"\",\n        \"to\": \"\",\n        \"an\": \"\",\n        \"unexpected-error\": \"\",\n        \"handler\": \"\",\n        \"back\": \"\",\n        \"as\": \"\",\n        \"reported\": \"\",\n        \"error.\\\"\": \"\",\n        \"title\": \"Production Loop\",\n        \"width\": 712,\n        \"height\": 541,\n        \"loading\": \"lazy\"\n      }\n    }))), `\n    `, React.createElement(MDXTag, {\n      name: \"figcaption\",\n      components: components,\n      parentName: \"figure\"\n    }, `\n        `, React.createElement(MDXTag, {\n      name: \"span\",\n      components: components,\n      parentName: \"figcaption\"\n    }, `\n            Production Loop\n        `), `\n    `))), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `In September 2025, I published `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"p\",\n      props: {\n        \"href\": \"https://wezzard.com/post/2025/09/build-your-first-agentic-loop-9d22\"\n      }\n    }, `a post`), ` explaining how the system works. Two months later, Anthropic published a post that introduced the \"harness\" concept with a similar design.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `When Opus 4.5 shipped, the main agent would sometimes skip the evaluator-executor pattern of this loop and push work to completion on its own since subagent responses carried details about the in-loop task. Almost the same time, Claude Code had just introduced background tasks and parallel subagents. With these new features, the leak-to-main-agent phenomenon often ran faster anyway, because leaked tasks were sometimes decomposed and processed in parallel. By January 2026, I had spawned more than 70 parallel subagents in a file-processing task on Claude Code.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Adding it all up, from Opus 4.5 onward, running and coordinating subagents became much easier. That raised a question: what if I could create and manage reusable workflows driven by subagents, and build dependencies between them by borrowing concepts from structured concurrent programming—task trees and directed acyclic graphs?`), React.createElement(MDXTag, {\n      name: \"h2\",\n      components: components\n    }, `Implementation Details and Design Philosophy`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `The implementation details of `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), ` are simple: prompts drive it, and dynamically generated schemas enforce it. `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"p\",\n      props: {\n        \"href\": \"https://github.com/WeZZard/charge\"\n      }\n    }, `charge`), ` is open source; below I highlight implementation points that readers often mistake for \"magic.\"`), React.createElement(MDXTag, {\n      name: \"h3\",\n      components: components\n    }, `Task Decomposition and Dependencies`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Task decomposition and dependency building are achieved by the chain-of-thought technique in the following steps:`), React.createElement(MDXTag, {\n      name: \"ol\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Understand the user's intent`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Identify repetitive patterns in the user's intent`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Identify task boundaries so each task has a single, clear purpose and identifiable inputs and outputs.`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Define task properties used in the task's schema.`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Map dependencies to a task dependency graph.`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Following this chain of thought, the model converts a simple user prompt into a JSON object that represents the dependency graph of decomposed tasks:`), React.createElement(MDXTag, {\n      name: \"pre\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"code\",\n      components: components,\n      parentName: \"pre\",\n      props: {\n        \"className\": \"language-json\"\n      }\n    }, `{\n  \"workflow_name\": \"[string]\",\n  // ...\n  \"tasks\": [\n    {\n      \"id\": \"[string]\",\n      \"name\": \"[string]\",\n      \"description\": \"[string]\",\n      // ...\n      \"input\": [\n        {\"field\": \"[string]\", \"type\": \"[string]\", \"description\": \"[string]\"}\n      ],\n      \"output\": [\n        {\"field\": \"[string]\", \"type\": \"[string]\", \"description\": \"[string]\"}\n      ],\n      \"depends_on\": [\"[string]\"]\n    }\n  ],\n  ...\n}\n`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Tasks live in the `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `tasks`), ` array; each has a `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `depends_on`), ` field for its dependencies. The workflow executor consumes this JSON object.`), React.createElement(MDXTag, {\n      name: \"h3\",\n      components: components\n    }, `The Execution Engine`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Read the task dependency graph from that JSON object, and Claude Code can \"magically\" run tasks in dependency order.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Anthropic implemented this part with a deterministic execution engine written in JS, which I think is the right move for a system meant to orchestrate subagents at scale. LLMs work by next-token prediction; a prompt-based execution engine must rely on the model to infer execution order and emit the correct tool call to launch the next agent when a predecessor finishes—neither is guaranteed.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `However, despite wiring all the subagents with JS, you can implement the engine with the generator pattern and run it in the main agent:`), React.createElement(MDXTag, {\n      name: \"pre\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"code\",\n      components: components,\n      parentName: \"pre\",\n      props: {\n        \"className\": \"language-shell\"\n      }\n    }, `# Main agent found task 1 is completed\n# then call the \\`complete-task.sh\\` tool.\n# \\`complete-task.sh\\` marks \\`task_1\\` as completed\n# and returns the next tasks.\n$> complete-task.sh task_1\n{\n    \"next_tasks\": [\n      {\n          \"name\": \"task_2\",\n          \"description\": \"...\"\n      },\n      {\n          \"name\": \"task_3\",\n          \"description\": \"...\"\n      }\n    ],\n    \"execution_order\": \"parallel\"\n}\n`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `With this design, the main agent of Claude Code still orchestrates the workflow. It counts on the model to call `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `complete-task.sh`), ` when an agent finishes a task and to spawn new subagents from the tool output.`), React.createElement(MDXTag, {\n      name: \"h3\",\n      components: components\n    }, `Cost and Correctness`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `When a workflow is built and about to execute, `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), ` uses Claude Code's plan mode to let the user review the decomposed workflow.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"figure\",\n      components: components,\n      parentName: \"p\"\n    }, `\n    `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"figure\",\n      props: {\n        \"href\": \"/static/c21ae47c4250d9aabce17c1442837923/0ecc0/figure-2-review-charge-plan.webp\"\n      }\n    }, React.createElement(MDXTag, {\n      name: \"picture\",\n      components: components,\n      parentName: \"a\"\n    }, `\n  `, React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c21ae47c4250d9aabce17c1442837923/0cc25/figure-2-review-charge-plan.png\",\n        \"srcSet\": [\"/static/c21ae47c4250d9aabce17c1442837923/5116e/figure-2-review-charge-plan.png 178w\", \"/static/c21ae47c4250d9aabce17c1442837923/92f55/figure-2-review-charge-plan.png 356w\", \"/static/c21ae47c4250d9aabce17c1442837923/0cc25/figure-2-review-charge-plan.png 712w\", \"/static/c21ae47c4250d9aabce17c1442837923/7ae06/figure-2-review-charge-plan.png 1068w\", \"/static/c21ae47c4250d9aabce17c1442837923/eee47/figure-2-review-charge-plan.png 1424w\", \"/static/c21ae47c4250d9aabce17c1442837923/38407/figure-2-review-charge-plan.png 2136w\", \"/static/c21ae47c4250d9aabce17c1442837923/e2825/figure-2-review-charge-plan.png 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c21ae47c4250d9aabce17c1442837923/690c8/figure-2-review-charge-plan.webp\",\n        \"srcSet\": [\"/static/c21ae47c4250d9aabce17c1442837923/25c8a/figure-2-review-charge-plan.webp 178w\", \"/static/c21ae47c4250d9aabce17c1442837923/60698/figure-2-review-charge-plan.webp 356w\", \"/static/c21ae47c4250d9aabce17c1442837923/690c8/figure-2-review-charge-plan.webp 712w\", \"/static/c21ae47c4250d9aabce17c1442837923/d7e52/figure-2-review-charge-plan.webp 1068w\", \"/static/c21ae47c4250d9aabce17c1442837923/456ef/figure-2-review-charge-plan.webp 1424w\", \"/static/c21ae47c4250d9aabce17c1442837923/2a654/figure-2-review-charge-plan.webp 2136w\", \"/static/c21ae47c4250d9aabce17c1442837923/0ecc0/figure-2-review-charge-plan.webp 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), `\n  `, React.createElement(MDXTag, {\n      name: \"img\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c21ae47c4250d9aabce17c1442837923/0ecc0/figure-2-review-charge-plan.webp\",\n        \"alt\": \"A screenshot of Claude Code plan mode in a Zellij terminal showing a charge workflow review before execution. Task semantics define three tasks—discover-new-plugins, generate-plugin-webpage (per plugin), and verify-and-report—with inputs, outputs, and npm commands. A bordered ASCII flowchart shows the dependency chain from discovery through generation to build verification.\",\n        \"title\": \"Review Workflow Plan Created by Charge\",\n        \"width\": 712,\n        \"height\": 445,\n        \"loading\": \"lazy\"\n      }\n    }))), `\n    `, React.createElement(MDXTag, {\n      name: \"figcaption\",\n      components: components,\n      parentName: \"figure\"\n    }, `\n        `, React.createElement(MDXTag, {\n      name: \"span\",\n      components: components,\n      parentName: \"figcaption\"\n    }, `\n            Review Workflow Plan Created by Charge\n        `), `\n    `))), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `This review step matters because dynamically generating subagents from tasks is billed as output tokens—the main agent outputs the spawning prompts for those subagents—which is far more expensive than input tokens. You can read the design as \"progressive disclosure\" in token consumption.`), React.createElement(MDXTag, {\n      name: \"h3\",\n      components: components\n    }, `Control and Steering`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Here `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), ` has another edge over Claude Code's dynamic workflows. Because workflow orchestration in `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), ` stays in the main agent, you can interrupt and steer at any point during execution.`), React.createElement(MDXTag, {\n      name: \"h2\",\n      components: components\n    }, `Why I Call It a False Need`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `After using `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), ` for a while, I found that the most reused workflows in the real world `, React.createElement(MDXTag, {\n      name: \"strong\",\n      components: components,\n      parentName: \"p\"\n    }, `are better represented with deterministic algorithms`), `. That work belongs in code, not prompts.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Introduce an LLM only when creativity is required. In reusable workflows, LLMs commonly appear in analysis tasks, diagnostic tasks, or \"code laundering\" tasks like laundering Bun from Zig to Rust, which Anthropic listed as a showcase of dynamic workflows. If you are creating something totally new, keeping the human in the loop and steering as you go is the right choice.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Even for analysis and diagnostic tasks, you can still write code to produce better-structured, more digestible tool outputs and to coalesce tool calls by inlining multiple tool calls in a script. That improves execution speed and reduces noise in context. These optimizations matter because they can improve workflow performance and the quality of results—and we care whether an analysis or diagnosis yields a feasible suggestion.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `On top of that, for tasks where feasibility matters, you can build upon an agent SDK like OpenCode SDK to introduce type safety in data transfer and in-process communication instead of inter-process tool calls. OpenCode SDK and OpenCode share the same session format. This means an OpenCode SDK session can be resumed in the OpenCode client. This interoperability introduces debuggability to an LLM-driven workflow—an overlooked gem in the agent ecosystem.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Research tasks are an exception. Research sits too far from actionable output; many judgments remain before you turn research into action. I think that is why Claude Code bundles a `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `/deep-research`), ` workflow.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `Here is a decision tree to help you pick the right tool:`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"figure\",\n      components: components,\n      parentName: \"p\"\n    }, `\n    `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"figure\",\n      props: {\n        \"href\": \"/static/70a61f60ab52cdcd068ea542e95de912/08fa1/figure-3-decision-tree.webp\"\n      }\n    }, React.createElement(MDXTag, {\n      name: \"picture\",\n      components: components,\n      parentName: \"a\"\n    }, `\n  `, React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/70a61f60ab52cdcd068ea542e95de912/0cc25/figure-3-decision-tree.png\",\n        \"srcSet\": [\"/static/70a61f60ab52cdcd068ea542e95de912/5116e/figure-3-decision-tree.png 178w\", \"/static/70a61f60ab52cdcd068ea542e95de912/92f55/figure-3-decision-tree.png 356w\", \"/static/70a61f60ab52cdcd068ea542e95de912/0cc25/figure-3-decision-tree.png 712w\", \"/static/70a61f60ab52cdcd068ea542e95de912/7ae06/figure-3-decision-tree.png 1068w\", \"/static/70a61f60ab52cdcd068ea542e95de912/eee47/figure-3-decision-tree.png 1424w\", \"/static/70a61f60ab52cdcd068ea542e95de912/38407/figure-3-decision-tree.png 2136w\", \"/static/70a61f60ab52cdcd068ea542e95de912/c461f/figure-3-decision-tree.png 4309w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/70a61f60ab52cdcd068ea542e95de912/690c8/figure-3-decision-tree.webp\",\n        \"srcSet\": [\"/static/70a61f60ab52cdcd068ea542e95de912/25c8a/figure-3-decision-tree.webp 178w\", \"/static/70a61f60ab52cdcd068ea542e95de912/60698/figure-3-decision-tree.webp 356w\", \"/static/70a61f60ab52cdcd068ea542e95de912/690c8/figure-3-decision-tree.webp 712w\", \"/static/70a61f60ab52cdcd068ea542e95de912/d7e52/figure-3-decision-tree.webp 1068w\", \"/static/70a61f60ab52cdcd068ea542e95de912/456ef/figure-3-decision-tree.webp 1424w\", \"/static/70a61f60ab52cdcd068ea542e95de912/2a654/figure-3-decision-tree.webp 2136w\", \"/static/70a61f60ab52cdcd068ea542e95de912/08fa1/figure-3-decision-tree.webp 4309w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), `\n  `, React.createElement(MDXTag, {\n      name: \"img\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/70a61f60ab52cdcd068ea542e95de912/08fa1/figure-3-decision-tree.webp\",\n        \"alt\": \"A vertical decision tree with four yes-or-no questions. \",\n        \"create\": \"\",\n        \"something\": \"\",\n        \"totally\": \"\",\n        \"new?\\\"\": \"\",\n        \"—\": \"\",\n        \"yes\": \"\",\n        \"leads\": \"\",\n        \"to\": \"\",\n        \"\\\"keep\": \"\",\n        \"human\": \"\",\n        \"in\": \"\",\n        \"the\": \"\",\n        \"loop\\\";\": \"\",\n        \"no\": \"\",\n        \"continues\": \"\",\n        \"\\\"is\": \"\",\n        \"creativity\": \"\",\n        \"required?\\\"\": \"\",\n        \"\\\"write\": \"\",\n        \"code\\\";\": \"\",\n        \"\\\"feasibility\": \"\",\n        \"matters?\\\"\": \"\",\n        \"\\\"claude\": \"\",\n        \"code\": \"\",\n        \"dynamic\": \"\",\n        \"workflows\\\";\": \"\",\n        \"\\\"cost\": \"\",\n        \"\\\"opencode\": \"\",\n        \"sdk\": \"\",\n        \"+\": \"\",\n        \"affordable\": \"\",\n        \"models\\\"\": \"\",\n        \"(opencode\": \"\",\n        \"and\": \"\",\n        \"deepseek\": \"\",\n        \"logos);\": \"\",\n        \"agent\": \"\",\n        \"sdk.\\\"\\\"\": \"\",\n        \"title\": \"Decision Tree\",\n        \"width\": 712,\n        \"height\": 1002,\n        \"loading\": \"lazy\"\n      }\n    }))), `\n    `, React.createElement(MDXTag, {\n      name: \"figcaption\",\n      components: components,\n      parentName: \"figure\"\n    }, `\n        `, React.createElement(MDXTag, {\n      name: \"span\",\n      components: components,\n      parentName: \"figcaption\"\n    }, `\n            Decision Tree\n        `), `\n    `))), React.createElement(MDXTag, {\n      name: \"h2\",\n      components: components\n    }, `Where I Landed`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `With that decision tree in hand, it comes down to:`), React.createElement(MDXTag, {\n      name: \"ul\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ul\"\n    }, `To create something totally new, we still need to keep the human in the loop to steer the agent as we go.`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ul\"\n    }, `To perform reusable workflows, we can choose more economical options: build with OpenCode and an affordable model, or write code that only costs CPU time, not tokens.`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `The first item is the bottleneck in my daily use of Claude Code.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `I then created `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `amplify`), ` in Feb, 2026 by borrowing the following design elements from `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `charge`), `:`), React.createElement(MDXTag, {\n      name: \"ol\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Task dependency graph and per-task subagent.`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `The plan-based task graph review.`), React.createElement(MDXTag, {\n      name: \"li\",\n      components: components,\n      parentName: \"ol\"\n    }, `Execute in the main agent to allow steering as you go.`)), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"figure\",\n      components: components,\n      parentName: \"p\"\n    }, `\n    `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"figure\",\n      props: {\n        \"href\": \"/static/c05756e61db1e1ef2598d5c16332674f/0ecc0/figure-4-review-amplify-plan.webp\"\n      }\n    }, React.createElement(MDXTag, {\n      name: \"picture\",\n      components: components,\n      parentName: \"a\"\n    }, `\n  `, React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c05756e61db1e1ef2598d5c16332674f/0cc25/figure-4-review-amplify-plan.png\",\n        \"srcSet\": [\"/static/c05756e61db1e1ef2598d5c16332674f/5116e/figure-4-review-amplify-plan.png 178w\", \"/static/c05756e61db1e1ef2598d5c16332674f/92f55/figure-4-review-amplify-plan.png 356w\", \"/static/c05756e61db1e1ef2598d5c16332674f/0cc25/figure-4-review-amplify-plan.png 712w\", \"/static/c05756e61db1e1ef2598d5c16332674f/7ae06/figure-4-review-amplify-plan.png 1068w\", \"/static/c05756e61db1e1ef2598d5c16332674f/eee47/figure-4-review-amplify-plan.png 1424w\", \"/static/c05756e61db1e1ef2598d5c16332674f/38407/figure-4-review-amplify-plan.png 2136w\", \"/static/c05756e61db1e1ef2598d5c16332674f/e2825/figure-4-review-amplify-plan.png 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c05756e61db1e1ef2598d5c16332674f/690c8/figure-4-review-amplify-plan.webp\",\n        \"srcSet\": [\"/static/c05756e61db1e1ef2598d5c16332674f/25c8a/figure-4-review-amplify-plan.webp 178w\", \"/static/c05756e61db1e1ef2598d5c16332674f/60698/figure-4-review-amplify-plan.webp 356w\", \"/static/c05756e61db1e1ef2598d5c16332674f/690c8/figure-4-review-amplify-plan.webp 712w\", \"/static/c05756e61db1e1ef2598d5c16332674f/d7e52/figure-4-review-amplify-plan.webp 1068w\", \"/static/c05756e61db1e1ef2598d5c16332674f/456ef/figure-4-review-amplify-plan.webp 1424w\", \"/static/c05756e61db1e1ef2598d5c16332674f/2a654/figure-4-review-amplify-plan.webp 2136w\", \"/static/c05756e61db1e1ef2598d5c16332674f/0ecc0/figure-4-review-amplify-plan.webp 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), `\n  `, React.createElement(MDXTag, {\n      name: \"img\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/c05756e61db1e1ef2598d5c16332674f/0ecc0/figure-4-review-amplify-plan.webp\",\n        \"alt\": \"A screenshot of Claude Code plan mode in a Zellij terminal showing an amplify workflow plan with six tasks: authorize DeepSeek API access (marked as a human gate), generalize DeepSeek generation in generate-content.ts, refresh plugin JSON on skill-list change, retire using-skills from the presentation, run npm run generate:all, and verify the build. An ASCII flowchart shows parallel tracks converging on content generation, then verification; a human verification gate explains paid API credit use.\",\n        \"title\": \"Review Workflow Plan Created by Amplify\",\n        \"width\": 712,\n        \"height\": 445,\n        \"loading\": \"lazy\"\n      }\n    }))), `\n    `, React.createElement(MDXTag, {\n      name: \"figcaption\",\n      components: components,\n      parentName: \"figure\"\n    }, `\n        `, React.createElement(MDXTag, {\n      name: \"span\",\n      components: components,\n      parentName: \"figcaption\"\n    }, `\n            Review Workflow Plan Created by Amplify\n        `), `\n    `))), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, `To prevent Claude Code from ending prematurely, `, React.createElement(MDXTag, {\n      name: \"inlineCode\",\n      components: components,\n      parentName: \"p\"\n    }, `amplify`), ` also introduces audit subagents that check whether the planned work was actually completed.`), React.createElement(MDXTag, {\n      name: \"p\",\n      components: components\n    }, React.createElement(MDXTag, {\n      name: \"figure\",\n      components: components,\n      parentName: \"p\"\n    }, `\n    `, React.createElement(MDXTag, {\n      name: \"a\",\n      components: components,\n      parentName: \"figure\",\n      props: {\n        \"href\": \"/static/9e693e09e4fbafb38effa982375eb2d3/0ecc0/figure-5-audit-amplify-plan.webp\"\n      }\n    }, React.createElement(MDXTag, {\n      name: \"picture\",\n      components: components,\n      parentName: \"a\"\n    }, `\n  `, React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/9e693e09e4fbafb38effa982375eb2d3/0cc25/figure-5-audit-amplify-plan.png\",\n        \"srcSet\": [\"/static/9e693e09e4fbafb38effa982375eb2d3/5116e/figure-5-audit-amplify-plan.png 178w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/92f55/figure-5-audit-amplify-plan.png 356w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/0cc25/figure-5-audit-amplify-plan.png 712w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/7ae06/figure-5-audit-amplify-plan.png 1068w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/eee47/figure-5-audit-amplify-plan.png 1424w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/38407/figure-5-audit-amplify-plan.png 2136w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/e2825/figure-5-audit-amplify-plan.png 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), React.createElement(MDXTag, {\n      name: \"source\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/9e693e09e4fbafb38effa982375eb2d3/690c8/figure-5-audit-amplify-plan.webp\",\n        \"srcSet\": [\"/static/9e693e09e4fbafb38effa982375eb2d3/25c8a/figure-5-audit-amplify-plan.webp 178w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/60698/figure-5-audit-amplify-plan.webp 356w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/690c8/figure-5-audit-amplify-plan.webp 712w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/d7e52/figure-5-audit-amplify-plan.webp 1068w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/456ef/figure-5-audit-amplify-plan.webp 1424w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/2a654/figure-5-audit-amplify-plan.webp 2136w\", \"/static/9e693e09e4fbafb38effa982375eb2d3/0ecc0/figure-5-audit-amplify-plan.webp 2880w\"],\n        \"sizes\": \"(max-width: 712px) 100vw, 712px\"\n      }\n    }), `\n  `, React.createElement(MDXTag, {\n      name: \"img\",\n      components: components,\n      parentName: \"picture\",\n      props: {\n        \"src\": \"/static/9e693e09e4fbafb38effa982375eb2d3/0ecc0/figure-5-audit-amplify-plan.webp\",\n        \"alt\": \"A screenshot of Claude Code in a Zellij terminal after amplify audit subagents finish. Three explore agents report done status with token counts; a consolidated audit summary table lists six tasks (human gate, code edits, content edit, generate:all, and build verification) as Done with file-level evidence; the Issues Found section reports none.\",\n        \"title\": \"Amplify Audit Summary\",\n        \"width\": 712,\n        \"height\": 445,\n        \"loading\": \"lazy\"\n      }\n    }))), `\n    `, React.createElement(MDXTag, {\n      name: \"figcaption\",\n      components: components,\n      parentName: \"figure\"\n    }, `\n        `, React.createElement(MDXTag, {\n      name: \"span\",\n      components: components,\n      parentName: \"figcaption\"\n    }, `\n            Amplify Audit Summary\n        `), `\n    `))));\n  }\n\n}\nMDXContent.isMDXComponent = true;","scope":""},"headings":[{"value":"Why I Built Charge?","depth":2},{"value":"Implementation Details and Design Philosophy","depth":2},{"value":"Task Decomposition and Dependencies","depth":3},{"value":"The Execution Engine","depth":3},{"value":"Cost and Correctness","depth":3},{"value":"Control and Steering","depth":3},{"value":"Why I Call It a False Need","depth":2},{"value":"Where I Landed","depth":2}]}}},"earlierPostExcerpt":{"slug":"/post/2026/05/has-claude-code-fallen-behind-codex-dbad","title":"Has Claude Code Fallen Behind Codex?","subtitle":"","createdTime":"2026-05-26T00:00:00.000Z","tags":["AI","Agent"],"category":"Programming","file":{"childMdx":{"excerpt":"If you follow the coding-agent race, you've heard the story: Codex surged this year — faster, cheaper, more autonomous, and neck-and-neck with Claude Code on the benchmarks. Plenty of developers reach for it first now. On speed and cost, I get it — until I tried to move one of my own agent skills…"}}},"laterPostExcerpt":null},"pageContext":{"postId":"4af71725-5e7b-5cf1-8ed3-8635612d8702","earlierPostId":"ce20db9d-d49d-5a2c-abd1-1642fa5a6233","laterPostId":null}}