@ai-agent-forge/agent-forge 0.86.0 → 0.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,6 +101,8 @@ export class AgentSession {
101
101
  _autoCompactionAbortController = undefined;
102
102
  // biome-ignore lint/correctness/noUnusedPrivateClassMembers: read and written via the agent-session-* submodule facade
103
103
  _overflowRecoveryAttempted = false;
104
+ // biome-ignore lint/correctness/noUnusedPrivateClassMembers: read and written via the agent-session-* submodule facade
105
+ _overflowTrimStage = 0;
104
106
  // Branch summarization state
105
107
  _branchSummaryAbortController = undefined;
106
108
  _branchSummaryPromise = undefined;
@@ -440,6 +442,7 @@ export class AgentSession {
440
442
  // This ensures the UI sees the updated queue state
441
443
  if (event.type === "message_start" && event.message.role === "user") {
442
444
  this._overflowRecoveryAttempted = false;
445
+ this._overflowTrimStage = 0;
443
446
  const messageText = contentText(event.message.content, "");
444
447
  if (messageText) {
445
448
  // Check steering queue first
@@ -501,6 +504,7 @@ export class AgentSession {
501
504
  const assistantMsg = event.message;
502
505
  if (assistantMsg.stopReason !== "error" && assistantMsg.stopReason !== "length") {
503
506
  this._overflowRecoveryAttempted = false;
507
+ this._overflowTrimStage = 0;
504
508
  }
505
509
  // Reset retry counter immediately on successful assistant response
506
510
  // This prevents accumulation across multiple LLM calls within a turn