Skip to content

feat(wacli): add stateful monitor check helper#413

Merged
artemgetmann merged 1 commit into
codex/whatsapp-monitor-active-thread-main-20260408from
codex/wacli-monitor-check-stack
Apr 8, 2026
Merged

feat(wacli): add stateful monitor check helper#413
artemgetmann merged 1 commit into
codex/whatsapp-monitor-active-thread-main-20260408from
codex/wacli-monitor-check-stack

Conversation

@artemgetmann
Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: agent asks to monitor a WhatsApp contact and now has one stable helper command for stateful polling instead of hand-writing wacli-recent-reply + ad hoc state-file choreography.
  • Proof: pnpm vitest run skills/wacli/scripts/wacli-monitor-check.test.ts src/whatsapp/wacli-monitor-check.test.ts src/agents/system-prompt.test.ts -> 2 files, 48 tests passed.
  • Shared-state footgun removed: monitor jobs no longer need the model to invent a durable state-file path on every run; the helper derives a stable per-target state file under ~/.openclaw/wacli-monitor-state.
  • Still hurts: this is stacked on top of fix(wacli): persist monitor baseline state #411 and does not itself prove full autonomous WhatsApp auto-send.

Why This Matters

  • The monitor bug fix in fix(wacli): persist monitor baseline state #411 works, but the generic agent path is still prompt-fragile if the model has to reconstruct the shell recipe.
  • This patch gives the agent one first-class helper for the monitoring use case and updates the guidance to point at it.

Scope Boundary

  • Added skills/wacli/scripts/wacli-monitor-check.{ts,sh}.
  • Added focused tests for derived state-file behavior and persisted first-run baseline.
  • Updated skills/wacli/SKILL.md and src/agents/system-prompt.ts guidance.
  • Did not change reply policy, OAuth/profile healing, or the monitor bootstrap logic already fixed in fix(wacli): persist monitor baseline state #411.

Verification

  • pnpm vitest run skills/wacli/scripts/wacli-monitor-check.test.ts src/whatsapp/wacli-monitor-check.test.ts src/agents/system-prompt.test.ts
  • Result: 2 files, 48 tests passed

AI Assistance

  • AI-assisted
  • Testing degree: targeted

- what: add a first-class wacli monitor helper, wire the skill/system prompt to use it, and cover it with focused tests
- why: monitor jobs should not rely on hand-authored state-file choreography or rediscovered shell procedure on wake
- risk: monitor guidance changes could shift agent behavior for WhatsApp monitor flows; focused tests cover the new helper and prompt wording
@artemgetmann artemgetmann merged commit 15ab08a into codex/whatsapp-monitor-active-thread-main-20260408 Apr 8, 2026
3 of 10 checks passed
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.

1 participant