AI Agent Collaboration: Building an Operating System Prototype in Eight Days
This article examines how AI coding agents moved from local code completion to delivering usable software, including an operating system prototype built by over a thousand sub-agents in about eight days. It explains the four engineering conditions that make system-level agent work feasible, a reusable five-layer task decomposition method with acceptance gates, how to turn personal workflows into executable specs while keeping human approval checkpoints, the cloud infrastructure needed for long-running tasks, and the metrics and capability limits teams should use before moving agents into production.
From Code Completion to Delivering Usable Software
Over the past two years, the value of AI coding tools has mostly been local: completing a function, explaining an error, generating a batch of tests. Recent public practice has stretched the time scale to days or even hours. One content creator used a newer AI coding tool to rearrange controls and keyboard shortcuts around their own habits and produced a custom image-processing app where import, scaling, layers, and text all work; the team’s recent cover image came out of it. They then built a video editing tool that connects a model to an internal workflow, where changes are requested in natural language inside the app itself. A tech media team also consolidated the features they use most in professional editing software into an in-house tool and connected an agent to process internal demo videos.
What these cases share is not visual similarity but the ability to take over work that happens every day. The typical failure mode of earlier attempts was screenshot-level similarity with interaction-level failure: buttons that do nothing, missing critical paths, unimplemented exception branches. The standard for judging whether an agent’s output is usable should shift from “looks finished” to “can repeatedly complete a real task.”
Why System-Level Tasks Suddenly Became Feasible
An operating system prototype that boots on a laptop includes a kernel, hardware drivers for disk and keyboard, file storage, a window system, a login screen, and an installer, with model capabilities wired in. More than a thousand sub-agents wrote, tested, and reviewed this work in roughly eight days. A similar shape appeared in mathematics: about a thousand agents spent roughly thirty hours converting existing human proofs into machine-verifiable proof forms that a checker can validate step by step.
Feasibility comes from four engineering conditions maturing at the same time:
- Long context and stable instruction following. Constraints in system-level code span files; change one interface and every caller turns red. The model must keep naming, error-handling style, and module boundaries consistent across hundreds of thousands of tokens.
- A closed tool-execution loop. Reading and writing files, running builds, executing tests, and inspecting logs form a loop that lets the model discover “this does not compile” and fix it, instead of leaving the error to a human.
- Sub-agent parallelism with result aggregation. Splitting a large task into non-conflicting subtasks, running them in parallel, and merging and reviewing them at the top level is the key to compressing total time.
- Verifiable acceptance criteria. Formal proofs suit agents because a checker decides correctness; software engineering needs tests and builds to play the same role.
Handing Large Tasks to Agents: A Reusable Decomposition Method
Do not start by saying “write an operating system.” The effective approach is layered:
- Layer 0: Define a minimal runnable goal (boots, prints, reads one file).
- Layer 1: Cut vertical slices, each usable end to end (boot → memory and interrupts → file system → input devices → windows and login → installer).
- Layer 2: Hard-code an acceptance command for each slice, for example:
# The build must pass with zero warningsmake -j"$(nproc)" 2>&1 | tee build.log# Smoke test: run a fixed script in an isolated VM after boot./scripts/smoke.sh --timeout 120# Coverage and static checks as regression gates./scripts/check.sh --min-coverage 60
- Layer 3: Dispatch subtasks in parallel that never touch the same directory, with the agreement “whoever owns a directory owns it, and whoever changes an interface broadcasts it.”
- Layer 4: The merge phase does only three things: resolve conflicts, run the full regression, and fill in documentation and change records.
A schematic orchestration skeleton (pseudocode, illustrating control flow rather than concrete interfaces):
plan = decompose(goal, into="vertical_slices")for slice in plan:assign(owner_dir=slice.path, acceptance=slice.tests)results = run_in_parallel(plan, max_workers=64, retry=2)merged = merge_and_regress(results, gate=["build", "smoke", "lint"])
Three pitfalls are easiest to hit in practice: subtask boundaries that do not match directory boundaries and overwrite each other; missing acceptance criteria that produce a false sense of completion; and context blown out by irrelevant logs, causing quality to drop sharply later on. The corresponding fixes are ownership agreements, tests first, and structured log trimming before feeding logs back in.
Human-Machine Division of Labor: Turning Work Habits into Executable Specs
The reason creators and editors can build tools that fit their hands is that they know what they repeat every day. This points to a more general method: make implicit habits explicit as a spec. An actionable checklist includes the order of common operations, keyboard shortcuts that must be preserved, acceptable defaults, and destructive actions that must never happen (for example, overwriting an original file). Write these into a one-page spec and have the agent implement to it; rework drops significantly.
Human gates must remain in place: actions involving deletion, overwriting, external release, billing, and permission changes should be confirmed by a person or routed through an approval flow; generated code needs review and testing; critical paths keep a rollback-capable version.
Deployment Architecture: Hosting Long-Running Tasks in the Cloud
Running an agent continuously for dozens of hours depends more on infrastructure than on the model. General capabilities divide by responsibility:
- Container platform: an isolated, rebuildable execution environment for each sub-agent, destroyed when the task ends.
- Object storage: code snapshots, build artifacts, and datasets, with native versioning and lifecycle management.
- Message queue: distributing subtasks and collecting results, smoothing peaks and supporting retry of failed work.
- Logging, monitoring, and alerting: turning build failures, test flakiness, and stalled tasks into observable metrics and alerts.
- Identity and permissions: least-privilege grants, with write and high-risk operations controlled at separate levels.
- Secrets and configuration management: credentials never in the code repository, isolated per environment.
For cost control, layer the context: keep always-resident architecture constraints and interface contracts lean, retrieve historical logs on demand instead of carrying them in full, use elastic resources for parallel verification tasks, and place long-tail tasks in off-peak windows.
Acceptance and Metrics: Do Not Measure Lines Generated
Four dimensions are recommended: task completion rate (judged by acceptance scripts), first-pass rate (the share that passes testing without human intervention), regression stability (whether repeated runs produce consistent results), and the share of time spent on human intervention. Add two on the security side: the interception rate for high-risk operations and a check for sensitive information leaking into artifacts. Only when these metrics are stable can agents be considered for daily production workflows.
Capability Limits and Risks
The current form still has clear shortcomings: large-scale cross-module refactoring easily introduces hidden regressions; adaptation to obscure hardware and proprietary protocols depends on a runnable environment; long-running tasks may drift from the goal in later stages and need periodic realignment; and the licensing and provenance of generated code must be traceable. The reasonable positioning is “high-intensity executor plus a human who writes specs and makes decisions,” not an unattended black box.
Conclusion
From image and video tools to a bootable system prototype, the core change is not that the model “writes code better” but that the engineering paradigm shifted toward decomposable, verifiable, parallel, and rollback-capable work. A team building similar capabilities on Baidu AI Cloud should concentrate investment in three places: task orchestration, the acceptance system, and observability. Make these three solid, and long-running agents will move from demonstration to reusable productivity.
