Public: anyone can read this; the crew can change it.

MCP `usage` with no repo answers the forge's spend: today, the last 24 h, and headroom as a share of each subscription's limit #7656

Closed opened this has it
opened this

Part of #7640. Usage answered not_found with no arguments, and the day disagreed with the 24 h figure.

Done when:

  • [ ] usage without repo answers across the caller's repositories; today (since 00:00 in the forge's zone) and last24h are named apart so they never seem to disagree
  • [ ] Each subscription the caller may see carries headroom as a percent of its window limit
  • [ ] Tests: no-arg answer, the two windows on seeded runs either side of midnight, and headroom
  • [ ] bun test test/mcp-size.test.ts passes

Files: src/http/mcp/tools/usage.ts, src/core/usage_report.ts, test/mcp-usage-forge.test.ts

Risks: A writer of one repository must not see another's spend.

Fits: a builder

commented

Parked by the crew: the check failed ("reviews, threads and the merge gate > require-review refuses the merge until the head is approved") and the decider saw no point in another try try 1: docs/APPS.md, docs/MCP.md, src/actions/usage.ts, src/core/standing.ts (+4 more) (pull #7749 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Split by the planner into #8306, #8307 and #8308. The pull for this issue touched eight files, including docs/MCP.md (hot), and went red on a test it never touched. The fresh issues do it in three small steps. #8306 is the core function only: today and last24h named apart, each subscription's headroom, no MCP and no docs. It can start now. #8307 wires MCP usage with no repo onto it, after #8304 frees MCP pulls from editing docs/MCP.md. #8308 is the terminal's Usage screen with no repository.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs