Claude Code Workflow in Practice: Hundreds of Agents Automatically Migrating PHP to Golang

Claude Code Workflow orchestrates 100+ Agents to automatically migrate a PHP project to Golang in 14 hours.
This article explores Claude Code's Workflow feature through a real-world PHP-to-Golang migration that ran continuously for 14 hours using over 100 Agents. It explains how Workflow automatically plans tasks, defines specialized Agents, orchestrates execution, and delivers results without manual intervention — representing a paradigm shift from conversational AI coding to autonomous engineering orchestration.
What is Claude Code Workflow
As AI programming tools grow increasingly powerful, Claude Code's Workflow feature is redefining our understanding of automated programming. Simply put, Workflow is a long-running task orchestration mechanism — it automatically creates scripts, defines all the Agents and their tasks within those scripts, then automatically orchestrates execution until all your work is complete.
The concept of Long-running Task Orchestration originates from workflow engines in distributed systems, such as Apache Airflow and Temporal. In traditional scenarios, developers need to manually write DAGs (Directed Acyclic Graphs) to define dependency relationships between tasks. In the AI programming domain, this concept has been redefined: large language models can autonomously analyze task structures and generate execution plans, combining the reliability of traditional workflow engines with the intelligent planning capabilities of LLMs, dramatically lowering the barrier to complex task automation.
Unlike ordinary single-turn conversational programming, Workflow's core advantage lies in automated orchestration. It doesn't require you to manually direct each step — instead, it plans the steps itself, defines Agents, determines the calling sequence, and ultimately delivers complete results.

Real-World Scenario: PHP Migration to Golang
A Typical Large-Scale Migration Task
As demonstrated by a Bilibili content creator, they used Claude Code Workflow to execute a classic project migration task: completely migrating a PHP project to Golang. This type of tech stack migration is extremely common in enterprises, but traditional approaches often require weeks or even months of team effort.
PHP-to-Golang tech stack migration is widely recognized as a high-difficulty engineering task. The two languages have fundamental differences in type systems, concurrency models, error handling, and package management — PHP is a dynamically-typed, interpreted language that relies on Composer for package management and typically pairs with frameworks like Laravel or Symfony; while Golang is a statically-typed, compiled language with a unique goroutine concurrency model and explicit error handling mechanism (no try-catch, instead using multiple return values to pass errors). Migration involves not just syntax-level conversion, but also redesigning data structures, rewriting the ORM layer (e.g., migrating from Eloquent to GORM), adapting to different web frameworks (e.g., from Laravel to Gin or Echo), and handling PHP-specific features like magic methods, dynamic properties, and weak type comparisons. This level of complexity makes it the perfect testing ground for Workflow's multi-Agent collaborative capabilities.

Workflow's Automated Execution Process
After you issue the migration command to Claude Code, Workflow automatically completes the following:
- Plans all steps: Analyzes the source project structure and breaks down the migration task into executable subtasks
- Defines all Agents: Assigns specialized Agents to each subtask with clear responsibility boundaries
- Determines execution order: Decides which Agent executes first, which follows, and the dependency relationships between them
- Automatically orchestrates execution: No manual intervention needed — Agents coordinate automatically and invoke as needed
- Quality assurance and delivery: Ensures completeness and correctness of migration results
In the multi-Agent collaborative architecture, each Agent takes on a specialized role. Typical Agent division of labor might include: a Code Analysis Agent (responsible for parsing the PHP source code's AST structure and business logic), an Architecture Design Agent (responsible for planning the Golang project's directory structure and module organization), a Code Generation Agent (responsible for translating PHP logic into idiomatic Go code), a Dependency Handling Agent (responsible for mapping Composer dependencies to Go modules), a Testing Agent (responsible for generating corresponding unit tests and integration tests), and a Quality Review Agent (responsible for code review, lint checking, and fixes). These Agents coordinate through shared context and message passing, forming an organic collaborative network.

All planning, Agent definitions, execution strategies, and quality assurance plans are written into automatically generated scripts, achieving true end-to-end automation.
Running for 14 Hours: Token Consumption and Cost Analysis
Impressive Runtime and Resource Consumption
In the demonstration, this Workflow task ran continuously for 14 hours and invoked over a hundred Agents to collaboratively complete the migration work. This number fully demonstrates Workflow's capability for handling complex engineering tasks, but also exposes a practical concern — Token consumption.

The content creator couldn't help but joke: "If this bill comes through, you'll need your housekeeper to help you sort through it tomorrow." For individual developers, the cost of running Workflow for extended periods definitely requires careful evaluation.
From an economic perspective, referencing Claude API pricing, Claude Sonnet series models are priced at approximately $3/million input Tokens and $15/million output Tokens. A Workflow running for 14 hours and invoking over a hundred Agents — where each Agent might process tens of thousands to hundreds of thousands of Tokens in context (including reading source code, generating target code, and performing multiple rounds of self-correction) — could consume millions or even tens of millions of Tokens total, corresponding to API costs potentially ranging from several hundred to over a thousand dollars. However, comparing this against the labor cost of a 3-5 person development team spending 2-4 weeks completing the same migration (calculated at senior developer salaries in China's tier-one cities, potentially costing 50,000-150,000 RMB), the AI solution's cost-effectiveness advantage becomes very clear — provided the migration quality meets expectations.
What Scenarios Are Best Suited for Workflow
Based on Token consumption considerations, Claude Code Workflow is best suited for the following scenarios:
- Enterprise-level project migrations: Companies have the budget, and the migration workload itself is substantial — converting to labor costs actually makes it more economical
- Teams with ample Token quotas: Development teams with enterprise subscriptions or sufficient API quotas
- One-time large-scale refactoring: Scenarios requiring systematic transformation of an entire codebase
For individual developers' routine small tasks, the regular Claude Code conversation mode is likely more economical and practical.
Workflow's Core Value: From Conversation to Orchestration
The Paradigm Shift of Orchestrated Programming
Traditional AI programming assistants are essentially "question-and-answer" conversational models — developers need to continuously issue commands, check results, then issue the next command. Workflow represents a paradigm shift — you only need to describe the final goal, and the AI completes the entire process from planning to execution on its own.
This Auto-Orchestration capability is Workflow's most critical technical highlight. It's worth noting that auto-orchestration is fundamentally different from traditional CI/CD pipelines. CI/CD consists of predefined, deterministic execution flows where each step's inputs and outputs are fixed, and exceptions can only be handled by preset rules or result in direct failure. AI-driven auto-orchestration is adaptive — the system can dynamically adjust subsequent steps based on intermediate results, autonomously analyze and fix compilation errors, and roll back to try alternative approaches when encountering architectural conflicts. This capability stems from the LLM's reasoning ability, enabling the system to handle non-deterministic engineering problems that traditional pipelines cannot address. Each Agent has clear responsibilities, and the system automatically decides which Agent to invoke next based on task progress, forming a complete, self-healing automated pipeline.
What This Means for Developers
The emergence of Workflow means AI programming tools are evolving from "coding assistance" to "autonomous engineering." For large, structured engineering tasks (such as tech stack migrations, code refactoring, multi-module development), this multi-Agent collaborative approach is likely to become the mainstream working model of the future.
From an industry trend perspective, this evolutionary path is consistent with the historical development of software engineering: from manual coding to IDE assistance, from IDE assistance to code completion (like GitHub Copilot), from code completion to conversational programming (like ChatGPT, Claude), and now to auto-orchestrated engineering. Each leap means the developer's role further transitions from "executor" toward "decision-maker" and "reviewer." Future senior developers may be more like "technical directors of AI engineering teams" — responsible for defining goals, reviewing output, and controlling quality, rather than personally writing every line of code.
Currently, Workflow still requires substantial Token support, and cost is a factor that cannot be ignored. But as model inference costs continue to decline (over the past two years, API prices for models of equivalent capability have dropped by over 90%), this model of "trading AI compute for human labor" will become increasingly economically viable.
Summary
Claude Code's Workflow feature demonstrates an important direction for AI programming: multi-Agent auto-orchestration for completing complex engineering tasks. It can automatically plan, automatically assign, and automatically execute, breaking down a massive PHP-to-Golang migration task into subtasks completed collaboratively by over a hundred Agents. While Token consumption is enormous, for enterprise-level migration projects, this is undoubtedly an efficient solution worth serious consideration. As AI inference costs continue to decline and model capabilities continue to improve, Workflow's auto-orchestration model is expected to evolve from "exclusive to high-end scenarios" to "a daily standard for developers," truly transforming how software engineering collaboration works.
Key Takeaways
Related articles

U.S. Congressional Candidate Responds to Controversy Over Deleting 3,500 Tweets: A Reflection on Rhetoric and Values
U.S. Congressional candidate Chevalier addresses the controversy over deleting 3,500 tweets, reflecting on past rhetoric and advocating for unifying, accessible, and kind political language.

Fable 5: What It Means to Be the First AI Model with a 'Magic Model Smell'
Fable 5 is hailed as the first AI model with a "magic model smell." This article explores what that means and the industry shift from benchmarks to experience quality.

Attachment Style Test: Are You Anxious, Avoidant, or Secure?
Explore the four attachment styles, learn why childhood trauma's impact may be overestimated, and discover practical tools like the CARP principle to shift from insecure to secure attachment.