Teams already running a Gateway usually hit the wall not because “the model is asleep,” but because AGENTS.md, Skills, and bootstrap injection bloat the context, then memory_search and daily memory/*.md files mix unpredictably—making it hard to see which layer is burning budget. This article delivers six engineering-friction points, a promptMode versus bootstrap matrix, three log-aligned context metrics, a minimal AGENTS.md sample, and a six-step tuning runbook. Read it with the multi-platform install guide, post-install doctor triage, provider routing and failover, Docker networking triage, and channel setup—those cover won’t start and won’t connect; this one covers runs but context is uncontrolled.
OpenClaw in 2026 typically injects a bundle of repository files at startup (for example AGENTS.md, Skills, identity and tool boundaries) and splits memory into bootstrap versus on-demand search. Without an agreement on what belongs in bootstrap versus memory_search, teams quickly see every turn carrying a huge static prefix, longer tool chains, and rising cost and latency. Track the six items below beside weekly token estimates, tool failure rates, and average turns.
minimal or none per docs.memory/*.md then scanning with memory_search raises IO and embedding cost; use summaries in-repo, raw text externally.Align these six with the Docker article’s split between healthy Gateway versus model-layer failures to see faster whether you have a context policy issue or a network/provider issue.
Use the table in reviews: the goal is a predictable token ceiling per task shape, not prettier prose. Exact keys follow your OpenClaw version.
| Dimension | Bootstrap (startup) | memory_search / memory_get (on demand) |
|---|---|---|
| Typical content | AGENTS.md, core Skill summaries, identity and tool boundaries | Dated notes, decision logs, long appendices |
| Failure look | Every turn is slow, expensive, noisy prefix | Missed hits, overly wide hits, repeated reads |
| Tuning levers | Total character ceiling, staged injection, promptMode | Index granularity, naming, summarization policy |
| promptMode | full injects the most; minimal suits sub-agents that can omit sections | Does not replace bootstrap; avoid hiding critical boundaries only in memory |
| Collaboration | Needs code review and versioning | Needs audit fields (author, expiry) |
| Remote Mac | Large clones in the cloud—watch sync lag and permissions | High churn writes can race laptops |
Collect from logs and coarse token estimates; numbers are placeholders—replace with your baselines.
agents.defaults.bootstrapTotalMaxChars (name varies by release—follow official docs).memory_search results the model actually uses (spot-check or secondary confirmation). Low MRH means index or summary debt; high MRH with high BEL often means duplicated content.Multi-model routing and dynamic context estimation will keep evolving through 2025–2026, but repository-side noise still caps quality—keep BEL, TLI, and MRH on the board.
When explaining to non-developers, BEL is like “pages from the employee handbook you reread before every conversation,” and TLI is “how many times the same question gets escalated without progress”—growing model size without fixing those only prints the same thick booklet on more expensive paper.
# AGENTS.md (example: only eternal boundaries; details live in Skills or memory) ## Repository role - This repo is the xxx service; default branch main; release cadence in docs/release.md. ## Tooling boundaries - Do not change CI secrets or production configs without review; DB migrations need two-person sign-off. ## OpenClaw conventions - Skills directory: .openclaw/skills/ (example—use your layout) - Long decisions: memory/YYYY-MM-decisions.md with a one-line summary at the top.
Warning: Do not place customer names, raw secrets, or full unredacted logs inside bootstrap text; if retention is mandatory, use on-demand retrieval with scoped visibility.
minimal or equivalent and log before/after latency, success, and cost.Intermittent timeouts tempt teams to swap models or add GPUs; without BEL and TLI you will confuse noisy prompts with unstable infrastructure. Follow the Docker article: Gateway and channels first, then provider, then repository prompts—same layering as the channel article’s triage, with context budget at the top.
Add a minimal repro quartet to each incident ticket: (1) active promptMode and BEL band, (2) link to the last AGENTS/Skills merge request, (3) memory_search query and hit count, (4) Gateway log snippets adjacent to tool calls. With those four fields most “mystery slowdowns” resolve in under thirty minutes. For sub-agents or parallel jobs, log per-branch ceilings in the same workbook—aggregates that only watch the main session mislead.
Personal machines mix giant prompts and ad hoc secrets inside global config—hard to audit. Moving to CI or shared remote Macs introduces permission and sync lag, so AGENTS and memory fork invisibly. Writing explicit context policy and pairing it with dedicated remote environments turns agent workflows into reviewable, handoff-ready assets.
Ephemeral cloud desktops can run OpenClaw, but long uptime, fixed paths, and low toolchain drift favor dedicated physical remote Macs—especially when a Gateway shares a host or region with a large monorepo and disk IO joins context as a bottleneck. MACCOME operates Mac mini M4 and M4 Pro nodes across Singapore, Japan, Korea, Hong Kong, and US coasts with flexible rental terms suited to always-on Gateway plus large-repo clones; align public rate pages with your BEL row, freeze directory policy, then iterate Skills.
Pilot: drive BEL into the team target band for one week before buying larger models or more channels—bigger models rarely fix repository noise.
FAQ
Which article should I read first for install issues?
Follow the multi-platform install guide, then the doctor triage; this article does not repeat port and dependency checks.
Where are networking and model topics?
See Docker networking triage for CLI reachability and provider routing for model chains.
Rental rates and help?
Open rental rates and the Help Center.