Engineering Log

Field Notes on AI Agent Systems

Practical observations on tool-calling loops, context budgets, and reliable automation.

01. Treating Context Windows as Working Memory

Updated November 2026 · Architecture

Long-running agent sessions rarely fail because a model lacks raw reasoning capacity. Most failures start when noisy command logs, stale file dumps, and redundant retries crowd out the actual task constraints.

Keeping working memory clean requires explicit boundaries between exploration and execution:

  • Summarize large tool outputs immediately into structured facts rather than re-reading raw logs across turns.
  • Store persistent state in plain Markdown or JSON ledgers on disk instead of relying on conversation history alone.
  • Delegate wide codebase scans to isolated read-only workers so only distilled findings enter the main loop.

02. Separating Discovery from State Mutation

Updated November 2026 · Reliability

Well-behaved automation splits every operation into a read-only preview phase and an explicit apply phase. A deterministic CLI that outputs structured JSON lets an agent verify preconditions before mutating any state.

{
  "operation": "apply-config",
  "mode": "preview",
  "diff_count": 2,
  "requires_confirm": true
}

When a remote call times out after bytes have already been transmitted, treating the outcome as outcome_unknown prevents blind retries from duplicating side effects. Verification always runs as a separate read-only probe.

03. Designing Deterministic Verification Harnesses

Updated November 2026 · Evaluation

Self-reported completion by an LLM is not evidence. Reliable agent workflows pair every generative step with a cheap, deterministic check: schema validation, syntax dry-runs, or targeted smoke tests against observable outputs.

When a check fails, returning concise error context with the exact failing field or exit code produces faster convergence than feeding back full stack traces. Small, verifiable steps consistently outperform monolithic one-shot plans.