Manages context overflow by handing off to a fresh subagent at 80% usage
编程
agent-expenditure
试用Tracks per-agent token usage and flags waste in parallel dispatch
它能做什么
Tracks per-agent token usage and flags waste in parallel dispatch
技能文档
Night Market Skill — ported from claude-night-market/conserve. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Agent Token Waste Monitoring
When To Use
- After parallel agent dispatch completes
- When evaluating whether to increase agent count
- During retrospectives on agent-heavy workflows
- When plan-before-large-dispatch rule triggers
When NOT To Use
- Single-agent workflows (no coordination overhead)
- During active agent execution (post-hoc analysis)
- For token budgeting (use token-conservation instead)
Brooks's Law for Agents
Dispatching more agents does not always help. Coordination overhead grows with agent count:
| Agent Count | Expected Overhead | Guidance |
|---|---|---|
| 1-3 | Negligible | Dispatch freely |
| 4-5 | 10-15% | Acceptable; plan first |
| 6-8 | 20-30% | Monitor closely |
| 9+ | 30%+ | Likely counterproductive |
Coordination overhead is measured as shared-file conflicts: concurrent Read/Write operations on the same file by different agents, as a percentage of total agent runtime.
Post-Dispatch Review Checklist
After parallel agent runs, evaluate:
- Did each agent produce unique findings?
- Was total token expenditure proportional to value?
- Did any agent duplicate another's work?
- Would fewer agents have produced the same result?
If 2+ questions answer no, reduce agent count in future dispatches of the same type.
Waste Signals
See modules/waste-signals.md for the 5 waste signal categories and
detection criteria.
Cross-References
.claude/rules/plan-before-large-dispatch.mdfor the 4+ agent planning requirementconserve:token-conservationfor session-level token budgetingconjure:agent-teamsfor dispatch coordination
相关技能
Enforces token quota management at session start with conservation and compression checks. Use at the start of every session or before large context loads
Compresses verbose responses by removing filler and framing to save 200-400 tokens
Implements structured usage logging and audit trails for cost and session tracking
Expose a local @moneydevkit/agent-wallet as a Nostr Wallet Connect (NIP-47) wallet-service (systemd user service).
Optimizes context window via MECW principles and memory tiering