A developer is architecting a GitHub Copilot agent that will refactor a large codebase. The agent must first determine what changes are needed before making any modifications. Which architectural approach best separates planning from execution?
Select an answer to reveal the explanation.
Short Explanation
Think of it like drawing blueprints before the crew pours concrete—you don't mix those two activities. Separating planning from execution gives you a checkpoint where humans or validators can review the plan before any irreversible work begins.
Full Explanation
Separating planning from execution is a core principle in agentic AI architecture. The planning phase produces an inspectable artifact—a structured document, JSON plan, or markdown checklist—that describes what the agent intends to do and why. The execution phase then consumes this artifact as its instruction set.
Designing the agent with a dedicated planning phase that produces a structured artifact, followed by a separate execution phase that consumes that artifact, is correct because this two-phase design creates a hard boundary between reasoning, which is cheap and reversible, and action, which may be expensive and irreversible. The planning artifact can be reviewed by humans, validated by automated checks, or stored for audit purposes. It also enables rollback: if execution goes wrong, the plan artifact shows exactly what was attempted.
Configuring the agent to interleave planning and execution steps so it can adapt in real time is wrong because interleaving planning and execution blurs the boundary between thought and action. The agent may start executing before its plan is complete, leading to inconsistent or conflicting changes.
Using a single agent prompt that includes both reasoning and action instructions to reduce latency is wrong because combining reasoning and action in a single prompt reduces auditability and makes it difficult to insert human review or automated validation between the two phases. It also makes debugging harder.
Allowing the agent to plan and execute autonomously without separation, since modern LLMs are capable of doing both simultaneously, is wrong because while modern LLMs can perform both tasks, allowing them to do so without architectural separation removes critical control points. Autonomous planning-and-execution without a checkpoint is a design that accepts unnecessary risk.