Skip to content

chore(agents): trim rules to save context overhead - #22923

Open
isaacs wants to merge 1 commit into
developfrom
isaacs/shrink-agents-md-context-overhead
Open

chore(agents): trim rules to save context overhead#22923
isaacs wants to merge 1 commit into
developfrom
isaacs/shrink-agents-md-context-overhead

Conversation

@isaacs

@isaacs isaacs commented Jul 31, 2026

Copy link
Copy Markdown
Member

Found by claude doctor as a significant source of context usage, leading to more frequent compaction.

Trim details out of the AGENTS.md file to only include what agents can't already infer. This saves a few thousand tokens of context used in every session.

The package script table, package layout listing, and skill index all restated things agents read anyway: root package.json, the packages/ tree, and .claude/skills/. Each one costs context on every session and goes stale on every rename.

Keep only the parts that aren't discoverable: packages/types is deprecated, and an AI provider integration spans three packages. Everything else points at the source of truth.

Found by `claude doctor` as a significant source of context usage,
leading to more frequent compaction.

Trim details out of the AGENTS.md file to only include what agents can't
already infer. This saves a few thousand tokens of context used in every
session.

The package script table, package layout listing, and skill index all
restated things agents read anyway: root `package.json`, the `packages/`
tree, and `.claude/skills/`. Each one costs context on every session and
goes stale on every rename.

Keep only the parts that aren't discoverable: `packages/types` is
deprecated, and an AI provider integration spans three packages.
Everything else points at the source of truth.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants