fix(agents): stabilize overflow compaction retries and session context accounting (openclaw#14102) thanks @vpesh

Verified:
- CI checks for commit 86a7ecb45e
- Rebase conflict resolution for compatibility with latest main

Co-authored-by: vpesh <9496634+vpesh@users.noreply.github.com>
This commit is contained in:
Vladimir Peshekhonov
2026-02-13 00:53:13 +01:00
committed by GitHub
parent da55d70fb0
commit 957b883082
13 changed files with 148 additions and 21 deletions

View File

@@ -371,6 +371,7 @@ export async function runReplyAgent(params: {
}
const usage = runResult.meta.agentMeta?.usage;
const promptTokens = runResult.meta.agentMeta?.promptTokens;
const modelUsed = runResult.meta.agentMeta?.model ?? fallbackModel ?? defaultModel;
const providerUsed =
runResult.meta.agentMeta?.provider ?? fallbackProvider ?? followupRun.run.provider;
@@ -388,6 +389,7 @@ export async function runReplyAgent(params: {
sessionKey,
usage,
lastCallUsage: runResult.meta.agentMeta?.lastCallUsage,
promptTokens,
modelUsed,
providerUsed,
contextTokensUsed,