Skip to content

fix(prompt): remove hardcoded 5-minute reference from cron section#201

Merged
jacoblee-io merged 3 commits into
mainfrom
fix/cron-hardcoded-timeout
Apr 1, 2026
Merged

fix(prompt): remove hardcoded 5-minute reference from cron section#201
jacoblee-io merged 3 commits into
mainfrom
fix/cron-hardcoded-timeout

Conversation

@LikiosSedo
Copy link
Copy Markdown
Collaborator

Problem

The cron system prompt contains a hardcoded "You have a 5-minute time limit" that duplicates EXECUTION_TIMEOUT_MS in cron-service.ts. If the timeout constant is changed, the prompt becomes misleading.

Solution

Replace "5-minute time limit" with "strict time limit" — the model gets the behavioral hint without coupling to a specific value.

This was intended for PR #198 but the second commit didn't make it into the merge.

The cron system prompt said "You have a 5-minute time limit" which
duplicates the EXECUTION_TIMEOUT_MS constant in cron-service.ts.
If the timeout is changed, the prompt would be out of sync.
Replace with "strict time limit" to avoid the coupling.
- Check MIN_INTERVAL_MS (60 min) before ABSOLUTE_MIN_GAP_MS (10 min) so
  users see the real constraint upfront instead of a confusing two-step
  error ("10 min" then "60 min")
- Burst-firing error now also mentions the average interval limit
- Add minimum interval note to manage_schedule tool description so the
  model knows the limit upfront and doesn't trial-and-error
- Remove "every minute" from common patterns (not achievable)
@LikiosSedo LikiosSedo force-pushed the fix/cron-hardcoded-timeout branch from 5c18165 to 20ac771 Compare April 1, 2026 07:33
Copy link
Copy Markdown
Collaborator

@jacoblee-io jacoblee-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

  • Prompt decoupled from hardcoded timeout value
  • Validation order fix is correct: MIN_INTERVAL_MS (60 min) > ABSOLUTE_MIN_GAP_MS (10 min), so checking the stricter limit first avoids confusing two-step errors
  • Burst error message now includes average interval limit for context
  • Tool description derives minimum interval from CRON_LIMITS — stays in sync automatically
  • "Every minute" pattern removed from examples — good, it was never achievable

@jacoblee-io jacoblee-io merged commit 47fa4ed into main Apr 1, 2026
3 checks passed
@jacoblee-io jacoblee-io deleted the fix/cron-hardcoded-timeout branch April 1, 2026 07:38
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.

2 participants