Open
Conversation
Follow-up to the first OpenClaw plugin blog post. Shows the plugin in action solving a concrete production scenario: a research agent hits a complex query that would cost $12, but with a $5 budget it downgrades models, disables expensive tools, self-regulates via prompt hints, and completes the task for $4.85. Covers: real log output, prompt hints, session summary analysis, three operational patterns (model downgrade is invisible, tool limits catch more bugs than budget limits, session summary is your tuning guide), copy-pasteable production config, and honest retrospective on limitations. https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
Accuracy: - Fix USD_MICROCENTS math: $5 = 500,000,000 units (was showing 50M) - Fix all log output numbers to match corrected budget - Fix expensive tool threshold math (lowBudgetThreshold/10) - Add dollar amounts alongside unit amounts for readability SEO: - Add keywords to tags: ai-agent-cost, llm-cost-management - Strengthen meta description with more searchable terms - Add "AI agent cost management" and "LLM cost management" in body - Mention "Cycles" brand name in opening paragraph Landing page: - Add TL;DR blockquote for skimmers after the hook - Add "New to Cycles?" callout box with context for cold visitors - Add "What is Cycles?" link for first-time visitors from search - Add deploy link alongside dry-run in CTA - Expand Related reading with 2 more high-value links https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
…gic corrected - Log estimates now match config values (Opus=15M, Sonnet=3M, web_search=5M) - Expensive tool threshold corrected: added expensiveToolThreshold=5000000 to config so code_execution (10M) actually exceeds it and gets blocked - Remaining/spent rounded to $0.15/$4.85 for narrative readability - Session summary remaining/spent match narrative numbers https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
…flow 1. Dollar mismatch: "$3.50 remaining" → "crossed the $1.50 low-budget threshold" — matches lowBudgetThreshold=150000000=$1.50 in config/logs 2. Credibility signal: Added explicit note after TL;DR: "The session described below is a representative walkthrough based on real plugin behavior... nothing is fabricated." 3. Soften broadest claim: "budget-aware agents are better agents" → "budget-aware agents tend to be more disciplined and less wasteful" 4. Fix anthropomorphism: "Nobody told it to do this" → "We did not hardcode any task-specific fallback behavior — the model adapted to the budget constraint on its own" 5. Move config block: Moved after "What we'd change" section for better narrative flow (logs → hint → summary → patterns → lessons → config) 6. Soften other absolute claims: "users didn't notice" → "output quality was comparable"; "across hundreds of sessions" → "across multiple test sessions" 7. "zero code changes" in Cycles callout → "without changing agent logic" https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
…tighter CTA - Description: "Here's exactly what happened" → representative walkthrough framing to match the credibility note in the body - "Most AI agent cost controls" → "Many" (defensible, less pushback) - Shortened "Try it on your next session" section — merged docs/source links into one paragraph, moved immediately after config for faster payoff https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
minor edits
Technical post for plugin developers. Five lessons from building a 60-property, 300-test budget enforcement plugin: 1. Model name isn't in the model resolve event (workaround + FR) 2. Can't block model calls — no block field (workaround + FR) 3. Plugin initializes 5 times per startup (workaround) 4. process.env triggers installer security warning (workaround) 5. Plugin contract rules are undocumented (api.pluginConfig vs api.config, manifest id derivation, config validation timing) Balanced with "What OpenClaw gets right" and filed feature requests. Code-heavy, problem→workaround format throughout. https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
…ed Lesson 3 1. Title: shortened to "Five Lessons from Building a Production OpenClaw Plugin" 2. Intro: replaced feature inventory with problem-focused opening, teased Lesson 2 (can't block model calls) as the strongest reveal 3. Description: rewritten to lead with "you can't actually block a model call" 4. Lesson 3: compressed by ~60% and reframed as "smaller but confusing runtime behavior" since it's log noise, not a contract problem https://claude.ai/code/session_016JXYAGrQ9bFio4BQpVP9V4
…er provider rejection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
new blog post: We Gave Our OpenClaw Agent a $5 Budget and Watched It Adapt
new blog post: Five Lessons from Building a Production OpenClaw Plugin