AI Coding Agent Execution Modes Explained: A Complete Breakdown of Standard Mode

    This article explains how AI coding agents use execution modes, also called presets, to assemble the right persona, tools, prompt sections, and always-on capabilities for each session. Using Standard Mode as the example, it breaks down the assembly file, key runtime rules such as process-level mounting, per-session state isolation, and mode locking, and compares Standard, Code, Minimal, and Cordis modes. Readers will learn how to choose the right mode and avoid common mistakes.

    AI Coding Agent Execution Modes Explained: A Complete Breakdown of Standard Mode

    1. Why Execution Modes Exist

    In enterprise development, AI coding tools have evolved from code snippet completion into coding agents capable of executing multi-step operations. This creates a core challenge: the same model and runtime must handle very different task shapes. Sometimes you need minimal, predictable shell and file editing capabilities. Sometimes the model needs to write a program to perform complex transformations in batches. Sometimes an agent even needs to construct another agent.

    Cramming all of these differences into a single prompt and tool list has three direct consequences: irrelevant rules crowd out the context, the model faces selection ambiguity among too many tools, and unpredictable behavior makes review difficult.

    The industry commonly addresses this with a “Preset + Assembly” approach: a configuration file declares the persona, tools, prompt sections, and always-on capabilities for a session, and the runtime assembles them per session. This article uses Standard Mode as a sample to fully break down this mechanism.

    2. Modes as Presets: Assembly and Lifecycle

    A mode is essentially a declarative assembly description, typically stored in a dedicated directory and expressed in a YAML assembly file with four types of information:

    • Persona: The first line of the system prompt, which defines the agent’s self-positioning.
    • Tool list: The set of tools the model can call in the session, which directly determines its capability ceiling.
    • Prompt sections: Such as constraint rules for plan mode and code style conventions.
    • Always-on capabilities: Mechanisms such as context compaction and skill discovery that are unrelated to a specific task but remain in effect long-term.

    There are four key runtime rules. Understanding them avoids most usage confusion.

    First, assembly is mounted only once per process. The assembly result lives in a persistent scope. All sessions opened under the same mode share this single mount, avoiding the startup overhead and memory waste of repeated construction.

    Second, state is stored under keys per session and per agent. What is shared is the “capability definition,” not “runtime data.” State such as context, todos, and goal progress is isolated by session or sub-agent key, so parallel sessions do not interfere with each other. This is the essence of the “shared assembly + independent state” design: capability reuse with data isolation.

    Third, a session locks its mode once it produces content. Because the mode determines the tool schemas and prompt sections the model sees, switching midway is equivalent to changing the rules within existing context, and the historical reasoning chain will conflict with the new rules. Switching is therefore only allowed in a blank session, and the gateway side directly returns an error code along the lines of “preset locked.” The practical recommendation is to decide the mode when creating a session, then start asking questions.

    Fourth, the default mode comes from user-side configuration. The local settings file usually contains a key-value pair like agent-presets.default: standard, which loads Standard Mode when nothing is explicitly specified. This is also why most developers “select nothing” but actually run the most fully featured tier.

    3. Capability Tiers of the Four Modes

    Mode Identifier Order Positioning
    Standard Mode standard 1 Fully featured coding agent, the default tier
    Code Mode code 2 All Standard Mode capabilities plus a code-execution SDK: the model writes a program to complete multiple steps in a single round trip
    Minimal Mode minimal 3 Fixed prompt, only a persistent shell and a string-replacement editor, no compaction and no skill discovery
    Cordis Mode cordis 4 All Standard Mode capabilities plus an advanced toolset that can read and write its own runtime, used to let an agent construct new agents

    The tiering logic is clear. Minimal Mode trades capability for determinism and low overhead, making it suitable for regression testing and controlled batch processing. Code Mode replaces “multiple tool round trips” with “writing a program,” significantly reducing latency and error accumulation caused by round trips. Cordis Mode turns the runtime itself into an editable object, which is a metaprogramming scenario. Standard Mode is the most broadly applicable general-purpose tier.

    4. Standard Mode Assembly Breakdown

    The official description of Standard Mode can be summarized as a fully featured coding agent supporting file editing, shell execution, file and web search, a skill system, plans, goals, sub-agents, and workflows. Its assembly file typically contains about eleven groups of capabilities, expanded below by importance.

    4.1 Identity Layer

    1. persona: "You are a coding agent powered by the {{model}} model. Working directory: {{cwd}}."
    2. agent-instructions:
    3. maxBytes: 65536

    The model name and working directory in the persona are template variables resolved per session, so the opening line of different sessions shows the actual model each session is routed to and the real workspace path, rather than hard-coded strings. maxBytes limits the read size of workspace instruction files (64KB here). This is the channel through which convention files in the project root (such as team standards and architecture notes) enter the model’s context.

    Engineering recommendation: maintain instruction files as “versionable prompt engineering assets,” keep them within tens of KB, and organize them in layers of “global standards / module standards / temporary conventions” to avoid flooding the context with excessive text at once.

    4.2 Tool Layer

    The Standard Mode toolset covers four types of actions: reading and editing files, executing shell commands, searching local files and external web pages, and invoking skills and workflows. The granularity of tool schema design directly determines the model’s selection accuracy. Common best practices include single-verb tools (one tool does one thing), strongly typed parameters, and recoverable error messages (returning actionable correction suggestions rather than stack traces).

    4.3 Prompt Section Layer

    In addition to the persona, the assembly file injects rule sections as needed, typically plan mode constraints (produce a plan before acting), verification requirements (run the build and tests after changes), and output format conventions. Sections must remain conflict-free, otherwise the model will waver between rules.

    4.4 Always-On Capability Layer

    Context compaction automatically summarizes history during long tasks to keep the window from overflowing. Skill discovery identifies reusable project-level capabilities from the workspace and registers them as callable tools. Both are task-independent, so they remain in effect across all sessions, and they are the key difference between Standard Mode and Minimal Mode.

    5. Selection Advice and Common Mistakes

    • Mistake 1: Switching modes midway. Switching after content has been produced is rejected by the gateway. The correct approach is to create a new session.
    • Mistake 2: Assuming the default tier is optimal. When strong determinism or low overhead is needed, Minimal Mode is more suitable.
    • Mistake 3: Treating state as shared. Assembly is shared and state is isolated. Do not assume parallel sessions can see each other’s context.
    • Selection rule of thumb: choose Standard for general development; Code for high-frequency multi-step operations; Minimal for controlled execution; Cordis when self-extension is needed.

    6. Conclusion

    Understanding the main thread of “preset, assembly, lock, isolation” turns an AI coding agent from a black box into a designable engineering component: the mode determines the capability boundary, assembly determines the cost structure, and per-key state determines concurrency safety. In development practice on cloud platforms such as Baidu AI Cloud, bringing prompts and tool lists under version control and fixing the mode by task shape is an effective path to improving the predictability of agent behavior.