Skip to content

Use agent.maxSteps for cron step budget instead of hardcoded 30#113

Merged
tsubasakong merged 2 commits intomainfrom
fix/cron-step-budget-use-max-steps
Mar 17, 2026
Merged

Use agent.maxSteps for cron step budget instead of hardcoded 30#113
tsubasakong merged 2 commits intomainfrom
fix/cron-step-budget-use-max-steps

Conversation

@tsubasakong
Copy link
Collaborator

@tsubasakong tsubasakong commented Mar 17, 2026

Summary

Use config.agent.maxSteps for cron step budget instead of hardcoded 30.

Why

Cron tasks were aborting mid-execution because the step budget was hardcoded to 30 (clamped 20-60), well below the configured agent.maxSteps (default 100). For example, a "comment on 10 posts" task would abort after only 6 comments at step 30.

Changes

  • Default cron stepBudget now uses config.agent.maxSteps instead of hardcoded 30
  • Clamp range changed from 20-60 to 80-agent.maxSteps
  • LLM planner prompt updated to reflect the new range
  • Removed redundant hardcoded fallback in attempt.ts guidance builder, trusting the already-normalized value from upstream

Testing

  • Ran tsc --noEmit — passes cleanly
  • Verified cron task plan normalization clamps correctly (below 80 → 80, above maxSteps → maxSteps)

Checklist

  • I ran relevant tests, or the Testing section explains why I did not.
  • I updated docs, or confirmed no doc changes were needed.
  • I confirmed the PR does not include secrets, credentials, or private data.

🤖 Generated with Claude Code

Cron tasks were aborting mid-execution because the step budget defaulted
to 30 (clamped 20-60), far below the configured agent.maxSteps of 100.
This caused tasks like "comment on 10 posts" to fail after only 6.

- Default cron stepBudget now uses config.agent.maxSteps
- Clamp range changed from 20-60 to 80-agent.maxSteps
- LLM planner prompt updated to reflect new range
- Remove redundant stepBudget fallback in attempt.ts guidance builder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openpocket Ready Ready Preview, Comment Mar 17, 2026 3:32pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tsubasakong tsubasakong merged commit 294fb0a into main Mar 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant