fix(agentmain): make /resume fall back to L4 archives (closes #630)#653
Open
Kailigithub wants to merge 1 commit into
Open
fix(agentmain): make /resume fall back to L4 archives (closes #630)#653Kailigithub wants to merge 1 commit into
Kailigithub wants to merge 1 commit into
Conversation
Closes lsdefine#630 The /resume prompt hardcoded 'read temp/model_responses/' and broke once memory/L4_raw_sessions/compress_session.py archived the raw txt files into monthly zips and all_histories.txt. Tell the agent to fall back to those artifacts when the live directory has fewer than 5 files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #630:
/resumestops listing historical sessions after L4 archival(
memory/L4_raw_sessions/compress_session.py) has run.The
/resumehandler inagentmain.pyhardcoded the prompt to readtemp/model_responses/, but the archival pipeline deletes the raw.txtfiles once it has merged them into
all_histories.txtand the monthly{YYYY-MM}.ziparchives. The data is still recoverable — the agent justisn't told to look for it.
Fix
Single-source change in
agentmain.py: extend the/resumeprompt so theagent falls back to the L4 archives when fewer than 5 files remain in
temp/model_responses/.Verification
/tmp/test_issue_630.pychecks (a) the old prompt string is gone,(b) the new prompt mentions
all_histories.txt,memory/L4_raw_sessions,{YYYY-MM}.zip, and the fallback threshold, and (c) the/resumebranchis still wired. Three-step dance (stash → test fails → pop → test passes)
confirms the test catches the regression.
Scope