Blog · 2026-05-18· 4 min read

Claude Code as Agent Control Plane: 12 tactical patterns for /bg, MEMORY.md, /compact, and PostToolUse dashboards

Treat Claude Code as an Agent Control Plane, not a chat window. /bg moves sessions out of terminal chaos into the visual view. MEMORY.md and USER.md at the repo root preserve context across sessions. /compact at 40% of context beats waiting until 50%+ where cost and accuracy both degrade. PostToolUse hooks pipe cost telemetry into a single dashboard. Community benchmarks via Hermes Agent show parallel tool execution cuts completion time by 40-60% versus sequential runs, and the visual Agent View reportedly cuts wasted API credits by 35% in teams that adopt it.

D1D3claude-codeagent-control-planebg-command
Painterly Edwardian dispatcher's panel with a brass /compact slider locked at 40%, three wax-sealed instruction cards labelled MEMORY.md / USER.md / SKILLS, and a gauge wall feeding cost dashboards. Loop in a clerk's eye-shade reads the cost gauge.

Quick answer

The Agent Control Plane is the mental model that turns Claude Code from a chat window into a centralised orchestration and observability layer. Four load-bearing patterns: /bg for visual session management, MEMORY.md and USER.md at the repo root for persisted context, /compact at 40% to head off cost and accuracy degradation, and PostToolUse hooks piping spend into one dashboard. Teams adopting this pattern report cutting wasted API credits by 35%.

The wrong mental model most teams reach for

Most people run Claude Code like a smarter chatbot: one terminal, one prompt at a time, vibes-based session management, no shared memory between sessions.

That works for solo demos. It does not work for production agentic workflows where multiple agents run in parallel, each needs context, each costs money, and each produces artifacts you have to trust enough to merge.

The better mental model is the Agent Control Plane. The control plane has four primitives: visual session view, persisted context, modular capability, and telemetry. Below is the tactical checklist for each.

12 tactical patterns

  1. Move sessions into the visual view with /bg. Terminal chaos is the canonical anti-pattern. Once you are running more than one agent, the visual view is where session state lives.
  2. Treat the OS as one visual system across models and data sources. Not another chat window with nicer furniture. The point is unified observability, not a prettier prompt box.
  3. Drop MEMORY.md at the repo root. Without it, agents lose architecture context across sessions and rebuild it from scratch every time. That rebuild is paid for in tokens.
  4. Drop USER.md next to it. This is where operator or learner preferences live: tone, formatting, do-not-edit paths. Cheaper than re-explaining your conventions every session.
  5. Put repeatable instructions in /skills as modular markdown. The control plane can track skills as named capabilities. Bury them in random prompts and you lose the ability to see what your fleet is doing.
  6. Track every session with /cost or ccusage. If you cannot see spend, you cannot prove ROI to yourself or to clients. Cost data is the spine of the entire control plane story.
  7. Run /compact around 40%. Community guidance says cost and accuracy both degrade past 50%. Pre-emptive compaction is cheaper than reactive recovery.
  8. Do not say "build a React app" to /goal. That is not a specification, it is a fundraiser for the API bill. End-state goals need verifiable exit conditions.
  9. The copy-paste rule for /goal: "Do not exceed 5 iterations. Output final state as valid JSON." The iteration cap is the difference between a finished task and a runaway bill.
  10. Pipe cost data through PostToolUse hooks into one dashboard. That is the moment "AI productivity" stops being vibes and starts being a number with a denominator.
  11. Parallel tool execution wins by 40-60% over sequential runs in Hermes Agent community benchmarks. Use it where the work has no inter-dependency; do not force it where there is.
  12. The visual Agent View reportedly cuts wasted API credits by 35% in teams that adopt the full control-plane pattern. Wasted credits are the leading indicator: when they drop, plan adherence, mastery velocity, and reviewer trust all follow.

The bonus tip nobody mentions

Past about 10 highly active parallel sessions, the visual UI starts getting RAM-heavy. That is a soft ceiling, not a hard one. Cap visible sessions, push the rest to background mode, and let the cost dashboard be the source of truth on what is running. The documentation is optimistic about this limit. Production usage at the upper end is not.

What still goes wrong

Three honest failure modes worth tracking from week one:

  • Stale MEMORY.md. It only works if it stays current. Set a weekly review cadence so the architecture map does not drift past the code.
  • Skills sprawl. Twenty named skills nobody remembers is worse than five well-curated ones. The control plane gives you visibility; you still have to curate.
  • Cost dashboards without a baseline. A number that goes up or down means nothing without last week's number next to it. Capture the baseline on week one or you will be guessing forever.

How this shows up on the exam

D1 (Agentic Architecture, 27%) repeatedly tests orchestration as a first-class architectural layer. The classic distractor: a question describes an agent that produces inconsistent results, and the trap answers are "use a smarter model" or "improve the prompt". The correct answer is almost always architectural: a PostToolUse hook, a /compact discipline, explicit /goal end-state criteria. The Agent Control Plane is the management-tier name for that architecture; the exam tests the engineering-tier components.

D3 (Claude Code Configuration, 20%) tests the same pattern at the configuration layer. MEMORY.md, USER.md, /skills directory, .claude/rules globs, and /compact thresholds all have specific homes in the file system and specific behaviours. The exam reliably rewards candidates who can name where configuration lives, not just what it does. Internalise the directory map.

Where to take this next

If you have used /compact, /bg, or PostToolUse hooks in production, the question worth asking your team is which of these 12 tactics held up at scale and which ones leaked. The list reads cleanly. Production usage is where you find out which ones actually pay back the configuration effort.

01 · Read next in the pillars

Where this lands in the exam-prep map

Each blog post bridges into the evergreen pillars. These are the most relevant follow-ups for this story.

02 · FAQ

7 questions answered

What is the Agent Control Plane mental model?
The Agent Control Plane treats Claude Code as a centralised observability and orchestration layer over multiple concurrent agent sessions, not a single chat window. The four load-bearing parts are: (1) visual session view via /bg, (2) persisted context via MEMORY.md plus USER.md, (3) modular capability via files in /skills, and (4) cost and quality telemetry via PostToolUse hooks. The teams that adopt this pattern report cutting wasted API credits by 35% because the spend stops hiding in terminal scrollback.
Why /compact at 40% instead of waiting?
Community guidance says cost and accuracy both degrade past 50% of context use. /compact at 40% is the engineering safety margin: it gives the model a clean summarisation pass while the working set still fits, before the lost-in-the-middle problem starts costing both tokens and answer quality. Waiting until 60-70% means you pay for the bloated context AND get worse outputs from it.
What is the difference between MEMORY.md and USER.md?
MEMORY.md holds project-wide context the agent should re-read on every session (architecture map, conventions, key file paths). USER.md holds learner or operator preferences (tone, formatting, do-not-edit rules). Both sit at the repo root. Without them, agents start from zero on every session and burn tokens rebuilding context that should have been declared once.
How do PostToolUse hooks turn into a cost dashboard?
Every tool call triggers a PostToolUse hook. The hook receives the tool name, the input payload, the result, and the run metadata. Pipe that into your telemetry layer (Convex action, Datadog, a CSV — whatever you have). Aggregate by user, agent, tool, and day. You then have a real dashboard that proves ROI per session instead of guessing from monthly Anthropic bills.
What does /goal expect that a chatbot prompt does not?
A /goal run wants an end-state specification, not a step-by-step instruction. "Build a React app" fails because it implies the agent should improvise its way to an unspecified outcome. "Build a React app with these 4 routes, this auth provider, and exit when all tests pass; do not exceed 5 iterations; output final state as valid JSON" is the right shape. The 5-iteration cap is the difference between a finished task and a runaway API bill.
How does this map to the CCA-F exam?
D1 (Agentic Architecture, 27%) probes the orchestration layer with distractors like "use a smarter model" or "improve the prompt". The correct answer is almost always architectural: a PostToolUse hook, a /compact discipline, an explicit /goal end-state. D3 (Claude Code Configuration, 20%) tests where each artifact lives: MEMORY.md, USER.md, /skills directory, .claude/rules globs. The control-plane vocabulary is the management-tier name for the architecture the exam tests at the engineering tier.
When does the visual UI break down?
Past about 10 highly active parallel sessions the visual UI reportedly gets RAM-heavy on the host machine. The escape hatch is the same as for any UI on a long-running fleet: cap the visible sessions, push the rest to headless background mode, and keep the cost dashboard as the source of truth. Documentation describes this as a soft limit, not a hard one. Plan accordingly.

Synthesized from research output on 2026-05-18. LinkedIn cross-post pending.
Last reviewed 2026-05-18.

Blog post · D1 · Blog

Claude Code as Agent Control Plane: 12 tactical patterns for /bg, MEMORY.md, /compact, and PostToolUse dashboards, complete.

You've covered the full ten-section breakdown for this primitive, definition, mechanics, code, false positives, comparison, decision tree, exam patterns, and FAQ. One technical primitive down on the path to CCA-F.

More platforms →