Skip to content

Fix one-time scheduled tasks.#21

Closed
emcmanus wants to merge 1 commit intoqwibitai:mainfrom
emcmanus:main
Closed

Fix one-time scheduled tasks.#21
emcmanus wants to merge 1 commit intoqwibitai:mainfrom
emcmanus:main

Conversation

@emcmanus
Copy link
Copy Markdown

@emcmanus emcmanus commented Feb 2, 2026

WhatsApp provides message timestamps in UTC.

When scheduling one-time tasks, Claude (Opus 4.5) often fails to convert to local time first, opting instead to just drop the Z suffix.

Timestamps without “Z” are interpreted in the local timezone, leading to an incorrect offset.

It’s more reliable to request a UTC timestamp, and convert to local when needed for Cron.

WhatsApp provides message timestamps in UTC.

When scheduling one-time tasks, Claude (Opus 4.5) often fails to
convert to local time first, opting instead to just drop the Z suffix.

Timestamps without “Z” are interpreted in the local timezone, leading to
an incorrect offset.

It’s more reliable to request a UTC timestamp, and convert to local when
needed for Cron.
chidev added a commit to lev-os/nanoclaw that referenced this pull request Feb 3, 2026
Enforces Z suffix on once-type schedule values to prevent timezone
confusion. Updates tool descriptions and validation in both the
agent-runner and main router.

Cherry-picked from upstream PR qwibitai#21.
chidev added a commit to lev-os/nanoclaw that referenced this pull request Feb 3, 2026
Enforces Z suffix on once-type schedule values to prevent timezone
confusion. Updates tool descriptions and validation in both the
agent-runner and main router.

Cherry-picked from upstream PR qwibitai#21.
@chidev
Copy link
Copy Markdown

chidev commented Feb 3, 2026

Reviewed and tested on our fork. LGTM ✅

The .endsWith('Z') approach is the right call for LLM tool consumers — Claude follows tool descriptions closely, so strict Z-suffix is more reliable than permissive parsing. Defense-in-depth validation in both container IPC and host router is appropriate given the process boundary.

Tested with Apple Container on macOS. Clean compile, no regressions.

chidev added a commit to lev-os/nanoclaw that referenced this pull request Feb 3, 2026
Enforces Z suffix on once-type schedule values to prevent timezone
confusion. Updates tool descriptions and validation in both the
agent-runner and main router.

Cherry-picked from upstream PR qwibitai#21.
@gavrielc gavrielc self-requested a review as a code owner February 3, 2026 14:49
@TomGranot
Copy link
Copy Markdown
Collaborator

Changes needed:

  • The src/index.ts portion of this fix targets processTaskIpc which was moved to src/ipc.ts in refactor Refactor index #156. Please rebase and retarget that hunk to src/ipc.ts instead.
  • The container/agent-runner/src/ipc-mcp.ts changes look correct and should apply cleanly.

@TomGranot
Copy link
Copy Markdown
Collaborator

This PR targets processTaskIpc which was moved from src/index.ts to src/ipc.ts in refactor #156. The container-side changes should apply cleanly — just the host-side hunk needs retargeting. Could you rebase against current main?

@TomGranot
Copy link
Copy Markdown
Collaborator

Closing due to no response to the rebase request from 7+ days ago. The contribution is appreciated — if you'd like to pick this up again, feel free to reopen with an updated branch against current main. Thanks!

@TomGranot TomGranot closed this Feb 19, 2026
squarewings pushed a commit to squarewings/nanoclaw that referenced this pull request Mar 15, 2026
…se-mode

fix: sendMessage test expectations for parse_mode
om10001 pushed a commit to om10001/nanoclaw that referenced this pull request Mar 19, 2026
…se-mode

fix: sendMessage test expectations for parse_mode
hamiz-ahmed pushed a commit to hamiz-ahmed/nanoclaw that referenced this pull request Mar 24, 2026
…se-mode

fix: sendMessage test expectations for parse_mode
SungWoon pushed a commit to SungWoon/nanoclaw that referenced this pull request Mar 27, 2026
…se-mode

fix: sendMessage test expectations for parse_mode
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.

3 participants