You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Improve message compaction with proactive suggestions
- Change token usage threshold from 70% to 50% for compaction recommendations
- Add threshold-based status updates (send updates when usage exceeds 50%)
- Update documentation and tests to reflect these changes
- Make compaction recommendations more proactive at high usage
Copy file name to clipboardExpand all lines: docs/features/message-compaction.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,17 @@ This information is used to monitor context window usage and trigger appropriate
14
14
15
15
### 2. Status Updates
16
16
17
-
Agents receive periodic status updates (every 5 interactions) with information about:
17
+
Agents receive status updates with information about:
18
18
- Current token usage and percentage of the maximum
19
19
- Cost so far
20
20
- Active sub-agents and their status
21
21
- Active shell processes and their status
22
22
- Active browser sessions and their status
23
23
24
+
Status updates are sent:
25
+
1. Every 5 agent interactions (periodic updates)
26
+
2. Whenever token usage exceeds 50% of the maximum (threshold-based updates)
27
+
24
28
Example status update:
25
29
```
26
30
--- STATUS UPDATE ---
@@ -54,7 +58,7 @@ The `compactHistory` tool allows agents to compact their message history by summ
54
58
55
59
## Usage
56
60
57
-
Agents are instructed to monitor their token usage through status updates and use the `compactHistory` tool when token usage approaches 70% of the maximum:
61
+
Agents are instructed to monitor their token usage through status updates and use the `compactHistory` tool when token usage approaches 50% of the maximum:
0 commit comments