Skip to content

fix(gateway): aggregate usage cost across agents - #70205

Closed
luke-skywalker-open-claw wants to merge 2 commits into
openclaw:mainfrom
luke-skywalker-open-claw:codex/aggregate-usage-cost-agents
Closed

luke-skywalker-open-claw wants to merge 2 commits into
openclaw:mainfrom
luke-skywalker-open-claw:codex/aggregate-usage-cost-agents

Conversation

@luke-skywalker-open-claw

@luke-skywalker-open-claw luke-skywalker-open-claw commented Apr 22, 2026 •

Copy link
Copy Markdown

Summary

Describe the problem and fix in 2-5 bullets:

  • Problem: usage.cost scanned only one default transcript directory when callers did not pass agentId, while sessions.usage already discovered sessions across configured agents.
  • Why it matters: Control UI and menu usage views can show empty or partial daily cost data in multi-agent deployments even when session usage exists under other agents.
  • What changed: resolve the usage.cost agent scope from configured gateway agents, merge daily/totals across agents, include the resolved scope in the cache key, and preserve date-only daily labels in the Control UI.
  • What did NOT change (scope boundary): this does not implement the dedicated usage.jsonl storage proposal from Feature Request: Per-model usage logging for cost tracking #13219 or a separate cost-unit normalization pass; it addresses the confirmed cross-agent aggregation/scope mismatch reported in [Bug]: Usage dashboard shows total cost as millions of dollars while daily chart sums to ~$10-15 #41986.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause: usage.cost called loadCostUsageSummary without an agent scope, which resolves through the single-agent/default transcript directory instead of the configured gateway agent set.
  • Missing detection / guardrail: gateway tests covered multi-agent discovery for sessions.usage, but not the sibling usage.cost aggregate path, non-main default agent ids, or browser-visible daily usage rendering for date-only buckets.
  • Contributing context (if known): Feature Request: Per-model usage logging for cost tracking #13219 describes a broader usage tracking enhancement; this is a narrower current-state aggregate fix. fix(gateway): aggregate usage.cost across agents #42063 previously proposed the core aggregation direction, and this PR supersedes it with broader scope validation, cache scoping, UI, and partial-failure coverage.

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/gateway/server-methods/usage.sessions-usage.test.ts, src/gateway/server-methods/usage.test.ts, and ui/src/ui/views/usage-metrics.node.test.ts
  • Scenario the test should lock in: usage.cost without agentId calls the cost summary loader once per configured agent and merges daily/totals; explicit agentId remains scoped; configured default agents do not need to be named main; date-only daily buckets render with the same calendar day in the Control UI.
  • Why this is the smallest reliable guardrail: it exercises the gateway handler boundary, mocked transcript-cost seam, and UI date formatting behavior without needing real transcript files.
  • Existing test that already covers this (if any): none for multi-agent usage.cost.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

Multi-agent deployments should see usage.cost totals and daily entries aggregated across configured agents when no agentId is requested. Explicit agentId requests remain scoped to that agent. The Control UI daily usage chart should no longer show No data when cross-agent session usage exists, and date-only daily buckets no longer shift one day backward for users west of UTC.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

Before:
Control UI -> usage.cost(no agentId) -> one default transcript directory only -> Daily Usage: No data

After:
Control UI -> usage.cost(no agentId) -> configured agents -> merged daily/totals -> Daily Token Usage

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? Yes
  • If any Yes, explain risk + mitigation: usage.cost now reads the same configured agent session scopes that sessions.usage already reads. Explicit agentId requests are validated and remain scoped, and cache keys include the resolved agent scope.

Repro + Verification

Environment

  • OS: Linux
  • Runtime/container: host Node v25.9.0, pnpm 10.33.0
  • Model/provider: N/A
  • Integration/channel (if any): Gateway usage RPC and Control UI
  • Relevant config (redacted): agents.list = [{ id: "ops", default: true }, { id: "opus" }]

Steps

  1. Configure multiple agents with usage-bearing transcripts outside a single default transcript directory.
  2. Request usage.cost without agentId.
  3. Compare returned daily/totals with per-agent cost summaries and the Control UI Usage page.

Expected

  • The response includes merged daily/totals across configured agents.
  • The Control UI daily usage chart renders the merged daily bucket instead of No data.

Actual

  • Before this change, only one default transcript directory was scanned, so the Control UI could show Daily Usage / No data while sessions.usage showed activity.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Trace/log summary:

  • Before/live gateway 18789: usage.cost for 2026-04-22 returned daily: [] and zero totals, while sessions.usage for the same range returned a populated daily aggregate.
  • After/PR gateway 18790: usage.cost for 2026-04-22 returned a populated daily bucket with about 117M tokens and by-type breakdown.
  • Chrome MCP visual smoke on the PR gateway showed Daily Token Usage, Apr 22, April 22, 2026, and token-type breakdown rows instead of No data.
  • Chrome MCP visual smoke also verified the Cost toggle before/after: the official gateway still showed the daily chart as No data, while the PR gateway rendered Daily Cost, Apr 22, $111.24, and COST BY TYPE.
  • Screenshots are embedded in this PR description and are not committed to the codebase.

Screenshots:

Before, current official build showing the scrolled Daily Usage section with No data:

OpenClaw Usage before fix: scrolled Daily Usage shows No data

After, PR gateway 18790 showing the scrolled Daily Token Usage section populated for Apr 22:

OpenClaw Usage after fix: scrolled Daily Token Usage populated

Before, current official build with Cost selected still showing the daily chart as No data:

OpenClaw Usage before fix: Cost mode daily usage still shows No data

After, PR gateway 18790 with Cost selected showing Daily Cost populated for Apr 22:

OpenClaw Usage after fix: Cost mode Daily Cost populated

Prior Work / Credit

This PR supersedes #42063 by @stablegenius49 and carries forward its core direction: make usage.cost aggregate across configured gateway agents. The implementation here expands that work with explicit agentId validation/scoping, agent-scoped cache keys, partial per-agent failure handling, non-main agent coverage, UI date-label handling, and visual verification.

Suggested maintainer landing credit, if squashing or direct-landing this PR: (thanks @stablegenius49) or Co-authored-by: stablegenius49 <[email protected]>.

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: multi-agent usage.cost aggregate, explicit agentId scoping, invalid/out-of-scope explicit agentId rejection, cache behavior with agent-scoped cache keys, configured default agent not named main, first configured agent fallback, no-agent fallback to main, discovered disk agents when no list constrains the gateway, Control UI daily token rendering, and Control UI daily cost rendering against a PR-branch gateway.
  • Edge cases checked: bounded cache eviction, in-flight cache coalescing, gateway typecheck/lint/import-cycle guards, date-only bucket rendering under America/Sao_Paulo timezone.
  • What you did not verify: no known unverified items for this PR scope.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: more transcript directories may be scanned for unscoped usage.cost requests.
    • Mitigation: the gateway already uses the same configured agent list for sessions.usage, and usage.cost remains cached with the resolved agent scope included in the cache key.

AI Assistance

  • AI-assisted: Yes, implemented with OpenAI Codex.
  • Degree of testing: pnpm install --frozen-lockfile, git diff --check origin/main...HEAD, targeted gateway usage/UI Vitest shards (pnpm test src/gateway/server-methods/usage.sessions-usage.test.ts src/gateway/server-methods/usage.test.ts src/gateway/server-methods/usage.cost-usage-cache.test.ts ui/src/ui/views/usage-metrics.node.test.ts ui/src/ui/controllers/usage.node.test.ts ui/src/ui/usage-helpers.node.test.ts test/official-channel-catalog.test.ts), pnpm check:changed, pnpm build, Chrome MCP visual smoke against a PR-branch gateway including Tokens and Cost modes, and codex review --base origin/main at refreshed head c613510233 with no actionable findings. Current mergeable head e14c554f32 was refreshed with a normal merge from origin/main and revalidated with git diff --check origin/main...HEAD, the focused usage/UI tests, pnpm check:changed, and pnpm build.
  • Session logs/prompts: not attached.
  • Understanding: I reviewed the agent-scope and gateway usage paths; the production change aggregates the existing transcript-backed cost summaries across resolved gateway agent ids, preserves explicit agentId scoping, and fixes date-only daily label rendering.
  • Local Codex review: codex review --base origin/main was run locally and reported no actionable findings.

@greptile-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes usage.cost to aggregate transcript-backed cost summaries across all configured gateway agents (mirroring the existing multi-agent behavior of sessions.usage), and fixes a one-day backward label shift in the Control UI for users west of UTC.

The resolveCostUsageAgentIds / mergeCostUsageSummaries / loadCostUsageSummaryForAgents split is clean; agent-ID validation, cache-key scoping (now includes the resolved agent set), and error propagation are all handled correctly. Tests are thorough and cover the non-main default, first-agent fallback, disk-agent discovery, and timezone edge cases.

Confidence Score: 5/5

Safe to merge; all remaining findings are minor style suggestions.

No P0 or P1 issues found. The only inline comment is a P2 suggestion about deriving days from the time range directly rather than borrowing it from summaries[0], which is benign given that all per-agent summaries are always queried for the same range. Logic, error handling, cache scoping, and test coverage are all solid.

No files require special attention.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/gateway/server-methods/usage.ts
Line: 427

Comment:
**`days` taken from first summary only**

`params.summaries[0]?.days` works correctly when all per-agent summaries are requested for the same time range (they always are), so they all carry the same `days` value. However, if the first summary ever has a different `days` field (e.g. due to a future per-agent range override), the merged result silently drops the other summaries' values. A small guard—or deriving `days` from the requested range directly—would make the intent explicit:

```suggestion
    days: Math.ceil((params.endMs - params.startMs) / DAY_MS) + 1,
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(ui): preserve usage day labels" | Re-trigger Greptile

Comment thread src/gateway/server-methods/usage.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c302c13c6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/gateway/server-methods/usage.ts Resolved
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Apr 22, 2026
@luke-skywalker-open-claw

Copy link
Copy Markdown
Author

Ready for human review. The PR is up to date with main, CI is green, bot review threads have been addressed/resolved, screenshots are embedded in the description, and I ran local codex review --base origin/main with no actionable findings.

@prtags

prtags Bot commented Apr 23, 2026

Copy link
Copy Markdown

Related work from PRtags group known-caiman-exhw

Title: usage.cost should aggregate across configured agents

Number Title
#42063 fix(gateway): aggregate usage.cost across agents
#70205* fix(gateway): aggregate usage cost across agents

* This PR

@luke-skywalker-open-claw

Copy link
Copy Markdown
Author

Latest head fac506951 is refreshed against current main, scoped to the focused 6-file usage-cost diff, and all GitHub checks are green (57 pass, 7 skipped, 0 failed). Local validation also passed as recorded in the PR body, including targeted usage/UI tests, pnpm check, pnpm check:changed, pnpm build, and codex review --base origin/main with no actionable findings. Ready for human review.

@clawsweeper

clawsweeper Bot commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed June 14, 2026, 1:07 AM ET / 05:07 UTC.

Summary
The PR aggregates gateway usage.cost across configured agents and changes Control UI date-only usage labels to avoid timezone backshifts.

PR surface: Source +205, Tests +271, Docs +1. Total +477 across 7 files.

Reproducibility: yes. for the remaining UI date-label bug from source: current main still uses UTC construction for YYYY-MM-DD buckets, which can display the previous local day west of UTC. The original multi-agent cost mismatch is no longer reproduced from current-main source because Control UI and gateway now use agentScope: "all".

Review metrics: 1 noteworthy metric.

  • API scope contract: 1 existing all-agent parameter on main. Current main already uses agentScope: "all", so the PR must not make omitted agent ids imply broader aggregation during rebase.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase onto current main while preserving agentScope: "all" and background cache refresh.
  • [P2] Carry forward the date-only usage label fix and focused test on top of the current gateway path.
  • Remove the ordinary CHANGELOG.md edit because release generation owns changelog entries.

Mantis proof suggestion
A short visual proof of the Control UI Usage page is useful because the remaining user-visible behavior is a chart/date-label rendering fix. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify the Control UI Usage daily token/cost charts show the correct local date for YYYY-MM-DD buckets west of UTC.

Risk before merge

  • [P1] The branch is currently conflicting/dirty and its gateway diff predates current main's explicit all-agent API and background cache behavior.
  • [P1] Merging a mechanical conflict resolution that keeps the PR's unscoped aggregation would broaden existing usage.cost semantics compared with the documented agentScope: "all" contract.
  • [P1] Merging the stale gateway path could reintroduce expensive request-path transcript scans instead of current main's durable/background usage-cache refresh.

Maintainer options:

  1. Rebase as a narrow current-main repair (recommended)
    Keep current main's agentScope: "all" API and background cache path, then carry forward the date-label fix and any still-relevant focused tests.
  2. Extract only the remaining UI fix
    If maintainers do not want to rescue the stale branch, land a smaller PR for the date-only label bug and close this branch afterward.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Rebase/adapt this PR onto current main. Keep the explicit `agentScope: "all"` gateway/UI contract and `loadCostUsageSummaryFromCache` with `requestRefresh: true` and `refreshMode: "background"`; do not reintroduce direct request-path `loadCostUsageSummary` scans. Carry forward the date-only usage label fix and focused test, and remove the ordinary `CHANGELOG.md` edit.

Next step before merge

  • [P2] A repair lane can attempt the concrete rebase: keep current main's explicit all-agent usage contract and cache path, then carry forward the remaining UI label fix.

Security
Cleared: No concrete security or supply-chain issue was found; the material concerns are compatibility and availability in gateway usage aggregation.

Review findings

  • [P1] Keep usage.cost on the background cache path — src/gateway/server-methods/usage.ts:529-534
  • [P2] Preserve the explicit all-agent scope contract — src/gateway/server-methods/usage.ts:351-354
Review details

Best possible solution:

Rebase the useful pieces onto current main while preserving the explicit all-agent protocol and durable/background cache path.

Do we have a high-confidence way to reproduce the issue?

Yes for the remaining UI date-label bug from source: current main still uses UTC construction for YYYY-MM-DD buckets, which can display the previous local day west of UTC. The original multi-agent cost mismatch is no longer reproduced from current-main source because Control UI and gateway now use agentScope: "all".

Is this the best way to solve the issue?

No as-is. The best fix is a current-main rebase that keeps the explicit all-agent scope and background cache behavior while carrying forward the UI date-label fix and focused tests.

Full review comments:

  • [P1] Keep usage.cost on the background cache path — src/gateway/server-methods/usage.ts:529-534
    This stale branch calls loadCostUsageSummary directly for per-agent aggregation, but current main serves request-path usage reads through loadCostUsageSummaryFromCache({ requestRefresh: true, refreshMode: "background" }). Rebasing this code as written would bypass the durable/background cache contract and can bring expensive transcript scans back onto dashboard refreshes.
    Confidence: 0.89
  • [P2] Preserve the explicit all-agent scope contract — src/gateway/server-methods/usage.ts:351-354
    This branch makes omitted agentId mean every configured agent, while current main documents and tests agentScope: "all" for that behavior. A rebase should preserve the explicit protocol shape so unscoped callers do not unexpectedly broaden their data scope.
    Confidence: 0.84

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 66880a5d736c.

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority gateway and Control UI usage correctness fix with limited blast radius.
  • merge-risk: 🚨 compatibility: The PR changes unscoped usage.cost semantics relative to current main's explicit agentScope: "all" contract.
  • merge-risk: 🚨 availability: The PR's stale gateway path could reintroduce request-path transcript scans instead of current main's background cache refresh.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes trace summaries and inspected screenshots showing the real Control UI daily token and cost charts populated instead of No data.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes trace summaries and inspected screenshots showing the real Control UI daily token and cost charts populated instead of No data.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes trace summaries and inspected screenshots showing the real Control UI daily token and cost charts populated instead of No data.
Evidence reviewed

PR surface:

Source +205, Tests +271, Docs +1. Total +477 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 210 5 +205
Tests 4 287 16 +271
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 498 21 +477

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/gateway/server-methods/usage.test.ts src/gateway/server-methods/usage.sessions-usage.test.ts src/gateway/server-methods/usage.cost-usage-cache.test.ts ui/src/ui/views/usage-metrics.node.test.ts ui/src/ui/controllers/usage.node.test.ts.
  • [P1] git diff --check.

What I checked:

  • live PR state: GitHub reports this PR as open, not draft, and conflicting/dirty at head e14c554. (e14c554f323d)
  • current main gateway behavior: Current main handles usage.cost with explicit agentScope: "all", uses all configured agents only for that scope, and calls loadCostUsageSummaryFromCache with requestRefresh: true plus refreshMode: "background". (src/gateway/server-methods/usage.ts:760, 66880a5d736c)
  • current main UI caller: The Control UI sends agentScope: "all" to sessions.usage and usage.cost when no specific agent is selected. (ui/src/ui/controllers/usage.ts:296, 66880a5d736c)
  • protocol contract: Current docs and schema expose agentId for one agent and agentScope: "all" for configured-agent aggregation, matching the current main API contract the PR must preserve. Public docs: docs/gateway/protocol.md. (docs/gateway/protocol.md:349, 66880a5d736c)
  • PR head stale gateway path: The PR head still resolves all configured agents from omitted agentId and then calls the direct loadCostUsageSummary path through loadCostUsageSummaryForAgents, which predates current main's explicit all-agent/background-cache contract. (src/gateway/server-methods/usage.ts:529, e14c554f323d)
  • remaining UI date-label gap: Current main still constructs YYYY-MM-DD usage labels with Date.UTC; the PR changes the same function to local date construction, so this part remains useful. (ui/src/ui/views/usage-metrics.ts:449, 66880a5d736c)

Likely related people:

  • Alix-007: Merged PR 87222 added the current agentScope: "all" usage request path, all-agent cost aggregation, and protocol/schema updates. (role: current all-agent usage implementation author; confidence: high; commits: 99bd27535985; files: src/gateway/server-methods/usage.ts, ui/src/ui/controllers/usage.ts, packages/gateway-protocol/src/schema/sessions.ts)
  • hclsys: Merged gateway work changed usage cache refreshes to bounded background behavior that this PR must preserve when rebased. (role: adjacent cache behavior contributor; confidence: medium; commits: 845da0ed8f8c; files: src/gateway/server-methods/usage.ts, src/infra/session-cost-usage.ts)
  • Marvinthebored: Merged durable transcript aggregate cache work is central to the stale-branch availability concern. (role: adjacent durable usage cache contributor; confidence: medium; commits: a64b30705fab; files: src/gateway/server-methods/usage.ts, src/infra/session-cost-usage.ts)
  • konanok: Recent UI usage metrics commits touched the same Control UI usage view where the remaining date-label fix belongs. (role: recent Control UI usage contributor; confidence: medium; commits: 0eb8f34000b8, bd5afadc5c7a; files: ui/src/ui/views/usage-metrics.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@luke-skywalker-open-claw
luke-skywalker-open-claw force-pushed the codex/aggregate-usage-cost-agents branch from c613510 to 54314fa Compare May 3, 2026 15:19
…-cost-agents-clean

# Conflicts:
#	CHANGELOG.md
@luke-skywalker-open-claw

Copy link
Copy Markdown
Author

Addressed the ClawSweeper changelog refresh finding in current head e14c554f32: refreshed against latest origin/main with a normal merge commit, resolved the CHANGELOG.md Unreleased/Fixes hunk, and kept the PR diff focused to the same seven usage files. Local validation on this head passed: git diff --check origin/main...HEAD, the focused gateway usage/UI Vitest shards, pnpm check:changed, and pnpm build. GitHub now reports the PR as mergeable; CI is still running.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 14, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 15, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress.

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.
What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@giodl73-repo giodl73-repo removed the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 21, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 21, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels May 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@openclaw-clownfish

Copy link
Copy Markdown
Contributor

Clownfish 🐠 reef update

Thanks for the useful work here. Clownfish could not update this branch directly, so the replacement PR is the writable swim lane for the same fix path.

Replacement PR: #93022
Source PR: #70205
This source PR stays open so maintainers and the original contributor can compare the paths.
Contributor credit is carried into the replacement PR body and changelog plan.

fish notes: model gpt-5.5, reasoning xhigh; reviewed against 9cdf774.

@vincentkoc

Copy link
Copy Markdown
Member

Clownfish 🐠 landed

Thanks for the report and context here. This is superseded by #93022, which has landed as the canonical Clownfish fix path for this cluster.

Closing this now that the validated fix is merged. If this still splashes on current main by a different path, reply here and we can reopen or split it back out.

fish notes: model gpt-5.5, reasoning medium; reviewed against 4c2fef4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clownfish Tracked by Clownfish automation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. triage: dirty-candidate Candidate: broad unrelated surfaces; may need splitting or cleanup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants