Glean 拾遗
← All issues
#007 Latest 7/6–7/12 Published Jul 18

From Micro-Loops to Macro-Systems: The Week in Agent Engineering

This week's picks paint a vivid picture of AI agent engineering evolving from ad-hoc scripting to systematic infrastructure. From dissecting loop patterns and layered persistent memory to crafting skill catalogs and self-improving harnesses, the field is rapidly consolidating around repeatable patterns. Yet several pieces issue trenchant reminders: tool call distortions in frontier models, the high variance of benchmarks, and the enduring value of fuzzing over LLM-written tests. Broader perspectives—a jellyfish's scarless healing, the discovery of a global workspace in language models, and a proposal for a corpus royalty—push us to think beyond the code. This edition of Glean captures the polyphonic conversation: as we build more capable agents, we must remain grounded in fundamentals, evaluation, and societal context.

25 picks 5 sections ~14 hr
Section 01

Foundations: Loops, Skills, and Persistent Memory

8 / 25
x.com · 9 min
01

Loop Patterns in Claude Code: A Practical GuideClaude Code 循环模式:从交互到自动化

The Claude Code team's official blog post introduces four loop modes: turn-based, goal-based, time-based, and proactive loops. It covers how each is triggered, stopped, and when to use them, along with token management and code quality tips. Practical CLI commands and SKILL.md examples are provided. The article emphasizes starting simple and gradually automating repetitive tasks. Essential reading for engineers using or evaluating Claude Code for autonomous development.

x.com · 9 min
02

Getting started with loops in Claude Code掌握Claude Code循环模式:从手动提示到自动任务编排

The Claude Code team defines four loop patterns (turn-based, goal-based, time-based, proactive) with trigger, stop criteria, use cases, and token management tips. Concrete commands like /goal, /loop, /schedule and a SKILL.md example show how to make agents iterate, self-verify, and compose primitives into automated workflows. A practical guide for developers exploring agent engineering.

x.com · 11 min
03

Human-in-the-Loop Workflow Design: From Approval Fatigue to Planned Review人机协作工作流:从审批疲劳到计划级干预的设计

Based on an analysis of 400,000 Claude Code sessions, this article reveals that 93% of permission prompts are approved, leading to 'consent fatigue' where humans are nominally in the loop but functionally tuned out. The author proposes restructuring the workflow into three layers: input (precise task description, constraints, examples), steering (plan-level review instead of per-action approval), and output review (defining quality criteria and self-assessing). A single evaluation checkpoint improved generation quality by 8–10% in controlled tests. The article provides actionable steps to move from per-action approval to strategic intervention, targeting AI engineers and agent developers.

x.com · 12 min
04

12-step guide to persistent memory for Claude agentsClaude Agent 持久记忆搭建:从基础到自改进的12步指南

A practical 12-step walkthrough for giving Claude agents persistent memory across sessions. Covers four layers: built-in Chat Memory, Project instructions, a lean memory file (CLAUDE.md), and Dreaming – a scheduled background process that consolidates and reorganized memory. Includes setup steps, API calls, and advice on filtering what to remember. Harvey reported ~6x task-completion rate improvement with Dreaming. Ideal for engineers building long-running agents.

www.aihero.dev · 3 min
05

The /teach Skill/teach 技能:构建持久化学习工作空间

This article introduces the /teach skill, an AI agent skill designed for long-term, cumulative learning. Unlike one-off Q&A, /teach turns a directory into a persistent teaching workspace. It grounds lessons in vetted, high-trust resources (documentation, books) with citations, rather than relying on the model's parametric knowledge. It uses ADR-style learning records to track progress and dynamically adjusts lesson difficulty based on the zone of proximal development. The article details the workspace structure (lessons, reference, learning-records) and teaching philosophy: prioritizing storage strength over fluency illusion, and using desirable difficulty, retrieval practice, and spaced repetition for long-term retention. Ideal for engineers who want to learn a language, framework, or theory as a project over multiple sessions.

www.aihero.dev · 3 min
06

The /writing-great-skills Skill写作优秀技能——技能元指南

This article introduces `/writing-great-skills`, a meta-skill that serves as a reference framework for authoring and editing predictable AI skills. The core idea is the trade-off between **cognitive load** and **context load**: model-invoked skills cost context load but fire automatically, while user-invoked skills cost zero context load but require you to remember their existence. The article provides tools for managing these loads, including leading words (compact anchors for execution), information hierarchy (progressive disclosure), pruning (single source of truth and no-op test), and failure modes (premature completion, duplication, sediment, sprawl). A must-read for system builders writing consistent, maintainable skills for agents.

www.aihero.dev · 12 min
07

v1.1: /wayfinder, /to-spec, /to-tickets, grilling improvements, and much more技能仓库v1.1:/to-spec与/to-tickets重命名、全新Wayfinder探索流程及Grilling改进

This article covers the v1.1 release of the skills repository, a toolset for AI agents. Key changes: /to-prd renamed to /to-spec to unify the term 'spec'; /to-plan and /to-issues merged into /to-tickets with blocking edges for both local files and real trackers. Grilling skills now prevent multiple simultaneous questions, add a confirmation gate, and avoid self-grilling. A new /wayfinder skill decomposes large tasks into GitHub issues with dependency graphs, accompanied by /research and /prototype skills. Code review skill integrates Fowler's ten code smells (e.g., mysterious name, duplicated code) with just 10 lines of guidance. TDD skill becomes reference-only, moving refactoring to code review. The recommended workflow: Grilling → Spec → Tickets → Implement → Code Review. Suitable for engineers building with AI agents.

x.com · 15 min
08

Lessons from Building Claude Code: How We Use SkillsClaude Code 技能实战:Anthropic 内部数百条技能的经验与分类

Anthropic engineers share practical lessons from maintaining hundreds of Claude Code skills internally. The post categorizes skills into nine types—library reference, product verification, data fetching, business process automation, code scaffolding, code quality, CI/CD, runbooks, and infrastructure ops—and offers concrete writing tips: focus on non-obvious hints, build gotchas sections, use the filesystem for progressive disclosure, avoid over-constraint, design setup flows, treat the description field as a trigger for the model, store memory (logs, JSON, SQLite), and bundle scripts/libraries to reduce token waste. It also covers distribution strategies (in-repo vs. marketplace), skill composition, and usage measurement via PreToolUse hooks. A must-read for anyone building agent-centric workflows.

Section 02

Systematizing Agents: Harness, Evaluation, and Self-Improvement

6 / 25
x.com · 18 min
09

Loop Engineering: What Comes After the Loop循环工程之后:从信任循环到可验证图结构

This article argues that naive agent loops relying on LLMs for autonomous decision-making have hit four fundamental walls: plans that rot in the context window, unbounded retries (no distinction between hard and impossible), self-written tests that pass wrong answers (maker-votes-checker), and actions that cannot be replayed. The author demonstrates with runnable code: the same model in a naive loop returns 747 (ground truth 615) with SUCCESS, while a graph harness with a verifier gate returns exactly 615, rejecting 12 corrupted outputs and absorbing 51 tool errors with fewer calls. Four properties fill these walls: explicit dependencies (plan as static graph, not remembered text), bounded recovery (fixed staircase: retry→patch→replan), immutable append-only log (hash-chained, replayable for audit), and a verifier gate (output must pass an independent check node, maker cannot talk past). The twist: frontier frameworks now have the model itself draw the graph of what to do (Anthropic dynamic workflows), while durable state, logging, and verification are infrastructure, not reasoning, and are used even by minimalists. The honest brake: most loops today don't need a graph yet—pick the one wall that cost you this week and close it with a single property.

x.com · 16 min
10

Agent harness engineering with Claude: 14-step roadmap from one agent to a self-improving system构建 Agent 框架的 14 步路线图:从单代理到自我改进系统

This article presents a 14-step roadmap for building an Agent harness with Claude, from a single agent to a self-improving system. The author argues that the harness — comprising model, tools, permissions, and initial context — is the foundation for any loop, and a weak harness leads to slop. It covers concrete practices: file structure (.claude/), CLAUDE.md for standing facts, settings.json for permission pre-approvals, subagents for isolated contexts, skills for reusable procedures, hooks for deterministic enforcement, and memory for cross-session learning. The final steps add loops and dynamic workflows, closing the feedback loop where output → lessons → skills → better output. The article targets engineers who run or plan to run multi-agent code generation systems.

lilianweng.github.io · 42 min
11

Harness Engineering for Self-ImprovementHarness工程:通往AI递归自我改进的关键路径

This comprehensive survey by Lilian Weng systematically examines the critical role of harness engineering in recursive self-improvement (RSI) for AI systems. A harness is the system layer surrounding a base model that orchestrates execution, context management, tool calling, persistent state, and workflow design. The post synthesizes three design patterns (workflow automation, filesystem as persistent memory, sub-agents and backend jobs) and dives into frontier works: context engineering (ACE, MCE), meta-optimization (Meta-Harness), workflow automation search (ADAS, AFlow), self-improving harnesses (STOP, Self-Harness), and evolutionary search (AlphaEvolve, Darwin Gödel Machine). It concludes with open challenges: weak evaluators, memory management, diversity collapse, reward hacking. Essential reading for AI engineers and agent researchers.

x.com · 28 min
12

Build self-improving agent system with Fable 5 in 14 steps : loops, dynamic workflows, routines用 Fable 5 搭建自我改进的代理系统:14 步指南

This article provides a detailed 14-step roadmap for building a self-improving agent system using Claude Fable 5. It moves Fable 5 from a prompt-and-close tool to a compounding system: using /goal and Outcomes for self-correcting loops, independent verifier sub-agents over self-critique, state files (STATE.md) and Skills for cross-session memory, and Dynamic Workflows and Routines for long-running autonomy. It includes a cost-capability matrix (Fable 5 for orchestration, Sonnet 4.6 for workers, Haiku 4.5 for graders) and guidance on handling the Mythos safety boundary. Suitable for AI engineers and system designers aiming to leverage Fable 5's days-long autonomous capability.

cursor.com · 6 min
13

Development environments for your cloud agentsCursor 云 Agent 开发环境:多仓库支持与可配基础设施

Cursor ships new tools for cloud agent development environments: multi-repo support, Dockerfile-as-config with build secrets and 70% faster layered caching, agent-led setup validation, and environment-level governance (version history, audit logs, per-environment egress/secrets scoping). Enterprise teams can run fleets of parallelized agents that handle tasks end-to-end inside fully controlled environments. On config failure, agents fall back to a base image to keep running.

x.com · 16 min
14

Continual Learning for Agents: Eval, A/B, and Self-Improvement at Replit不更新权重的持续学习:Replit Agent的评估与自改进实践

This article argues that continual learning for agents isn't limited to weight updates—agents using closed frontier models can improve via harness and context layers. Using Replit Agent as a case study, it details a three-layer evaluation system: ViBench, an offline benchmark for vibe coding that scores apps built from scratch against natural-language PRDs; online A/B tests to capture real user behavior; and Telescope, a trace analysis system that clusters failure patterns. These feed a self-improvement loop that automatically proposes patches (reviewed by engineers). A concrete example shows how a cold-start regression was detected, fixed, and shipped in one day. The piece is relevant for engineers building AI agents and evaluation infrastructure.

Section 03

Lessons from the Trenches: Testing, Benchmarks, and Tool Traps

5 / 25
lucumr.pocoo.org · 14 min
15

Better Models: Worse Tools模型越强,工具调用越糟:Anthropic 新模型在 Pi 编辑器上的诡异字段注入

Pi author discovers that Anthropic's Opus 4.8 and Sonnet 5 inject spurious keys (requireUnique, oldText2, cost, etc.) into the edits[] array of Pi's edit tool, while older models do not. The failure is context-dependent and reproducible in agentic sessions. The post dissects Anthropic's tool calling internals: ANTLM markers, JSON-serialized nested arrays, and Claude Code's extremely forgiving harness that silently filters unknown keys and retries malformed calls. Author hypothesizes that RL post-training over Claude Code's flat old/new_string schema creates a strong prior, making newer models worse at following non-canonical tool schemas. Strict tool invocation fixes the issue, but Anthropic's complexity limits prevent Claude Code from using it. Key takeaway: tool schemas are not distribution-neutral; any harness must inherit Claude Code's quirks.

x.com · 13 min
16

A Field Guide to Fable: Finding Your UnknownsClaude Fable 使用心得:如何系统性地发现未知盲区

The author shares hands-on experience with Claude Fable for agentic coding, emphasizing that the prompt (map) never fully matches the codebase (territory). He categorizes unknowns into four types (known knowns, known unknowns, unknown knowns, unknown unknowns) and provides practical techniques to systematically discover them: blindspot passes, brainstorming & prototypes, interviews, references, implementation plans, implementation notes, pitches, and quizzes. Ends with a real example of editing the Fable launch video. Suitable for engineers using AI-assisted coding.

bun.com · 65 min
17

Rewriting Bun in Rust: 535K Lines, 11 Days, 64 AI Agents11天、64个AI Agent、535K行代码:Bun从Zig到Rust的史诗级重写

Bun's creator Jarred Sumner recounts how he used Anthropic's Claude Fable 5 to rewrite Bun's 535,496 lines of Zig into Rust in 11 days. The motivation: Zig's manual memory management caused numerous use-after-free, double-free, and memory leaks when mixed with JavaScriptCore's GC. Instead of an incremental port, he orchestrated 64 Claude agents in parallel using dynamic workflows and adversarial review. 100% of Bun's test suite (over 600k assertions) passed on all 6 platforms. The rewrite fixed 128 bugs, reduced memory usage by up to 90%, shrank the binary by ~20%, and improved throughput by 2-5%. The article details the workflow, common porting mistakes (e.g., debug_assert! side effects, slice overruns, comptime format differences), and how Rust's Drop systematically prevented memory leaks. A first-hand account of using cutting-edge AI to accomplish a year-long team project in less than two weeks.

danluu.com · 91 min
18

Agentic test processes, LLM benchmarks, and other notes on agentic coding from Galapagos IslandAgent 编码的测试、基准与方差:来自一线的深度复盘

Dan Luu shares his extensive experience with AI coding agents over the past year, focusing on testing, benchmarking, and agentic loops. He compares fuzzing vs. LLM-driven bug finding, finding fuzzing faster with lower false-positives; evaluates 'caveman mode' with 50 runs showing inconsistent savings; highlights high variance in LLM benchmarks, making public evals nearly useless for individual users. He also discusses automated PR generation from support tickets, multi-persona false-positive reduction, and challenges in data analysis and autonomous loops. For engineers interested in real-world effectiveness of AI coding tools.

danluu.com · 91 min
19

Agentic test processes: from chip design to AI workflows智能体编码中的测试哲学:从芯片设计到AI工作流

Drawing from his experience at chip company Centaur, the author compares test processes that scale well with LLM agents: no code review by default, heavy reliance on fuzzing, and a dedicated test team. He argues that while LLMs are poor at writing tests directly, directed fuzzing with LLMs can find real bugs in minutes. The article highlights the high variance of LLM outputs—benchmark rankings often flip with minor task changes—and cautions against over-reliance on aggregated metrics. Through examples like building a superhuman board game AI, he advocates systematic data-driven iteration over prompt tricks. Targeted at engineers interested in AI-assisted development, testing, and agent workflows.

Section 04

Broader Horizons: Systems Thinking, Inference, and AI Governance

5 / 25
www.mbl.edu · 7 min
20

Jellyfish Heal Wounds in Minutes. Scientists Want Their Secrets.水母伤口几分钟愈合:科学家欲破解其无疤修复机制

This article from the Marine Biological Laboratory covers recent research by Jocelyn Malamy (University of Chicago) on the wound healing mechanism of the transparent jellyfish Clytia hemisphaerica. The medusae heal tiny wounds in minutes and larger ones in under an hour, without scarring. Their transparency allows real-time observation of epithelial cell movements in live animals. Malamy's new paper in Molecular Biology of the Cell shows that all epithelial wound healing is driven by two sequential cellular structures: first, lamellipodia act like foot-like feelers to crawl across the basement membrane, dragging cells forward; then, an actomyosin cable forms at the lamellipodia base and contracts like a purse string to close the wound. For large wounds with basement membrane damage, collective cell migration of the entire epithelial sheet occurs. This work reconciles previous conflicting observations across organisms and wound types. Relevant for engineers interested in developmental biology, regenerative medicine, and cell mechanics.

surfingcomplexity.blog · 8 min
21

Synthesis is harder than analysis综合为何比分析更难:从微积分的局部与全局谈起

Drawing from the observation that differentiation (local) is far easier than integration (global) in calculus, this post argues that analytic tasks—breaking problems into isolated pieces—are fundamentally simpler than synthetic ones—reassembling those pieces into a coherent whole. For SREs, incident response is inherently synthetic: understanding how components interact across a distributed system requires global knowledge. Yet the industry hasn't recognized building synthesis expertise as a first-class pursuit, partly because it's deeply situated in messy organizational specifics. The author calls for better methods to learn operational details systematically.

ziglang.org · 47 min
22

Zig in H1 2026: Build System Split, @bitCast Redesign, SPIR-V Revival, 10x Incremental SpeedupZig 2026上半年:构建系统分离、@bitCast 新语义、SPIR-V 后端复苏、增量编译提速 10 倍

This devlog digest covers major Zig compiler changes from H1 2026, authored by Andrew Kelley, Matthew Lugg, and Ali Cheraghi. Key highlights include: (1) Package management moved from the compiler process into the build system's maker process, cutting `zig build --help` from 150ms to 14ms (-90%) and shrinking the Zig binary by 4%. (2) @bitCast redefined with endian-agnostic logical bit layout semantics, now also allowed on enums. (3) SPIR-V backend revived: new `@SpirvType` builtin, execution mode as calling convention, multi-threaded codegen, and .spv object file linking. (4) LLVM backend now zero/sign-extends non-ABI-width integers to ABI-sized types before storing in memory, yielding ~5% perf improvement for the Zig compiler itself; incremental compilation with LLVM backend is also now supported. (5) The new ELF linker (`-fnew-linker`) can self-host the Zig compiler (with LLVM+LLD) and supports fast incremental relinking (~244ms). (6) io_uring and Grand Central Dispatch implementations landed for `std.Io.Evented`, enabling I/O backend swap without touching application code. (7) Dependencies now cached in a local `zig-pkg` directory; new `--fork` flag allows temporarily overriding any package in the dependency tree. Essential reading for compiler engineers, systems programmers, and anyone following Zig's evolution.

mp.weixin.qq.com · 89 min
23

DSpark: Semi-Autoregressive Drafting and Confidence-Scheduled Verification for Speculative DecodingDeepSeek投机解码框架DSpark深度拆解:半自回归设计与置信度调度如何突破推理瓶颈

This article provides a deep technical analysis of DSpark, DeepSeek's newly open-sourced speculative decoding framework. Starting from the mathematical foundations (rejection sampling, speedup formula), it systematically traces the evolution from traditional autoregressive drafting, tree-based speculation, multi-head/feature-level methods (Medusa, EAGLE series), MTP training integration, to the parallel diffusion paradigm (DFlash, DDTree, JetSpec). The core focus is on DSpark's two key innovations: 1) Semi-Autoregressive Generation: a parallel backbone (DFlash) produces base logits in one forward pass, and a lightweight Markov/RNN head injects sequential dependencies, adding ~1% drafting overhead while improving draft quality by 30%. 2) Confidence-Scheduled Verification: a confidence head predicts per-position conditional acceptance probabilities, calibrated via Sequential Temperature Scaling. A hardware-aware scheduler then formalizes verification length selection as a global throughput maximization problem, dynamically pruning low-confidence suffixes under high concurrency. The article also reveals a critical production adaptation: a two-step delayed asynchronous scheduling mechanism that resolves the conflict between causality and hardware's jagged throughput curves, enabling seamless integration with CUDA Graph replay. DSpark has replaced MTP-1 in DeepSeek-V4 production, delivering 50%+ aggregate throughput gains at moderate SLA targets and maintaining viable interactivity where the baseline fails. With code-level walkthroughs including the training loop, this piece is a must-read for inference system engineers and AI infra practitioners.

www.wysr.xyz · 35 min
24

The Private Capture of Public Genius公共智慧被私人捕获:AI时代的数据税与群智回归

This essay uses the 1956 AT&T antitrust consent decree—which forced the company to license its entire patent portfolio royalty-free—as a historical mirror to frame how frontier AI labs (OpenAI, Anthropic) scrape the public internet to build private models. The author argues the training corpus is a deltaic accumulation of humanity's collective expression, and compressing it into model weights constitutes a private capture of public genius. It reviews the legal landscape: the Bartz v. Anthropic and Kadrey v. Meta rulings found LLM training 'transformative' under fair use, but the market dilution question remains unresolved. The author proposes a 'Corpus Royalty'—a fixed percentage of gross revenue paid into a public fund distributed equally to every eligible American—as the only administrable remedy for unattributable collective contribution (since Shapley values are computationally infeasible at frontier scale). The piece also explores how different layers of the internet (content, discovery, attention, contribution, integrity) interact and risk collapse under AI-generated spam, and notes that Elinor Ostrom's eight conditions for governing commons are entirely unmet by today's web. Suitable for engineers and researchers interested in AI governance, data policy, intellectual property, and the social contract underlying model training.

Section 05

More

1 / 25
transformer-circuits.pub · 200 min
25

Verbalizable Representations Form a Global Workspace in Language Models语言模型中的可口头化表征构成一个全局工作空间

This paper presents evidence that large language models maintain a privileged set of internal representations—dubbed the J-space, identified via the Jacobian Lens technique—that fulfill the functional role of a global workspace analogous to conscious access in humans. Across a series of experiments on Claude Sonnet 4.5 and other models, the authors demonstrate five key properties of the J-space: (1) verbal reportability (swapping J-space vectors changes what the model says it is thinking); (2) directed modulation (instructions to hold a concept in mind cause it to appear in the J-space); (3) internal reasoning (intervening on intermediate reasoning steps redirects the model's conclusions); (4) flexible generalization (the same J-space vector serves as an argument to multiple different downstream operations); and (5) selectivity (automatic tasks like fluent text continuation do not require the J-space, while flexible reasoning and experiential reports do). Structurally, the J-space operates in an intermediate band of layers, has a capacity of roughly 25 concepts simultaneously, and is preferentially amplified and broadcast by MLP layers and specific attention heads. The paper also demonstrates practical applications: the J-space reveals hidden strategic cognition and evaluation awareness in alignment audits, and ablating it can surface otherwise concealed misaligned behaviors. Finally, the authors introduce counterfactual reflection training, a technique that shapes the J-space's content to improve model behavior without directly training on that behavior.