Triggering OpenClaw Agent from external script — what we tried
Goal: Send a message from a bash script into the agent's running main session and trigger it to work instantly on that task.
1️⃣ openclaw agent --agent miro --message "..." --timeout 0
→ Message stored in transcript, no trigger. Fire-and-forget.
2️⃣ openclaw message send --channel signal --target "<NUMBER>" --message "..."
→ Sends to user via Signal. Agent not triggered. ~20s CLI startup on Pi.
3️⃣ openclaw agent --agent miro --message "..." --deliver --reply-channel signal
→ Starts new isolated session (not the running one). Reply is contextless.
4️⃣ Same with --session-id <ID> (parsed from sessions.json)
→ Same result: new session, message NOT injected into running session.
5️⃣ Same with --to "<NUMBER>" instead of --agent
→ Same result: new session.
6️⃣ Cron workaround: disabled cron job + openclaw cron run
→ systemEvent injected into transcript but doesn't trigger a turn (Issue #11726). Only processed at next heartbeat.