Skip to content

fix: preserve read_file results during micro_compact#72

Closed
stablegenius49 wants to merge 1 commit intoshareAI-lab:mainfrom
stablegenius49:pr-factory/issue-62-preserve-read-file-context
Closed

fix: preserve read_file results during micro_compact#72
stablegenius49 wants to merge 1 commit intoshareAI-lab:mainfrom
stablegenius49:pr-factory/issue-62-preserve-read-file-context

Conversation

@stablegenius49
Copy link
Copy Markdown

@stablegenius49 stablegenius49 commented Mar 11, 2026

Summary

  • keep older read_file tool results intact during micro_compact so file contents remain available as reference material
  • continue compacting older non-read_file tool outputs to placeholders
  • add a regression test for the loop-inducing case and regenerate the lesson site extraction artifacts

Testing

  • python3 -m unittest tests/test_s06_micro_compact.py -v
  • python3 -m py_compile agents/s06_context_compact.py
  • cd web && npm run extract
  • cd web && npm run build

Closes #62

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 11, 2026

@Diaz-julieta is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

CrazyBoyM added a commit that referenced this pull request Mar 29, 2026
Skip compacting read_file tool outputs since they are reference material.
Compacting them into placeholders forces the agent to re-read the same
files, creating loops. Other tool results are still compacted normally.
@CrazyBoyM
Copy link
Copy Markdown
Contributor

Applied the micro_compact preservation fix manually to current main. The PR was based on old code that would revert PRs #110 and #118.

@CrazyBoyM CrazyBoyM closed this Mar 29, 2026
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.

s06 micro_compact may lead to agent looping

2 participants