Skip to content

Conversation

@kavehmz
Copy link

@kavehmz kavehmz commented Jun 5, 2025

Related GitHub Issue

Closes: #4281

Description

Adding a Disable automatic context clearing (Sliding Window) to Experimental settings

More complex use of Roo might not tolerate any kind of cleaning.
With recent model development, they can work autonomously for longer time which needs some kind of guranarty of context in some situations.

Test Procedure

Sending a few large messages to fill the context and if option is disable expecting an error.

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
  • Testing:
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Screenshot 2025-06-05 at 12 16 42

Important

Add experimental feature to disable automatic context clearing (sliding window) in the application settings and update related tests.

  • Feature Addition:
    • Add disableSlidingWindow to experimentIds and experimentsSchema in experiment.ts.
    • Implement disableSlidingWindow in truncateConversationIfNeeded() in sliding-window/index.ts to skip truncation if enabled.
    • Update Task class in Task.ts to check disableSlidingWindow experiment before truncating.
  • Settings and Configuration:
    • Add disableSlidingWindow to WebviewMessage types in WebviewMessage.ts.
    • Update globalSettingsSchema in global-settings.ts to include disableSlidingWindow.
    • Add DISABLE_SLIDING_WINDOW setting in settings.json.
  • Testing:
    • Add tests for disableSlidingWindow in sliding-window.test.ts.
    • Update experiments.test.ts to include disableSlidingWindow.
    • Modify ExtensionStateContext.test.tsx to handle disableSlidingWindow.

This description was created by Ellipsis for 640d849. You can customize this summary. It will automatically update as commits are pushed.

…imental settings

More complex use of Roo might not tolerate any kind of cleaning.
With recent model development, they can work autonomously for longer time which needs some kind of guranarty of context in some situations.
@kavehmz kavehmz requested review from cte and mrubens as code owners June 5, 2025 10:18
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 5, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 5, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 5, 2025
@daniel-lxs
Copy link
Member

daniel-lxs commented Jun 7, 2025

Hey @kavehmz, thank you for your contribution!

I honestly think is not a good idea to disable safety features like this, this will make Roo Code fail consistently when the context is completely filled. The model is always aware of the context window, you can give it custom instructions to fully stop when certain percentage is reached.

The main issue is that someone might forget they have this on and find out that Roo Code no longer handles full context windows appropriately.

I'll be closing this PR for now but feel free to continue the discussion by creating an issue with your proposal.

@daniel-lxs daniel-lxs closed this Jun 7, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jun 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 7, 2025
@kavehmz
Copy link
Author

kavehmz commented Jun 8, 2025

Sure, @daniel-lxs. I will use my fork for now.
But note, clearing history is not a “safety feature.” Maybe only for a vibe coder.
There are newer areas where Roo can be used (like ours) that need a very accurate history. We cannot tolerate any history changes (whether by sliding window or summarization).

If Roo wants to be used in those areas, I need a safety measure that, when I leave it for an hour or so, it will not touch the history, and I am much safer seeing an error instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants