Commit Graph

10 Commits

Author SHA1 Message Date
usr-bin-roygbiv 7fff8869a0 fix: skip unauthenticated compaction candidates
(cherry picked from commit fa5f7d73ec1f169f9b9952648195057caa24657e)
2026-07-30 01:42:53 +02:00
usr-bin-roygbiv 66c8f27d23 style(compaction): format fallback repairs
(cherry picked from commit bf909c728adf80b1ad4c70f79701f6057138c6d9)
2026-07-30 01:42:33 +02:00
usr-bin-roygbiv c83e506954 fix(compaction): require native-capable fallbacks
(cherry picked from commit 6ac4efd9d2fe37fb50be6e9ba6664e8924bce602)
2026-07-30 01:42:33 +02:00
usr-bin-roygbiv fe59a27cc8 style(coding-agent): format advisor fallback tests
(cherry picked from commit 09cf89422eaa39319652d55a502412125c94856e)
2026-07-30 01:42:33 +02:00
usr-bin-roygbiv 28e738830d fix(compaction): align advisor provider boundary
(cherry picked from commit 771a9917caa2630b96e8fd8f6f8d73d5462242d3)
2026-07-30 01:42:33 +02:00
usr-bin-roygbiv eeb542b2ef fix(advisor): stop provider fallback on native compaction failure
(cherry picked from commit c636aa6be3f12eed9475bb2e1aa6a03749049523)
2026-07-30 01:42:19 +02:00
Paolo Mazzitti 3c7233af44 fix(coding-agent): scope advisor cost to active session 2026-07-29 07:18:48 +00:00
Paolo Mazzitti 9d240ea0ad feat(coding-agent): show advisor cost separately in the status line
Render the Advisor spend next to the primary-model cost as `$2.67 (sub) + $0.41 (adv)`, leaving the status line unchanged until an Advisor cost exists.

Record the cost from finalized advisor `message_end` events in a per-session ledger instead of deriving it from the live advisor transcript, so an in-session compaction or any other history rewrite no longer resets the reported spend. The ledger is cleared for a new session and once a different-session switch commits, and survives a switch that rolls back.
2026-07-27 13:52:22 +00:00
roboomp f6a93a34b4 fix(advisor): forwarded session metadata to overflow compaction
The advisor overflow-compaction one-shot calls compact() directly, bypassing the advisor Agent and its metadata resolver, so it omitted metadata.user_id. Resolve the advisor's session metadata per candidate provider (after credential selection) and pass it into the compact() options alongside sessionId/promptCacheKey. Add a regression test asserting the direct compaction request carries the advisor session id.
2026-07-25 17:49:21 +00:00
roboomp cc9977cce4 fix(advisor): anchored context maintenance on provider usage
- Anchored advisor compaction on provider-reported context usage (cached
  input + generated output) floored by a full local estimate including the
  advisor system prompt and tool schemas, so a near-full cached context is no
  longer undercounted by the per-message estimate.
- Rejected stale provider usage retained across advisor compaction via a
  runtime-only usage-anchor boundary recorded on the summary message.
- Recovered provider overflow by clearing only the advisor's own context at
  the current primary cursor, retrying the bounded failing batch once against
  a fresh context without replaying old primary history, and keeping later
  updates eligible.
- Threaded the selected dashboard range through the stats Recent Errors UI,
  API, and database timestamp filter before ordering and the 50-row limit.

Fixes #5282
2026-07-14 17:58:19 +00:00