agentscope-ai / agentscope-ai/agentscope-java

[Feature]: Add loop mechanism to recheck context after compression

Offen
#856 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/ext/memory enhancement
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
1.3k
Ø Merge
4 T. 12 Std.
Gemergte PRs (30 T.)
77

Beschreibung

## Problem Description

The `compressIfNeeded()` method currently returns `true` immediately after any compression strategy succeeds, **without checking if the
context still exceeds the threshold after compression**.

## Current Behavior

```java
// Strategy 1-6 are tried sequentially
if (strategy1()) return true; // Returns immediately, no recheck
if (strategy2()) return true;
...
// All strategies failed
log.warn("All compression strategies exhausted but context still exceeds threshold");
return false;

Issue Scenarios

1. Insufficient compression: Strategy 1 compresses tool calls, but context still exceeds threshold after compression

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.