Skip to content

Cron jobs with wakeMode: "now" mark complete without invoking agent session #652

@roshanasingh4

Description

@roshanasingh4

Description

Cron jobs configured with wakeMode: "now" are being marked as completed (status: "ok") without actually waking/invoking an agent session to process the task.

Configuration

{
  "name": "example-reminder",
  "enabled": true,
  "schedule": {
    "kind": "cron",
    "expr": "30 8 10 1 *"
  },
  "sessionTarget": "main",
  "wakeMode": "now",
  "payload": {
    "text": "Reminder: Do something important",
    "kind": "systemEvent"
  }
}

Expected Behavior

When the cron fires:

  1. Agent session should be woken/created
  2. The payload text should be delivered to the agent
  3. Agent should process the task (e.g., send a notification)
  4. Job marked complete with actual durationMs reflecting agent processing time

Actual Behavior

  1. Cron fires at scheduled time
  2. No agent session is created or woken
  3. Job immediately marked as finished with status: "ok"
  4. durationMs: 0 - indicating no agent work was done
  5. The summary field just echoes the payload text, not a result of agent processing

Evidence from Run Logs

{
  "ts": 1768033800001,
  "jobId": "<uuid>",
  "action": "finished",
  "status": "ok",
  "summary": "Reminder: Do something important",
  "runAtMs": 1768033800001,
  "durationMs": 0,
  "nextRunAtMs": 1799569800000
}

Additional Context

  • No session files were created or modified during the cron execution window
  • The issue appears specific to kind: "systemEvent" payloads with wakeMode: "now"
  • Other cron jobs show the same pattern (durationMs: 0 across multiple jobs)

Environment

  • Running as gateway-daemon on Linux
  • Node.js v22.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions