Skip to content

Telegram notifications failing from orchestration loop #52

@dougss

Description

@dougss

Context

The orchestration loop sends Telegram notifications via sendAlert() (openclaw CLI) after task completion or failure. Currently failing with:

[openclaw] Failed to send alert: [claw-engine/session_completed] | ✅ Task completed: ...

Investigation needed

  1. Check if openclaw message send works from the daemon process context
  2. The daemon runs as LaunchAgent — may not have the right env vars or socket access for openclaw
  3. sendAlert() in src/integrations/openclaw/client.ts calls openclaw message send via execFile
  4. The alert is fire-and-forget (non-blocking), so task execution is not affected

Steps to reproduce

  1. Run claw submit "any task" --repos ~/server/apps/claw-engine
  2. Wait for daemon to process
  3. Check logs: tail ~/server/logs/claw-engine.log
  4. Look for [openclaw] Failed to send alert line

Expected behavior

After task completion, receive a Telegram message via @MadzixClawBot with:

  • Task title
  • Status (completed/failed)
  • PR URL (if created)
  • Token usage

Files involved

  • src/integrations/openclaw/client.ts — sendAlert function
  • src/core/orchestration-loop.ts — calls sendAlert at end of pipeline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions