Repository navigation
Conversation
…t ceiling The minPromptBudget calculation used Math.min, making 8000 the upper bound for the ratio-based prompt budget. For small-context models (e.g. phi3:mini at 4096 tokens), the ratio-based value was only 2048, leaving barely any room for the actual prompt after reserve tokens were subtracted. Change Math.min to Math.max so MIN_PROMPT_BUDGET_TOKENS acts as a true floor, ensuring models under 16k context receive at least half the window for prompt content. Large models are unaffected since the ratio-based value already exceeds 8000. Closes openclaw#96658 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR should close as superseded: it targets the real lightweight-cron overflow bug, but #96668 is an open, mergeable, proof-positive canonical fix for the same issue with scoped behavior, regression coverage, and real cron/Gateway proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch and let maintainers review or land the proof-positive canonical PR for the lightweight cron overflow fix. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this branch and let maintainers review or land the proof-positive canonical PR for the lightweight cron overflow fix. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main leaves 2,048 prompt tokens for the linked issue's 4,096-token model and 20,000-token reserve, below the reported 3,544-token lightweight prompt. I did not run the live cron setup for this review. Is this the best way to solve the issue? No. This branch is a plausible one-line arithmetic change, but the proof-positive sibling PR is the better maintained fix path because it scopes the policy, accounts for tool schemas, adds tests, and includes real cron/Gateway proof. Security review: Security review cleared: No security or supply-chain surface is changed; the diff only adjusts local token-budget arithmetic and a code comment. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
minPromptBudgetcalculation inshouldPreemptivelyCompactBeforePromptusedMath.min, makingMIN_PROMPT_BUDGET_TOKENS(8000) the upper bound for the ratio-based prompt budgetcompact_onlyhad nothing to compact with lightweight sessionsMath.maxso the constant acts as a true floor, ensuring models under 16k context receive at least half the window for prompt content. Large models are unaffected since their ratio-based value already exceeds 8000Test plan
promptBudgetBeforeReserve=409with lightweight sessionsCloses #96658
🤖 Generated with Claude Code