Repository navigation
fix(agents): prefer cron for deferred follow-ups - #60811
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad4ac5d3c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR tightens system-prompt and tool-description wording so that future-time follow-up requests ("check back in 10 minutes", reminders) are steered to Three of the new or modified test assertions will fail without further fixes:
Confidence Score: 4/5Production code changes are safe and correct; three test assertions introduced by this PR will fail in CI and need to be fixed before merging. All runtime/prompt changes are prompt-wording only with no behaviour regressions. However, three of the new or modified test assertions are verifiably broken — the test fixture for status.tools.test.ts is missing the expected sentence, the system-prompt.test.ts minimal-mode test uses tool names that result in hasCronTool=false, and tools-effective-inventory.test.ts expects a string longer than the 120-char truncation limit. The PR author explicitly acknowledged not running tests. These are P1 CI failures that must be corrected before landing. src/auto-reply/status.tools.test.ts (fixture mismatch), src/agents/system-prompt.test.ts (hasCronTool=false for given toolNames), src/agents/tools-effective-inventory.test.ts (truncation vs expected length)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee307c4683
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5caa16a20d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "- canvas: present/eval/snapshot the Canvas", | ||
| "- nodes: list/describe/notify/camera/screen on paired nodes", | ||
| "- cron: manage cron jobs and wake events (use for reminders; when scheduling a reminder, write the systemEvent text as something that will read like a reminder when it fires, and mention that it is a reminder depending on the time gap between setting and firing; include recent context in reminder text if appropriate)", | ||
| `- cron: ${cronToolSummary.toLowerCase()}`, |
There was a problem hiding this comment.
Preserve cron field casing in fallback tool summaries
When toolLines is empty, this fallback branch lowercases cronToolSummary, which rewrites schema-like keys such as systemEvent and yieldMs to systemevent/yieldms. In prompts built through this path, the model is taught incorrect cron argument names and can generate invalid tool calls for scheduled reminders. Keep the summary text casing intact (or only lowercase plain prose) so parameter names remain valid.
Useful? React with 👍 / 👎.
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
* fix(agents): prefer cron for deferred follow-ups * fix(agents): gate cron scheduling guidance * fix(changelog): add scheduling guidance note * fix(agents): restore exec approval agent hint
Summary
AI-assisted: Codex
exec/processpolling problem instead of clearly steering them tocron.sleep/poll loops even though OpenClaw already has scheduler wiring.cron/exec/processtool descriptions so future-time follow-up maps tocron, while backgroundexec/processis reserved for work that starts now.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
exec/processwaiting for long delays, and the tool descriptions did not draw a strong boundary between background work and scheduled follow-up.Regression Test Plan (if applicable)
src/agents/system-prompt.test.ts,src/agents/tools/cron-tool.test.ts,src/agents/bash-tools.test.tscron, whileexec/processdescriptions frame themselves as background-now tools instead of timer emulation tools.User-visible / Behavior Changes
croninstead of using shell sleep or poll loops.Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
cron,exec, andprocesstool descriptions.cron, and backgroundexec/processlanguage is scoped to work that starts now.Expected
cron.exec/processno longer read like timer emulation tools.Actual
Evidence
Human Verification (required)
bun -econfirmed the updated prompt/tool descriptions are emitted as intended.cronguidance and left scheduler wiring untouched.pnpm test -- ...lanes andcodex review --base origin/main, but both stalled in this machine's current local test/review contention, so I am not claiming clean Vitest output here.Review Conversations
Compatibility / Migration
Risks and Mitigations
cron.cronis available (or when the default tool fallback is in effect); otherwise the old long-wait guidance remains.