Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Show HN: OpenClaw plugin – hard budget limits for agent tool calls (github.com/runcycles)
1 point by amavashev 3 months ago | hide | past | favorite | 1 comment
OpenClaw agents can loop, pick expensive models, and burn budget before anyone notices. This plugin stops that.

Install:

    openclaw plugins install @runcycles/openclaw-budget-guard
Add one config block with your tenant and optional model fallbacks (e.g. claude-opus → claude-sonnet when budget is low). The plugin handles the rest: balance checks before model selection, reservations before tool calls, commits after, and cleanup at session end.

Built on the Cycles protocol — reserve budget before execution, commit actual spend after, release the remainder.

Plugin: https://github.com/runcycles/cycles-openclaw-budget-guard

npm: https://www.npmjs.com/package/@runcycles/openclaw-budget-gua...



I'm the author. A few design decisions worth explaining:

The model downgrade is the most useful feature for daily use — when budget drops below a threshold, the plugin silently swaps claude-opus to claude-sonnet, gpt-4o to gpt-4o-mini. The agent keeps running, just cheaper. Only at full exhaustion does it stop.

The prompt hint (before_prompt_build hook) tells the model its remaining budget in the system prompt. Models self-regulate when they know the constraint exists — fewer unnecessary tool calls, shorter responses.

The underlying Cycles protocol handles idempotency under retries so concurrent tool calls don't double-spend against the same budget.

Happy to answer questions about the plugin or the protocol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: