System Prompt
WednesdayAI builds a custom system prompt for every agent run. The prompt is WednesdayAI-owned and does not use the pi-coding-agent default prompt. Model-visible copy uses the WednesdayAI product name; operator paths and env vars still use the stableopenclaw identifiers — see Product naming.
The prompt is assembled by WednesdayAI and injected into each agent run. The default identity line is:
Structure
The prompt is intentionally compact and uses fixed sections:- Tooling: current tool list + short descriptions.
- Safety: short guardrail reminder to avoid power-seeking behavior or bypassing oversight.
- Skills (when available): tells the model how to load skill instructions on demand.
- WednesdayAI Self-Update: use
config.patchfor targeted edits; first callconfig.getand passpayload.hashasbaseHash.config.applyis default-denied for non-sandbox agents.update.runstays available. See Config writes. - WednesdayAI CLI Quick Reference: primary CLI spelling taught to the model (
wednesdayai …). - Workspace: working directory (
agents.defaults.workspace). - Documentation: local path to WednesdayAI docs (repo or npm package), public mirror
https://docs.wednesdayai.dev, and when to read them. - Workspace Files (injected): indicates bootstrap files are included below.
- Sandbox (when enabled): indicates sandboxed runtime, sandbox paths, and whether elevated exec is available.
- Current Date & Time: user-local time, timezone, and time format.
- Reply Tags: optional reply tag syntax for supported providers.
- Heartbeats: heartbeat prompt and ack behavior.
- Runtime: host, OS, node, model, repo root (when detected), thinking level (one line).
- Reasoning: current visibility level + /reasoning toggle hint.
Prompt structure markers
Whenagents.defaults.systemPrompt.cache.boundary is auto (default), the assembled prompt inserts HTML-comment markers between stable and volatile sections:
<!-- WEDNESDAYAI_CACHE_BOUNDARY -->— cache-stable prefix ends; per-turn suffix begins.<!-- WEDNESDAYAI_PROJECT_CONTEXT_END -->— ends the Project Context / workspace-file block when that block is present.
src/agents/system-prompt.ts and imported by the system-prompt report parser so assembler and parser cannot drift (ADR 0051). Set cache.boundary: "off" to render one continuous prompt with no cache-boundary marker. Changing marker text invalidates provider prompt-cache prefixes once at upgrade time — see Prompt Caching.
Which side of the boundary a section renders on is fixed by its slot. src/agents/system-prompt-slots.ts lists every slot with its tier: agent-tier slots render before the marker, session-tier slots after it. The file also lists the render order of the sections (ADR 2105).
Two additive slots accept plugin content: custom.agent is the last agent-tier placement (above the cache boundary) and custom.session renders directly before ## Runtime, so no plugin-provided section can follow the runtime section. Blocks come from before_prompt_build (prependSystemContext, appendSystemContext) and from the deprecated context.collect prependSystemPrompt/appendSystemPrompt aliases. Each non-empty block renders as ## Plugin context (source: plugin:<id>) followed by the block text (internal blank lines preserved), in priority order (ties keep arrival order); blank blocks are skipped. A hook systemPrompt that does not contain the base prompt renders as one of these labeled blocks instead of replacing the prompt; a full replacement (equal to or extending the base) still replaces the prompt — the other plugins’ blocks keep their placements before ## Runtime and only the replacing plugin’s own suffix is appended at the very end of the prompt — and when several handlers return replacements the highest-priority one wins with a warning naming the rest (ADR 2105).
Some exclusive slots can be claimed by a plugin (ADR 2105): a context owner registered for prompt:memory, prompt:context, prompt:guardrails or prompt:brain renders that section for the sessions it owns. memory claims require the plugin’s manifest kind to be memory (selected with plugins.slots.memory); context claims require kind context-engine (selected with plugins.slots.contextEngine, or "none" to disable context-engine plugins). guardrails and brain accept any loaded plugin. A claimed memory section still honours operator section config; the other claimed slots render the plugin’s text as-is. With promptMode=none no sections — claimed or core — render. Isolated analysis and probe runs that disable plugin hooks resolve no claims, so no plugin-authored text reaches their prompt. See Plugins for the registration contract.
One more per-turn tail exists outside the section list: a chat.send request may carry turnContext, a sanitized client instruction that WednesdayAI renders as the closing Turn context (client-provided): lane of that turn’s current user prompt envelope, after the user message — the system prompt (boundary marker, plugin additions and all) stays byte-identical with or without it (ADR 2105 PR 6). One exception: when core cannot resolve the turn’s current user row in the final provider input (for example, an overflow compaction cut it out of a continuation request, or a transform_llm_input hook replaced the messages without their ingress carrier), the context rides that provider request’s system-prompt tail instead (the legacy placement). It appears on that turn only and is never persisted; see Gateway protocol.
Per-turn plugin content can also land in the current user-message envelope (ADR 2105): a context owner registered for turn:now, turn:analysis or turn:recall renders that lane ahead of context.collect contributions, each labeled <lane title> (plugin: <id>):. recall claims require the plugin’s manifest kind to be memory; now and analysis accept any loaded plugin. When a message-render context owner is active, core skips the envelope blocks and the resolved claims ride context.project turnInputs.lanes instead. The client turnContext is never part of that hand-off: core attaches the closing lane itself after the owner render and after the diagnostic capture, so an owner that renders its lanes cannot put the context into model-call diagnostics (ADR 2105 PR 6 fix round 4). See Plugins for the registration contract.
Prompt modes
WednesdayAI can render smaller system prompts for sub-agents. The runtime sets apromptMode for each run (not a user-facing config):
full(default): includes all sections above.minimal: used for sub-agents; omits Skills, Memory Recall, WednesdayAI Self-Update, Model Aliases, Team, User Identity, Reply Tags, Messaging, Silent Replies, and Heartbeats. Tooling, Safety, Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected context stay available.none: returns only the base identity line.
promptMode=minimal, extra injected prompts are labeled Subagent
Context instead of Group Chat Context.
Configurable Sections
agents.defaults.systemPrompt controls the shared prompt baseline. agents.list[].systemPrompt overrides that baseline for one agent. Per-agent section objects merge over the defaults by section key, except projectContext.files: when an override supplies files, that list is authoritative and ordered.
Precedence
The effective system prompt is assembled in three tiers, lowest to highest, each merged over the previous one by section key (resolveSystemPromptConfigForAgent):
- Preset - the built-in shape selected by
preset(default,lean, orminimal). agents.defaults.systemPrompt- the shared baseline, merged over the preset.agents.list[].systemPrompt- a single agent’s overrides, merged over the defaults.
AGENTS.md and the other workspace persona files are injected through the projectContext section rather than as standalone config. The file list comes from projectContext.files, and when an override supplies files that list is authoritative and ordered (it replaces the lower tier rather than merging). Because AGENTS.md rides inside the same merged precedence, config systemPrompt and workspace AGENTS.md cannot silently diverge - both resolve through the tiers above.
The preset field chooses a starting shape:
default: keeps all built-in sections at full detail. This is the standard prompt.lean: removes repeated guidance and uses a compact Project Context file list.minimal: keeps only essential guidance for constrained agents.
cache.boundary is auto (the default). Set
cache.boundary: "off" to render one continuous prompt with no boundary marker. See
Prompt Caching for the section ordering and tuning guidance.
Regular section modes are:
default: use the built-in section.off: omit the section.prepend: add configured text before the built-in section.append: add configured text after the built-in section.replace: use configured text instead of the built-in section.
tooling, skills, and modelAliases support default, compact, names, and off. runtime supports default, minimal, and off. projectContext supports default, lean, and off.
Generated sections accept a progressive boolean, but it currently changes rendering only for skills. With skills set to mode: "compact" and progressive: true, WednesdayAI renders only skill names and SKILL.md paths so the model can load one relevant skill on demand without carrying every description in the stable prompt. Setting progressive on tooling or modelAliases is accepted but has no effect today.
Section content entries can come from inline text or a file. Regular sections require prepend, append, or replace to render configured content; generated and runtime sections append configured content whenever the section is enabled. projectContext also accepts a content array (same text/file sources) that is appended to the section when the section is enabled, regardless of mode.
Section key reference
All configurable section keys, their types, and available modes:
Sections omitted by the
minimal preset: documentation, modelAliases, team, replyTags, messaging, voice, reactions, silentReplies, heartbeats, and runtime. The minimal preset also sets tooling: names instead of the full tool listing.
~. WednesdayAI expands absolute and home-relative paths first, then rejects paths outside the effective workspace boundary before rendering the prompt. It applies character limits and caches file reads by file identity; the prompt renderer itself does not perform file I/O.
Workspace bootstrap injection
Bootstrap files are trimmed and appended under Project Context so the model sees identity and profile context without needing explicit reads:AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.md(only on brand-new workspaces)MEMORY.mdand/ormemory.md(when present in the workspace; either or both may be injected)
systemPrompt.sections.projectContext.files, this legacy bootstrap list remains the default. All loaded bootstrap files are injected into the context window on every turn, which
means they consume tokens. Keep them concise — especially MEMORY.md, which can
grow over time and lead to unexpectedly high context usage and more frequent
compaction.
Note:Large files are truncated with a marker. The max per-file size is controlled bymemory/*.mddaily files are not injected automatically. They are accessed on demand via thememory_searchandmemory_gettools, so they do not count against the context window unless the model explicitly reads them.
agents.defaults.bootstrapMaxChars (default: 20000). Total injected bootstrap
content across files is capped by agents.defaults.bootstrapTotalMaxChars
(default: 150000). Missing files inject a short missing-file marker. The one
exception in the default list is BOOTSTRAP.md: once onboarding completes it is
supposed to be gone, so an absent BOOTSTRAP.md is omitted entirely and no
marker is injected. Files listed explicitly in
systemPrompt.sections.projectContext.files follow their own optional
setting instead of this built-in default.
Sub-agent sessions with the legacy default list only inject AGENTS.md and TOOLS.md (other bootstrap files
are filtered out to keep the sub-agent context small). Configured Project Context file lists are already explicit, so they are not filtered by the legacy sub-agent allowlist.
Project Context Files
systemPrompt.sections.projectContext.files replaces the inherited Project Context file list for the effective agent. Ordering is authoritative: WednesdayAI loads files in the configured order and renders them in that order.
Each entry supports:
path: workspace-relative, absolute, or~-prefixed path.mode:inline,manifest,off, orrunKind.optional: skip the file instead of injecting a missing-file marker. Optional files are skipped for any reason they cannot be used, including a missing path or one rejected by the workspace boundary check.maxChars: per-file character cap before the global bootstrap caps apply (applies toinlinecontent;manifestfiles are not read, so this does not affect them).
inline: inject file content into Project Context. Subject to the per-file and global bootstrap size caps.manifest: inject an on-disk pointer with size, so the model can read the file only when needed. Manifest files are stat-only and are not read into the prompt, so they are not subject to the inline size cap; large files are still advertised by path and size rather than reported as missing.off: omit the file entry.runKind: include the file only for matching run kinds such as heartbeat runs.
lean and minimal presets use this ordered Project Context list:
agent:bootstrap to mutate or replace
the injected bootstrap files (for example swapping SOUL.md for an alternate persona).
To inspect the effective preset, cache boundary, Project Context file modes, raw versus injected file sizes, truncation, tool schema overhead, and a per-slot breakdown of the last run’s system prompt (owner, rendered size, and a 16-hex hash per slot — /context detail only), use /context list or /context detail. See Context.
Time handling
The system prompt includes a dedicated Current Date & Time section when the user timezone is known or message stamps are on. To keep the prompt cache-stable, it only includes the time zone (no dynamic clock or time format). Usesession_status when the agent needs the current time; the status card
includes a timestamp line.
When message stamps are on (the default), the section also carries one
prevention line: user messages may begin with a system-added timestamp such as
[Wed 2026-10-07 21:47 GMT+10], and replies must not begin with one.
Configure with:
agents.defaults.userTimezoneagents.defaults.timeFormat(auto|12|24)agents.defaults.envelopeTimestamp("off"also disables the stamps and the prevention line)
Skills
When eligible skills exist, WednesdayAI injects an available skills list. In default mode this usesformatSkillsForPrompt, including the skill name,
description, and SKILL.md path. The prompt instructs the model to use read to
load the SKILL.md at the listed location (workspace, managed, or bundled). If no
skills are eligible, the Skills section is omitted.
skills: { mode: "compact", progressive: true }, WednesdayAI renders a
smaller loadable manifest instead:
Documentation
When available, the system prompt includes a Documentation section that points to local WednesdayAI docs. Resolution order:- A workspace
docs/directory, if one exists. - The repo
docs/directory, in a source checkout (detected bydocs/docs.jsonbeing present next to the package root). - Otherwise (a plain npm install, which ships no local docs beyond
docs/reference/templates/), the section points directly athttps://docs.wednesdayai.devwith no local path and no Mirror line.
Mirror: https://docs.wednesdayai.dev line.
The section also lists the source repo https://github.com/ExpansionX/WednesdayAI-core,
community Discord, and ClawHub (https://clawhub.com) for skills
discovery. The prompt instructs the model to consult docs first for WednesdayAI behavior,
commands, configuration, or architecture, and to run wednesdayai status itself when
possible (asking the user only when it lacks access). The openclaw binary remains a
legacy process-level alias.