Skip to content

Remove post-compaction AGENTS.md injection pipeline (#258)#272

Merged
alexey-pelykh merged 2 commits intomainfrom
gut-post-compaction-agents-md-injection
Mar 5, 2026
Merged

Remove post-compaction AGENTS.md injection pipeline (#258)#272
alexey-pelykh merged 2 commits intomainfrom
gut-post-compaction-agents-md-injection

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Delete post-compaction-context.ts and its test — readPostCompactionContext() which read workspace AGENTS.md and injected it as a system event after compaction
  • Delete post-compaction-audit.ts and its test — audit pipeline that checked whether agents read required files post-compaction (only caller was the injection in agent-runner.ts)
  • Remove injection block and audit block from agent-runner.ts, plus the now-unused enqueueSystemEvent import and pendingPostCompactionAudits map

This is Pi-era layer blurring: middleware should not read workspace files to inject into agent sessions. CLI agents manage their own context and compaction.

Closes #258

Test plan

  • grep -ri "readPostCompactionContext\|post-compaction-context\|post-compaction-audit" src/ returns zero hits
  • Build passes (pnpm build)
  • Tests pass (pnpm test — pre-existing flaky Telegram media test failures unrelated)

🤖 Generated with Claude Code

Delete readPostCompactionContext and post-compaction audit — Pi-era
layer blurring where middleware read workspace AGENTS.md to inject
into agent context after compaction. CLI agents manage their own
context; middleware should not read workspace files.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) March 5, 2026 10:38
@alexey-pelykh alexey-pelykh merged commit 3fda2a4 into main Mar 5, 2026
3 checks passed
@alexey-pelykh alexey-pelykh deleted the gut-post-compaction-agents-md-injection branch March 5, 2026 12:38
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.

GUT post-compaction AGENTS.md injection

1 participant