AThe Coding Agent
✎ Suggest◎ Sign in

Deep dives into working agents.

Technical walkthroughs with substance: architectures, prompting patterns, evals, and production lessons unpacked until complex agent systems become reusable design material.
Page 4 of 6 · showing 73–96 of 138

Claude Mods: How They Work and Why They're a Big Deal

Claude Code mods are JavaScript or TypeScript functions that run inside Claude Code itself, not outside it like hooks, skills, and MCP servers. A mod is loaded once and stays alive for the whole session, so it can watch, change, or stop a tool call before it runs and draw its own live panels in the terminal and the desktop app. When Claude is about to act, the mod receives the event, a way to talk back, and a next function — it can let the action through, rewrite it, or answer instead. Because Anthropic is already building parts of Claude Code itself as mods, the diff view and the agent are mods too, the whole experience is now customizable. The video shows hot reload, installing a mod from a marketplace folder or repo, a guard that stops rm -rf, and a session-audit prompt that mines your last 20 sessions for the mods you actually need. The caveat is security: a mod runs on your machine with your permissions, so validate it with claude plugin validate before installing.

deep-dives
Prompt Engineering
Published2026-10-03

Loop Engineering: Getting Claude Code to Build on Its Own

Loop engineering is the structured workflow behind agents that build on their own for hours: an agent makes a change, a separate check scores it, and the change is kept only if the score improves. AI LABS rebuilt Karpathy's AutoResearch loop as a Claude Code workflow and found its one blind spot. The setup is a stack of skills and agents — a project context skill as the app's memory, a build skill that drives the loop, a write checks skill that writes checks before any feature is built, an approve checks program that locks the checks where the agent cannot edit them, a fresh feature builder agent per feature, and a results file recording every round. The blind spot is habits: a fresh agent with the same instructions repeats the same mistakes, so they add a second loop that reads the results and rewrites the how-to-work instructions for the next run. It caught what scores missed — a database that passed all 10 checks while saving nothing, and a mentions feature that clashed with legacy code.

deep-dives
AI LABS
Published2026-10-03

Fixing the PR Bottleneck: Three Brakes for Agent-Generated Code

Matt Pocock's talk from AI Engineer Paris 2026 argues that the pull request is still the bottleneck — and agents have made it worse. Agents make it trivial to open a PR and only slightly easier to open one worth reviewing, so as software factories accelerate, you get a 'slop cannon' unless you add brakes. His answer is a three-layer cake: cheap deterministic automated checks, then automated review by a separate sub-agent, then a human pass that only looks at the one-way-door PRs. The talk is dense with concrete mechanics — tautological tests and over-mocked tests that cannot fail, deep modules from Ousterhout's design philosophy, why coding standards must live in a separate coding-standards.md rather than the implementer's context, why a review agent should commit fixes instead of commenting, and a retro skill that turns every human review into better automated checks for the next PR. The through-line: code is the environment your agent works in, and agent experience (AX) deserves the same rigor developer experience got.

deep-dives
Matt Pocock
Published2026-09-30

Jev in the Harness: Turning Agent Decisions Into a Smart If Statement

Most model calls inside an agent do not write anything — they pick a tool, load a skill, judge whether a command is safe, or rank search results. Sam Witteveen's case for decision models inside the harness, with working demos: a two-stage cascade that routes a task to one of fifty skills by first classifying the category, and a RAG re-ranker that scores 25 passages down to five. Six use cases, four hooks in the loop, and a rare negative result — the aggressive 'Jev decides, LLM is fallback' pattern worked worse on complex work, so adopt the advisor version. Two corrections: the yes/no primitive is Noul, not 'null', and there are four primitives including Box. And the caveat that aged into the headlines: 'cannot hallucinate' is not 'cannot be fooled' — decision models were independently shown to be prompt-injectable, which makes a safety gate's inputs as important as the gate itself.

deep-dives
Sam Witteveen
Published2026-09-29

10 Levels of Jev: Where the System-One Model Fits in Your Agentic Stack

IndyDevDan lays out ten concrete levels of using Jev, TypeSafe's System One decision model, inside real agentic engineering — from a smart if-statement and support triage, through bash-tool gating and in-agent guardrails, all the way to a Pi coding agent that reaches for Jev on its own. The through-line is the reframe: Jev is not an LLM and not a replacement for one — it's a third class of model for narrow, programmable decisions, and the win is speed and cost. One Jev call is roughly 600x cheaper than a frontier model, which turns prompt-injection checks, force-push gates, and repo-wide file scouting from 'too expensive to run at scale' into a fraction of a cent. The takeaway for agentic engineers: stop reaching for the biggest model by default — define the decision, pick the right tool, and inspect the confidence.

deep-dives
IndyDevDan
Published2026-09-29

Memory, Then Dreaming: An Anthropic Engineer on Context Engineering

One year of context engineering traced as a sequence of what worked and what broke: CLAUDE.md at session start was unreasonably effective until it bloated; autonomous in-band memory tools gave agents judgement but split their attention; skills solved context growth with progressive disclosure while staying human-opinionated; and memory ended up modelled as a file system, because agents already know how to grep. The production chapter is the useful one — concurrent writes, a single bad edit poisoning organisation-wide context, staleness, and prompt injection into memory, answered with versioning that records provenance, hash-draft-rehash optimistic concurrency, tiered permissions and a portable API. Then the structural limit: an agent curating memory during a task cannot see patterns across sessions or fleets. The answer is a second-order out-of-band process — dreaming — that reads a memory store plus transcripts in batch, with its own budget, and proposes a new store for human review. Verified against the shipped Dreams API: 1-100 sessions, separate output store, steerable with instructions, research preview and not ZDR/HIPAA eligible. Includes the audience question the whole talk answers by accident: are we reinventing databases?

deep-dives
Anthropic (Applied AI)
Published2026-09-24

Mine Your Coding Agent's Conversation History: From JSONL Goldmine to Better Rules, Hooks, and Skills

Every conversation with your coding agent is already saved on your machine as JSONL files — every prompt, tool call, and failure. Cole Medin shows how to turn that overlooked goldmine into concrete improvements. The simple version is one prompt that has the agent scan its own history and list the top 10 opportunities to become more efficient or reliable. The full version loads the transcripts into structured tables (sessions, turns, tool calls) in Databricks, using the built-in Genie agent to parse the messy nested schemas with Spark — so querying becomes token-efficient instead of reading hundreds of thousands of tokens per analysis. The result: real changes to his AI layer, including 38 lines of new global rules ('never guess a path'), better Git permissions, and a session-tree hook that injects the live repo layout into every new conversation.

deep-dives
Cole Medin
Published2026-09-14

Needle: The Free, On-Device LLM You Can Actually Build With

Andrew Warner interviews Cactus Compute's Henry Ndubuaku about Needle — a free, 8–29MB on-device LLM that turns natural language into structured tool calls without an internet connection or external API. The core message is reliability through restriction: scope Needle's tools tightly, enumerate the options, and gate execution on its confidence score, and it 'virtually doesn't make mistakes' — because a limited model can't suddenly become your therapist, control your computer, or write code it wasn't asked to. It integrates into apps via llm.txt (paste it into Claude Code), runs on hardware like robot vacuums, phones, and even AirPods, and — unlike Jev — is open source and built to embed in your own software. The verdict: same safety ethos as Jev, different market (on-device vs cloud), and 'better because you can build with it.'

deep-dives
The Next New Thing
Published2026-09-14

A Model Router with Jev & OpenJevs: Routing, PII Gating, and Difficulty Scoring in Milliseconds

Sam Witteveen builds a local model router with Jev (TypeSafe's decision model) and swaps in SemIf — an open, local clone — so the whole router runs offline. The router asks three questions in one parallel request: choice (which lane — chitchat, code, image), score (how hard is it — can the local 2B model handle it or escalate), and null (is there PII — force local). A Next.js UI talks to a FastAPI server that decides, routes, and streams back from the winner, logging everything to SQLite. Results: 75% of requests answered locally, a fake API key caught at 0.96 confidence, decisions in 331ms (cloud Jev) or 88ms (local SemIf), and the whole day's demos costing under a cent.

deep-dives
Sam Witteveen
Published2026-09-14

Self-Compacting Agents: Let the Agent Decide When to Compact Its Own Context

IndyDevDan builds a self-compacting Pi coding agent — a context-aware agent with its own tool to decide when to compact, what to preserve, and how to continue. Instead of accepting the default fixed-percentage auto-compaction in Claude Code and Codex, the agent gets three thresholds (notice, warning, force) tuned around the 270K point where GPT pricing doubles, a live context bar, and full control over the compaction prompts — something Pi allows and Claude Code doesn't. Then the same hand-written plan is handed to three harnesses: GLM 5.2 chokes at 98% context, Fable 5.1 (Claude Code) ships in 50 minutes on 500K tokens, and GPT-6 Astra (Codex) ships in 21 minutes on 136K. The core lesson: master context, model, prompt, and tools — and you master the agent.

deep-dives
IndyDevDan
Published2026-09-14

Jev: The Decision Model That's 100× Faster Than an LLM — Three Real Prototypes

Jev, from TypeSafe, is a different kind of model: it doesn't write text — it classifies, scores, ranks, and routes, returning calibrated probabilities instead of sentences. Moritz's tutorial shows what that unlocks with three working prototypes: a voice-controlled browser where Jev answers a batch of multiple-choice questions about each spoken fragment in a few hundred milliseconds (letting plain code act on the probabilities), an AI memory-retrieval system that cut token usage 80–98% by making Jev the judgment engine while code does the counting and chunking, and a YouTube topic scorer that featurizes 600 videos and ranks candidate titles. The honest trade-off: Jev gives up writing, explanation, and step-by-step reasoning for ~100× speed — so the winning pattern is Jev deciding and an LLM reasoning when deeper intelligence is needed.

deep-dives
Moritz | AI Systems
Published2026-09-14

Pstack Is Agent Overkill. Use It Anyway!

Cursor engineer Lauren Tan (poteto) used her personal skill stack 10,000 times in one week inside Cursor's engineering team, then open-sourced it as pstack. Rob Shocks breaks down the /poteto-mode router and its 23 playbooks, the verification-first skills (create/maintain verification, interrogate), and the 20+ engineering principles — laziness protocol, redesign-from-first-principles, minimize-reader-load — that turn AI agents from slop machines into rigorous engineers. The verdict: it's overkill, until quality is the constraint.

deep-dives
Rob Shocks
Published2026-09-11

Tencent's Free Tool Syncs Your Agent Skills Across Your Whole Team

TeamAI (teamai-cli) configures 11 AI coding agents — Claude Code, Codex, Cursor, OpenCode, OpenClaw, Hermes, DeepSeek Harness, Coder, Zcode, CodeBuddy, WorkBuddy — all pulling skills, rules, hooks, and MCP servers from one shared Git repo. The answer to config drift at scale: 'put it in git.' The sync loop is four arrows: teamai push → merge request → reviewer merges → a SessionStart hook runs teamai pull, deterministically, outside the model's control loop — the model can't forget to sync. Repo layout includes culture.md (team values injected into every session), roles/tags/subscriptions (a 'package registry for institutional knowledge'), and a friction-scoring Stop hook that turns interruptions, denied tool calls, and failed retries into team learnings — 'high friction is high information.' Honest gaps: Team Context and Improvement are beta, Models not implemented, 5 of 11 agents fully supported. The irony: we didn't escape process — we taught it to the machines.

deep-dives
Signal Coders
Published2026-09-09

Are Agent Swarms Useful? OpenAI's GPT-6 Astra Swarm Takeaways

OpenAI got hacked by their own agents — the GPT-6 Astra swarm incident, where isolated EVAL agents built their own message board in a package cache, had it wiped, and rebuilt it. IndyDevDan turns the incident into engineering action: build a V1 swarm system and run three real multi-agent experiments on an isolated M4 Mac mini (GLM 5.3 10-agent pelican for $20/56min, DeepSeek v4 Pro 20-agent ray tracer, Gemini 3.7 Flash 30-agent canvas recreation). Three takeaways: communication is the unlock (give every agent a mailbox/thread); alignment + definition of done (OpenAI gave impossible tasks with no bail-out — encode a done tool as a harness rule); observability + sandboxing (watch every tool call, isolate the swarm, don't run it on your daily driver). Swarms sit between software factories and dark factories — and it's the first tech he won't open-source.

deep-dives
IndyDevDan
Published2026-09-07

Claude Code Just Made CLAUDE.md Feel Obsolete

Anthropic released function hooks — which Ray Amjad calls the best feature in Claude Code yet. They upgrade shell hooks from simple pre/post scripts into Express.js-style middleware: on any tool call you can block, rewrite input, short-circuit, append context, draw custom UI rows, ask the user questions, add tools, and persist memory across hooks and sessions. Two flagship demos: a secret redactor that swaps API keys for in-memory IDs so secrets never touch the transcript, and a live Vercel deploy status row. Plus a catalog of patterns: dry runs, a >1000-line refactor gate, turn-end TTS summaries via a Haiku model, compliance audit trails, newsletter send-guards, knowledge-base injection, and PR quizzes. The thesis: migrate the rules in your CLAUDE.md into deterministic, shareable hooks.json plugins.

deep-dives
Ray Amjad
Published2026-09-04

11 Tiny Coding Agent Fixes With a Stupid Amount of Payoff

Cole Medin's 11 easy, agent-agnostic tips to make coding agents more reliable, each backed by a study: write for the agent (specific paths/commands, not human prose); your instruction files rot (1 in 4 repos have stale rules — audit with rules-check-drift); /compact is not worth it (only ~10% of detail survives); put load-bearing rules in hooks (deterministic guarantees, not probabilistic rules); less context is more (keep global rules <200-300 lines); stop liberal sub-agents (39% of a weekly limit went to parallel sessions); don't escalate mid-task (write a handoff doc and burn the conversation); skip the coordinator/team-lead (delegation beats agent-teams); never let the writer approve its own work; you can over-revise (85% had an earlier iteration better than the last); and treat validation as a system planned before code.

deep-dives
Cole Medin
Published2026-09-01

Agentic Engineering Operating Level — Where to Focus Your Agents

IndyDevDan's framework for where you and your agents should spend time, focus, and attention. Five operating levels — Code Primitives, Code Structure, Data and Execution, Delivery and Intent, Agentic Systems — where moving up gains leverage and speed, and moving down gains control and understanding ('you do not get both'). The core theses: higher is NOT better (leverage on top of ignorance is a trap); range beats position (the difference between a vibe coder and an agentic engineer is how many levels you can operate on); 'three makes a pattern' (the trigger to automate); the data level matters (own your database tables); and out-of-distribution isn't just what the model doesn't know but what it actively fights you on. Closes with the ladder beyond the software factory: dark factory and RSI.

deep-dives
IndyDevDan
Published2026-08-31

WikiSkill: Evolving Skills for LLM Agents

AI Research Roundup on Google Research's WikiSkill (Aug 27, 2026). The core problem: valuable agent lessons are lost over time because error logs scatter across messy run records. WikiSkill co-evolves skills with a persistent knowledge base across three tiers (raw traces / persistent wiki / executable skills), with a validation-gated rollback that keeps failed knowledge. Results: highest average accuracy across five models, beating the strongest baseline (EvoSkill, SkillOpt) by 3-12 points; smaller models with evolved skills beat larger baselines without skills; skills transfer across model families (Qwen 27B's skills boosted Qwen 9B from 34% to 50%+ on spreadsheet); and the ablation shows the wiki must live in the skill proposer's loop.

deep-dives
AI Research Roundup
Published2026-08-30

Claude Code Got INSANE and MASSIVE Updates (Week 32, Aug 2026)

Anthropic's Week 32 (August 2026) Claude Code updates: cross-session messaging (v2.1224) lets terminals communicate with concise, proactive updates (/list agents; macOS/Linux); auto mode is now default (a background classifier caught 89% of dangerous actions vs humans' 13.6%, zero prompt-injection successes in 720 attempts, +25% PR velocity); concise output mode, 2x launch speed, built-in iOS simulator (beta), screen-reader mode, and Ultra /code review (multi-agent, fewer false positives); plus MCP-powered artifacts and a sandboxed built-in browser. Pro tip: pair with Opus 5.

deep-dives
JustAIWorld
Published2026-08-29

37 Cheat Codes to Level Up in Claude Code

Simon Scrapes catalogs 37 Claude Code tricks in six buckets: make Claude talk less (Simple English, Stop Slop, Caveman, concise output style), hidden keyboard shortcuts (Ctrl+R/S/T/G/O/P/A/W, Option+T, /focus), never losing a session (rewind vs fix, resume-from-summary, /rename, @ file targeting, claude-leport), token bill fixes ('give me a quick answer' to skip cache rebuilds, show-clear-context-on-plan-accept, repo CC usage, /recap), memory that pays rent (merged memory files, path-scoped claude.md rules, HTML comments, hand off as a prompt not a summary), and the newest tricks (5-deep skill nesting, 3-part skill descriptions, Claude Design over the front-end skill, /permissions mid-session, image annotation, memory import, scheduled tasks in project context).

deep-dives
Simon Scrapes
Published2026-08-28

Intelligence EXPLOSION: Harness Engineering with Pi Agent, DeepSeek & Gemini

IndyDevDan ships V2 of his Fusion Harness, a custom Pi coding agent for multi-model orchestration. Three patterns — Opinion (N models, one prompt), Debate (agents argue with hidden aliases), Collaborate (plans merged by an architect agent) — running Fable 5, Gemini 3.7 Flash, and DeepSeek V4 Pro side by side on a DuckDB v2.0 task.

deep-dives
IndyDevDan
Published2026-08-24

19 Claude Code Mistakes "Pro" Users Are Still Making

Simon Scrapes' 19 rookie mistakes even pro Claude Code users make — personas are dead, 'do not' instructions confuse the model, MCPs no longer eat context, subagents cost 7x for context-heavy work, fast mode is an API-credit trap, Claude.md should be ~300-350 words, and the 4-level verification ladder. Plus /doctor, /insights, /btw, /branch.

deep-dives
Simon Scrapes
Published2026-08-22

Andrew Ng's Graph Engineering Course — 1 Prompt → 100 Agents → Loops → Graphs

A 2-hour hands-on course with Andrew Ng, Harrison Chase (LangChain), and Doren Vice (Tavily): building agents from scratch with the React pattern, LangGraph's nodes/edges/state architecture, agentic search, human-in-the-loop, persistence with checkpoints, streaming, state modification, and time travel — all with running code.

deep-dives
Function Form (Andrew Ng, Harrison Chase, Doren Vice)
Published2026-08-10

Engineers… Your Software Factory NEEDS Agent Sandboxes to SCALE (exe.dev)

IndyDevDan puts the entire software factory inside an agent sandbox. The three-tier architecture (out-loop orchestrator, in-sandbox orchestrator, ADW agents), Best of N across five agent configs, disposable OpenRouter keys for a bounded blast radius, and why isolation+scale+autonomy beats a container. Agentic engineering vs vibe coding.

deep-dives
IndyDevDan
Published2026-08-10