backpass: Gradient Descent for AGENTS.md and CLAUDE.md

X postKun ChenTool

Kun Chen recommends against immediately rewriting CLAUDE.md or AGENTS.md when switching to newly released AI models. Instead, teams should keep their existing setup initially and use the open-source CLI tool backpass to propose evidence-backed refinements derived from session transcripts.

Key points

  1. Chen suggests retaining current instructions after model updates to collect real-world transcripts before updating agent memory files.
  2. The open-source tool backpass models AGENTS.md and project skills as weights, agent runs as forward passes, and on-disk transcripts as loss signals.
  3. The tool operates locally by reading logs from seven agent harnesses, redacting obvious secrets and delegating model calls via acpx without dedicated API keys.
  4. Proposed edits are strictly evidence-gated, requiring direct quotations and support from at least two separate sessions before suggesting changes.
  5. Analysis never writes to disk automatically; the backpass apply command requires human review and explicit acceptance for each diff.

Why it matters

Successive model generations frequently solve issues that previously required explicit prompt workarounds, wasting context budget. Using actual failure logs to tune agent instructions turns manual prompt editing into a repeatable, data-driven workflow.

Analysis

backpass bridges developer agent usage and systematic prompt maintenance. By treating session transcripts as raw training data and requiring multi-session proof for each proposal, it mitigates prompt drift while keeping the human firmly in control of the codebase memory.

Original post

Kun Chen

@kunchenguid · 5 September 2026

all the new model releases reminded me that you should update your CLAUDE.md and AGENTS.md after switching to the new models my recommendation is to keep what you have first, use it with the new models for a while, then run backpass t.co/XNwEKuf6O6 to self-improve based t.co/DxZEFeb6tf

332 likes14 replies633 bookmarks57.2k views

View on X
More posts in the thread (3)
  1. @tinkermight haha naming is hard
  2. @wabzqem it’s also kind of like “we are setting up a new office and hiring new employees. let’s refresh our onboarding and handbooks”
  3. @JamieBrock19060 backpass does all that as well
Selected replies (5)
  • @JamieBrock19060 @kunchenguid Not only should you update your CLAUDE.md and AGENTS.md, but you should have the model audit your installed skills and produce retain / slim down / consolidate / retire recommendations, with instruction repairs reserved for skills worth keeping.
  • @seanrobbins_ @kunchenguid Will give this a shot like most of the things you build and recommend
  • @tinkermight @kunchenguid call it “backpass” is bit academia, not everyone knows what it means
  • @wabzqem @kunchenguid I was about to complain that engineers shouldn't be expected to do this, then realised that this is the new "new version of Kotlin just landed, learn all the new language features"
  • @patrickcarlyle @kunchenguid @wabzqem Great analogy.

Links and tools from this entry

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Article:Kun Chen

    Treating AGENTS.md as a Neural Net: Kun Chen Introduces Backpass

    Kun Chen argues that project-level memory files like AGENTS.md or CLAUDE.md should be treated as neural network weights. Rather than manually appending rules based on anecdotes, he applies a gradient-descent loop driven by actual session transcripts, implemented in the open-source CLI tool backpass.

    AI & LLMs· Tool

  • Repository:kunchenguid/backpass

    backpass: Gradient Descent for Agent Memory and AGENTS.md

    backpass is an open-source CLI tool that parses local agent transcripts to propose evidence-backed updates to project memory files like AGENTS.md or CLAUDE.md.

    776starsJavaScript

    AI & LLMs· Tool

  • X post:Kun Chen

    Optimising AI Agent Skills via Backward Pass over Transcripts

    Kun Chen advocates systematically optimising AI assistant memory and skill files using a 'backward pass'. Instead of reacting to one-off anecdotes, large samples of session transcripts should be analysed to distill losses and update skills systematically.

    378bookmarks9.5kviews

    AI & LLMs· Discussion

  • X post:Kun Chen

    Treating AGENTS.md like a neural net: Kun Chen's guide to agent memory files

    Kun Chen proposes an engineering framework for managing AGENTS.md and CLAUDE.md files: user-level preferences should be handwritten, while repository-level instructions should be treated like a neural network with a strict token budget and refined via backward passes on real session transcripts.

    2.8kbookmarks93.5kviews

    AI & LLMs· Opinion

  • X post:PostHog

    The Evolving Role of AGENTS.md and CLAUDE.md Context Files

    This discussion explores the effectiveness of using context files like AGENTS.md or CLAUDE.md to guide AI coding assistants. While some developers find them essential for project-specific instructions, others argue they often become technical debt that grows stale and hinders model performance.

    1.1kbookmarks48kviews

    AI & LLMs

  • Article:Anthropic

    How Claude Code Retains Project Context: CLAUDE.md and Auto Memory Explained

    Anthropic outlines the memory architecture of Claude Code. Because every session starts with a clean context window, the CLI tool relies on two complementary systems: user-defined CLAUDE.md files for explicit instructions and an auto memory feature that records learnings from user feedback.

    AI & LLMs· Resource

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.