The lab notebook
Field notes on AI engineering
824 articles · page 10 of 28
Using Codex as a Security Review Agent
A codex security review catches injection bugs, auth gaps, and leaked secrets before a human reviewer even opens the diff. Here is how to wire it into your actual workflow.
Codex in a Monorepo: Workflows That Scale
A Codex monorepo setup either saves your team hours a week or floods every PR with noise. Here is the config, scoping, and CI setup that makes it the former.
Connecting Codex to MCP Servers
A hands-on guide to wiring OpenAI Codex CLI up to Model Context Protocol servers, from config.toml syntax to debugging a server that won't start.
Configuring the OpenAI Codex CLI
A practical walkthrough of codex cli config: the config.toml file, profiles, approval and sandbox modes, model selection, and MCP servers, with copy-pasteable examples.
Codex in CI: Automating Code Tasks
A practical guide to running OpenAI's Codex CLI inside CI pipelines: safe auth patterns, sandboxing, and real GitHub Actions workflows for auto-fixing tests, updating dependencies, and reviewing pull requests.
Codex Approval Modes: Suggest, Auto, and Full Access
A practical breakdown of Codex's three approval tiers, how they map to sandbox and approval_policy settings, and which one to pick for a given task.
Writing AGENTS.md for Codex
A practical guide to writing an AGENTS.md file that actually changes how Codex behaves in your repo, with real examples, a nesting model, and the mistakes that make agents ignore it.
Claude Code vs Gemini CLI: A 2026 Comparison
A practical, engineer-level comparison of Claude Code and Gemini CLI: how they handle context, tool use, subagents, and real repo work, so you can pick the right one for your workflow.
Onboarding a Team to Claude Code
A practical rollout plan for getting an engineering team from "one person tried it" to "everyone ships with it," including permissions, shared config, and the mistakes that stall adoption.
Building Custom Claude Code Slash Commands
Learn how to build custom Claude Code slash commands that turn repeated prompts into reusable, shareable, one-line workflows for your whole team.
Large-Scale Refactoring with Claude Code
A practical playbook for using Claude Code to refactor large codebases safely, from planning the change to verifying it with real tests instead of vibes.
Claude Code Output Styles and Custom Formats
Claude Code's output styles let you reshape its entire system prompt for teaching, code review, or documentation modes without losing tool access. Here is how to switch, build, and manage your own.
Claude Code Across Multiple Repositories
A practical walkthrough of running Claude Code across several repos at once, from workspace layout to worktrees to keeping context from leaking between projects.
Running Claude Code in GitHub Actions: A Practical Setup Guide
Learn how to wire Claude Code into GitHub Actions so it triages issues, reviews pull requests, and fixes bugs on a schedule, with real workflow YAML, secrets setup, and guardrails against runaway costs.
Debugging Workflows with Claude Code
A practical guide to claude code debugging: how to structure prompts, use hooks and subagents, and avoid the traps that waste an engineer's afternoon chasing a phantom bug.
Cutting Claude Code Token Costs: A Practical Guide for Engineering Teams
Claude Code cost adds up fast once a whole team runs it daily. Here is what actually drives the bill and the concrete settings, habits, and workflow changes that bring it down without slowing anyone down.
Managing Context in Claude Code
Claude Code context runs out mid-task more often than it should. Here is what the context window actually holds, when to /compact vs /clear, and how to structure CLAUDE.md and subagents so long sessions stay fast and accurate.
Browser Agents in 2026: Automating the Web with LLMs
Browser agents let an LLM click, type, and read a real page instead of calling a clean API. Here is how they work, where they break, and how to build one that survives production traffic.
The Best MCP Servers in 2026: A Practical Directory
A working engineer's shortlist of the best MCP servers in 2026, organized by job to be done, with install commands and honest notes on when each one is actually worth adding to your agent.
An AI Pair-Programming Workflow That Actually Works
Most people run AI coding tools like a vending machine, prompt in, code out. Here is a workflow that treats the model like an actual pair, with a plan step, a driver/navigator split, and a review gate that catches what the model gets wrong.
AI Guardrails in Production
A practical guide to building AI guardrails in production, covering input validation, output filtering, tool permissions, and monitoring, with code you can drop into an existing pipeline this week.
Error Handling in AI Automation Workflows: A Practical Guide
AI automation error handling is different from normal software error handling: the failures are probabilistic, not deterministic. Here is how to build workflows that survive rate limits, bad tool calls, malformed outputs, and silent hallucinations.
Monitoring AI Agents in Production
Agent monitoring in production means tracing every tool call, catching silent failures before customers do, and knowing the difference between a slow model and a broken agent. Here's how to build that setup.
Evaluating Agent Trajectories, Not Just Outputs
Grading only the final answer hides how an agent actually got there. Here is how to evaluate agent trajectories: the full sequence of tool calls, reasoning steps, and recoveries that lead to a result.
How Agents Choose Tools: Selection and Routing
A practical breakdown of how AI agents pick the right tool at runtime, why too many tools break accuracy, and the routing patterns that keep large tool catalogs usable.
Sandboxing AI Agents: Safe Code Execution
A practical guide to agent sandboxing: what breaks when you let an LLM run shell commands unrestricted, and how to build isolation with containers, VMs, and syscall filters that actually hold up.
Agent Reflection: Self-Critique and Retry Loops
Learn how agent reflection turns a single-shot LLM call into a self-correcting loop, with working code for critique prompts, retry logic, and stopping conditions.
Agent Planning Algorithms: ReAct, Plan-and-Execute, Tree of Thoughts
A practical comparison of ReAct, Plan-and-Execute, and Tree of Thoughts, with runnable code, so you can pick the right agent planning algorithm instead of guessing.
Agent Orchestration Patterns: Supervisor, Swarm, and Pipeline
A practical breakdown of the three agent orchestration patterns that actually show up in production systems, with real tradeoffs and code you can adapt today.
AI Agent Benchmarks: Measuring Real Capability
Agent benchmarks promise a single score for "how good is this agent," but most of them measure something narrower and more fragile than that. Here's how to read them, and how to build your own when the public ones don't match your task.