ClawKit Logo
ClawKitReliability Toolkit

Sub-Agent & Cron Job Issues

Three Related Issues on This Page

  • Sub-agent status invisible to parent agent
  • Cron jobs completely ignored / not executing
  • Cron announce delivery silently fails (status ok, no message sent)

Next Step

Fix now, then reduce repeat incidents

If this issue keeps coming back, validate your setup in Doctor first, then harden your config.

Sub-Agent Status Not Visible

When you spawn a sub-agent with sessions_spawn, the parent agent only receives a response when the sub-agent completes its task. If the sub-agent hits an error, gets stuck waiting for input, or silently hangs — you have no visibility into what's happening.

This is by design — sub-agents run independently. But it means a stuck sub-agent silently consumes your token budget with no feedback.

How to Monitor Sub-Agent Progress

Option 1: Use sessions_list in Your Current Chat

Ask your main agent to check what sub-agents are running:

Tell your agent:

Use sessions_list to show me all active sessions and their status.

Option 2: Read Sub-Agent History

Tell your agent:

Use sessions_history for session key "agent:main:session-name" and show me the last 10 messages.

Option 3: Design Sub-Agents to Report Back

The most reliable approach — include a reporting instruction in every sub-agent task:

Recommended Sub-Agent Task Template

# Add this at the end of every sessions_spawn task description:
When you complete this task (or encounter an error you cannot resolve),
use sessions_send to message the parent session "agent:main:default"
with a summary of what was accomplished and any issues encountered.

Cron Job Not Executing

If your scheduled cron job never runs (manually triggered or at the scheduled time), follow these diagnostic steps:

Step 1: Verify the Job is Registered

List Cron Jobs
openclaw cron list

If your job doesn't appear in the list, it was never registered or registration failed silently after a version upgrade.

Step 2: Test Manual Execution

Run Cron Job Manually
openclaw cron run <job-id>

If the manual run also fails, check the gateway logs:

Follow Gateway Logs
openclaw logs --follow | grep -i cron

Step 3: Check sessionTarget Configuration

The most common cause of silent cron failure is an incorrect sessionTarget. The target session must exist when the cron fires.

Common sessionTarget Mistakes

"sessionTarget": "main"→ wrong
"sessionTarget": "agent:main:default"Must include full agent:name:session path
"sessionTarget": "telegram"→ wrong
"sessionTarget": "agent:main:telegram-chat"Must reference an active session

Step 4: Restart Gateway

Restart
openclaw gateway restart

Cron Announce Delivery Silently Fails

You may see the cron job execute successfully (status ok, lane task done in logs) but no message arrives in Telegram or Discord. This is a known regression where isolated cron sessions cannot access the original channel context needed for announce delivery.

Affects: delivery.mode: "announce" and delivery.channel: "last" in isolated cron sessions.

Workaround: Use the message Tool Explicitly

Instead of relying on delivery mode, instruct the cron agent to send the message directly:

Cron Task Prompt — Explicit Delivery

# In your cron task description:
After completing the task, use the 'message' tool to send
the results to channel "telegram" (or "discord").
Do not rely on automatic delivery — send explicitly.

Permanent Fix: Update to Latest

Update OpenClaw
npm install -g openclaw@latest

Auto-Diagnose

Run the Doctor

npx clawkit-doctor@latest

Checks gateway health, session configuration, and cron job registration.

Did this guide solve your problem?

Need Help?

Try our automated tools to solve common issues instantly.