Skip to content

fix(s08): prevent active request loss after snip_compact - #578

Open
ship-onward wants to merge 1 commit into
shareAI-lab:mainfrom
ship-onward:fix/s08-preserve-active-request
Open

ship-onward wants to merge 1 commit into
shareAI-lab:mainfrom
ship-onward:fix/s08-preserve-active-request

Conversation

@ship-onward

Copy link
Copy Markdown

Summary

Fixes #577

snip_compact() may archive the current user request during a long tool-use loop,
causing the agent to fall back to an older request.

This PR ensures that the active request remains visible after compaction.

Changes

  • Preserve the current active_request during snip_compact
  • Add a regression test for long tool-use conversations
  • Keep the existing context compaction flow unchanged

Testing

  • Added/updated tests/test_s08_context_compact.py
  • Reproduced the original three-prompt scenario
  • Confirmed Prompt 3 no longer falls back to Prompt 1
  • Existing behavior remains unchanged

AI Assistance

AI tools were used to assist with debugging and code review.
I reviewed, tested, and understand the submitted changes.

This branch has not been deployed

No deployments
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.

[s08_context_compact] Current user request may be lost after snip_compact

1 participant