Understanding Coding Agent Preset Modes: A Complete Breakdown of Standard Mode

    This article explains how preset modes work in coding agents, moving from monolithic prompts to a declarative, composable runtime. It covers how presets are organized as directories with YAML assembly files, two core mechanisms (once-per-process mounting with per-session keying, and mode locking that only allows switching in empty sessions), and a comparison of four typical modes: standard, code, minimal, and cordis. The focus then shifts to standard mode, detailing its eleven capability groups across identity and instruction budget, platform-adaptive shell, file editing and retrieval, planning, goals and workflows, sub-agents and context compaction, and skill discovery. It closes with guidance on how the default mode is determined, selection recommendations, and common pitfalls.

    1. Why Preset Modes Exist: From Monolithic Prompts to a Composable Runtime

    In the engineering practice of coding agents, a long-standing tension exists: the more capable the model, the more tools and prompts can be attached, yet the context window, decision stability, and response latency remain finite resources. Stuffing every capability into the model at once tends to create three problems: tool selection difficulty (too many schemas lead to wrong calls), conflicting prompts (general rules stack on top of specialized ones), and wasted resources (capabilities the current task never uses still consume budget).

    The “agent preset” is the engineering answer to this tension. Its core idea is to abstract the runtime shape of a session into a declarative assembly file: instead of hard-coding a flow, you declare “who this session is, which tools it can use, which prompt sections it follows, and which capabilities stay resident.” The runtime reads this declaration, performs one assembly, and the session gains a definite “persona and toolbox.”

    This pattern-based approach aligns with the common industry practice of “layered configuration + dependency injection”: strip volatile policy out of code into configuration, and keep the stable execution kernel unchanged. The benefit is obvious—adding a new working shape requires no kernel changes, only a new assembly declaration.

    2. How Presets Are Organized: Directory as Unit, Declaration as Contract

    A preset usually maps to a standalone directory, with a single YAML assembly file inside as the sole entry point. This “directory as unit” organization brings two advantages: first, it is versionable—configuration evolves with the repository, can be reviewed, and can be rolled back; second, it is distributable—teams can share validated presets as assets.

    An assembly declaration generally covers four categories of elements:

    • Persona: the session identity and the opening definition of the system prompt, usually including runtime variables such as the model identifier and working directory.
    • Tool list: the explicit set of tools the model can see and call in this session; anything not declared is invisible.
    • Prompt sections: rule blocks split by capability domain, such as planning rules, retrieval conventions, and edit constraints.
    • Resident capabilities: background mechanisms that live as long as the session lifecycle, such as context compaction and skill discovery.

    A sample configuration structure is shown below (structure only, not a specific product interface):

    1. persona: "You are a coding agent powered by {{model}}, cwd={{cwd}}"
    2. agent-instructions:
    3. maxBytes: 65536
    4. tools:
    5. shell: platform-adaptive
    6. editor: enabled
    7. retrieval: [files, web]
    8. prompts:
    9. - planning-rules
    10. - edit-safety
    11. resident:
    12. - context-compaction
    13. - skill-discovery

    Here {{model}} and {{cwd}} are session-level variables: the same declaration resolves to different results in different sessions, which makes “one configuration, different persona instances” possible.

    3. Key Mechanism One: Mount Once per Process and Key by Session

    The most easily overlooked yet most performance- and correctness-critical design in preset implementation is the mount lifecycle. The better approach is: each preset completes its assembly mount only once per process, in a resident scope; all sessions that select the preset share this “read-only skeleton,” while session-private state (message history, tool output, plan progress) is stored keyed by session and sub-agent.

    This “shared skeleton + keyed state” model is equivalent to hoisting the immutable part to a process-level cache and pushing the mutable part down to session-level storage. It solves three things at once:

    1. Startup overhead: avoids re-parsing configuration and re-initializing the tool registry for every new session.
    2. Consistency: all sessions under the same preset see exactly the same tool schemas and prompts, which makes problem reproduction and side-by-side comparison easier.
    3. Isolation: keyed state ensures sessions do not cross-contaminate, and sub-agents will not read a parent session’s intermediate artifacts.

    Two engineering points need extra attention: first, resident mounting requires configuration to stay stable within the process lifecycle, and hot updates need explicit invalidation and rebuild; second, the keyed design must cover a reclamation policy for “temporary artifacts” to avoid state bloat in long-lived processes.

    4. Key Mechanism Two: Mode Locking and Switching in Empty Sessions

    The mode determines the tool schemas and prompt sections the model sees, which leads to an inevitable conclusion: once a session produces content, the mode is locked. The reason is not implementation laziness but a semantic consistency requirement—if the toolset and rules were swapped midway, the tool calls and results already present in the message history would no longer match the new schema, the model would face ambiguity between “past actions” and “current rules,” and the continuity of plan and goal would be broken.

    A reasonable design therefore allows switching only in empty sessions; when a non-empty session requests a switch, the gateway side rejects it directly and returns an explicit lock error identifier (semantically equivalent to agent-preset-locked). Practical advice for users:

    • Treat “mode selection” as an architectural decision at session creation, not a runtime tweak;
    • When multiple working shapes are needed, use a “main session + sub-agents with different modes” combination instead of repeatedly switching within one session;
    • Catch the lock error on the toolchain or upper-platform side and automatically guide the user to create a new session, rather than silently retrying.

    5. Positioning Comparison of Four Typical Modes

    Mode Identifier Order Positioning
    Standard mode standard 1 Full-featured coding agent, the default shape
    Code mode code 2 Programmatic orchestration layered on standard capabilities, completing multiple steps in one round trip
    Minimal mode minimal 3 Fixed prompt, two tools, no compaction and no skill discovery
    Cordis mode cordis 4 Runtime introspection and rewriting opened on top of standard capabilities, used to derive new agents

    The order value usually determines the display sequence in the selection list and the default fallback priority; it is an interaction-layer convention and does not affect capability boundaries.

    6. Standard Mode in Depth: The Assembly Logic of Eleven Capability Groups

    Standard mode is the default shape, and its official positioning can be summarized as: a complete coding agent supporting file editing, shell execution, file and web retrieval, skills, plans, goals, sub-agents, and workflows. Its assembly list can be grouped into eleven capabilities, expanded below by functional domain.

    6.1 Identity and Instruction Budget

    The persona declares the session identity and injects the model name and working directory; paired with it, the instruction budget determines the upper limit of how much the “workspace instruction file” can enter the context (a common value is on the order of 64KB). This budget is the channel through which project-level conventions (such as sibling documentation and convention files) enter the model’s view. Practical point: instruction files should be refined into “constraints that must be followed + a directory map,” with lengthy background externalized as retrievable documents, to avoid the budget being consumed at once.

    6.2 Platform-Adaptive Shell

    Cross-platform support is the first hurdle for a coding agent. A typical approach declares two shell tools and enables them mutually exclusively by platform condition: POSIX shell in Unix-like environments and PowerShell on Windows, never both visible at once. This avoids the model probing in the wrong syntax domain and makes command examples deterministic. Example:

    1. tool-posix-shell:
    2. disabled: process.platform === 'win32'
    3. tool-pwsh:
    4. disabled: process.platform !== 'win32'

    Further best practices include default timeouts and output truncation policies, confirmation or sandboxing for dangerous commands, and turning long tasks into background execution with log polling.

    6.3 File Editing and Retrieval

    Editing capability usually includes two paths: exact string replacement and structured editing; the former requires a unique match and errors out on failure to avoid ambiguous writes. Retrieval capability covers filename/content search and web fetching, used to bring “external facts” into context. Engineering practice should enforce “read before write” and provide a diff preview on writes to reduce the risk of unintended changes.

    6.4 Plans, Goals, and Workflows

    The planning capability breaks a complex task into a set of verifiable steps; the goal capability maintains completion criteria for long-range tasks; the workflow capability solidifies repetitive processes into reusable orchestration. Together they address “model drift in long tasks”: plans provide short-term anchors, goals provide long-term criteria, and workflows provide a deterministic path.

    6.5 Sub-Agents and Context Compaction

    Sub-agents outsource parallelizable sub-problems and only collect conclusions, thereby protecting the main session budget; context compaction summarizes history when nearing the window limit, keeping decisions and constraints while discarding redundant output. Both are key to long-session usability; it is advisable to define a “compaction trigger threshold + retention list” to avoid losing critical constraints during compaction.

    6.6 Skill Discovery and Resident Capabilities

    Skill discovery means retrieving available skill descriptions at runtime and loading them on demand, avoiding keeping all skill documents resident in context. Resident capabilities live for the same lifecycle as the session, typically compaction and skill discovery themselves. The criterion is “does every request need it”—if so, keep it resident; otherwise, load on demand.

    7. How the Default Mode Is Determined

    The default mode is usually specified by user-level settings, in a settings file located in the local user directory, in the form of designating the default preset as standard. Its priority is typically lower than an explicit selection at session creation and higher than the built-in fallback value. For teams, it is advisable to include the default mode in environment initialization scripts or repository-level documentation to ensure out-of-the-box consistency for new members.

    8. Selection Advice and Common Pitfalls

    • Default to standard: for everyday coding, cross-file refactoring, and tasks needing retrieval and planning, standard mode is a safe starting point.
    • Use minimal for determinism: for teaching demos, cost-sensitive scenarios, and cases where predictable behavior comes first, the two-tool shape of minimal mode is easier to audit.
    • Consider code mode for batch operations: when a task can be expressed as “multi-step deterministic orchestration,” code mode can significantly compress round trips.
    • Use cordis mode for meta-development: only open this high-risk capability when you need to analyze and rewrite the runtime itself or derive new agents, and pair it with permissions and auditing.

    Three common pitfalls: first, treating the mode as a runtime switch and ignoring the locking constraint; second, piling every capability into the default mode, causing schema bloat; third, letting instruction files grow without limit, crowding out the budget and diluting key constraints.

    9. Conclusion

    The essence of preset modes is turning “session capability” from hard-coding into declarative, composable, and governable configuration assets. Standard mode, as the default shape, forms a complete coding loop with eleven capability groups spanning identity, shell, editing and retrieval, plans and goals, sub-agents, and compaction; shared mounting and keyed state balance performance and isolation; mode locking trades implementation simplicity for semantic consistency. Understanding these mechanisms is what lets you make the right selection in a multi-mode system and stably embed coding agents into real development workflows.