#Engenharia De Contexto
Anthropic measured what actually works in AI agent memory: four layers, telling the agent what memory is for instead of rules, and dreaming, an offline step where the agent rereads transcripts and fixes its own memory. CL-Bench, Pokémon and wiki vs search numbers, plus Dreams API code and how to apply it in Claude Code.
An agent that runs across several context windows forgets everything each session. The pattern Anthropic, Manus and LangChain converged on: move state out of the window and into files. A JSON feature list that only accepts status changes, a progress log, a session start ritual and offloading large results with a restorable pointer, all with PHP code.
A subagent isn't a job title, it's a context window. When to use subagents (and when one agent is enough), the difference between isolated and fork modes, the numbers from Anthropic and Cognition, and how to implement both in a PHP harness straight on the Claude API, no framework.
Your CLAUDE.md is 400 lines long and Claude ignores half of it. A tutorial on how to use skills in Claude Code: folder structure, SKILL.md frontmatter, progressive loading, scripts and references inside the skill, how to test whether the agent triggers it, and the decision matrix between skill, MCP, CLAUDE.md, slash command and subagent. Built on the real skills that run this blog's pipeline.
Cloudflare's Code Mode MCP turns MCP tools into a TypeScript API and has the agent write code instead of making tool calls. From 1.17 million to about 1,000 tokens on Cloudflare's own API MCP. How it works under the hood (isolates, bindings, network-less sandbox), how to plug it into Claude Code, and where the pattern bites.
On Oct 22, 2026, Anthropic donated the Agent Skills standard to the Agentic AI Foundation, the same path MCP took. What agent skills are, how SKILL.md progressive loading works, an audit of the 8 skills that run this blog, and a checklist for the skills you already have.
Half the prompt techniques disappeared because the model learned them on its own. The other half became API parameters. What survived, what turned into folklore, and why in a real system the problem stopped being the sentence and became what goes into the context window.
You send a one-line question and /usage reports a whole day's worth of consumption. Saving tokens in a coding assistant has nothing to do with prompt size: it's about prefix caching. How it works in Claude Code, Codex, and Cursor, the seven actions that invalidate it without you noticing, how to measure it with cache_read vs cache_creation, and eight levers to stretch the session.