Three OpenAI Engineers Shipped A Million Lines. Your Ten-Hour Agent Run Starts Here

Three OpenAI engineers successfully developed a million-line codebase rapidly by using long-running AI agent sessions guided through a dynamic, evolving “progressive context shaping” approach that maintains and updates the agent’s current state rather than relying on static, overwhelming instructions. This method, supported by a practical toolkit of markdown files, enables effective management of complex, multi-session AI projects by combining automated execution with ongoing human oversight and decision-making.

The video discusses how three OpenAI engineers managed to ship an internal product with a codebase exceeding a million lines in about a tenth of the time it would have taken manually, without typing a single line of code themselves. This was achieved through long-running AI agent sessions that sometimes lasted over six hours. A key challenge they faced was managing the agent’s context effectively; a large, static instruction set overwhelmed the agent, turning into a “graveyard of stale rules.” Instead, they replaced this with a dynamic, concise “map” that pointed the agent to active execution plans, decision logs, design documents, and quality grades, allowing the agent to focus on the current state of the project rather than outdated instructions.

The video introduces the concept of “progressive context shaping,” a method where the initial prompt sets the project’s goals, boundaries, and first steps, but the agent’s instructions evolve as the project progresses. This approach allows the agent to adapt to new information, changing requirements, or discoveries made during the work, rather than rigidly following an outdated plan. The agent’s current state is maintained in a separate, easily updated file or record (such as a markdown file), which the agent reads and updates throughout the project. This method ensures that the agent’s work remains aligned with the latest human judgments and decisions, enabling long-running projects to be steered effectively over multiple sessions.

The video highlights similar practices used by other companies like Anthropic, which employs a progress file to track completed work, known limitations, and failed approaches, enabling fresh sessions to pick up where previous ones left off without repeating mistakes. This separation of stable instructions, current project state, resource maps, and history is crucial for managing complex, multi-session AI projects. The video emphasizes that history should be preserved but not confused with current instructions, allowing agents to “forget” outdated directions while retaining lessons learned.

The human role remains central in this process. While agents handle much of the execution, humans make key planning decisions, interpret new evidence, and steer the project by updating the current state. This division of labor allows humans to manage multiple agent sessions more effectively, using tools like project boards or tickets to track progress and direct work. The video advises starting projects with clear goals, relevant materials, boundaries, and checkpoints, then progressively updating the project state based on the agent’s outputs and new insights, rather than attempting to define every step upfront.

Finally, the video offers a practical starter kit consisting of four markdown files—readme, current state, context map, and decisions—that can be used across different AI platforms like Claude, Codex, or ordinary chat interfaces. This toolkit supports the progressive context shaping approach, enabling users to run long, complex agent projects without relying on a single, massive prompt or continuous session. The key takeaway is that effective long-running AI projects depend not on context window size alone but on actively managing and updating the agent’s current state to reflect evolving human judgment and project realities.