wa AGENTS.md

wa AGENTS.md is an instructions file for Codex, OpenCode from yolo-labz/wa. It costs 1,519 tokens per session, scanned A, original, Apache-2.0.

Repository review instructions for the wa project, focused on reliable daemon behavior and real WhatsApp liveness. They require health checks to consider actual incoming activity, not only whether a network connection is open.

In plain words
What is it for?
Use them when reviewing changes to the wa daemon, health and readiness checks, watchdogs, auto-recovery, inbound message delivery, or related reliability code.
Why use it?
They help reviewers catch failures where a service appears connected but has stopped receiving messages. They also require problems to be diagnosable before speculative fixes are accepted.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/yolo-labz/wa/agents-md
Clone the repo
git clone --depth 1 https://github.com/yolo-labz/wa

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wa AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yolo-labz/wa/agents-md.svg)](https://agentmods.dev/instructions/yolo-labz/wa/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yolo-labz/wa/agents-md"><img src="https://agentmods.dev/badge/instructions/yolo-labz/wa/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,519 This file is loaded in full into every session.
When invoked 1,519 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01519 $0.01519
Opus 5 $0.00759 $0.00759
Sonnet 5 $0.00304 $0.00304
Haiku 4.5 $0.00152 $0.00152

Measured 3d ago against content hash 05c934c97656, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wa AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — reviewer rules for yolo-labz/wa

Enforcement checklist for the Codex adversarial reviewer (and any agent reviewing a PR in this repo). The why lives in CLAUDE.md rules 26–32 and docs/reliability.md; this file is what to flag. Each gate maps to a CLAUDE.md rule and is PR-blocking.

These rules are incident-driven: a wa-burocracy ~12 h silent inbound stall and an undiagnosable REST dispatcher panic (2026-06-01), plus the PR #595 speculative-fix near-miss. Review as if a real person's WhatsApp is on the line — because it is.

Daemon-reliability gates

Real-liveness — CLAUDE.md R26

  • FLAG any health / readiness / liveness check that asserts only transport state (IsConnected(), connected:true, keepalive / ping round-trip) with no inbound-delivery / app-progress signal. Socket-up is a green lie under WhatsApp server-side device demotion (keepalive validates the socket, never auth; logout/demotion arrives as a stream error, not a ping failure).
  • REQUIRE connection-health surfaces to express soft-stale ("connected, no inbound past threshold") as a first-class state, derived from the last-inbound timestamp — not synthesised from the socket.

Watchdog / auto-heal — CLAUDE.md R27

  • For code that auto-acts on a health signal, REQUIRE all of: edge-triggered (healthy→stale transition, not level), opt-in (explicit env/flag; detect-only default), cooldown-bounded, reversible (touches only the live socket — no Logout, no session.db mutation, no QR re-pair), and a synctest test proving "fires exactly once per edge + cooldown honoured."
  • REJECT a self-heal that mutates session/pairing state. REJECT level-triggered action loops (reconnect-storm risk).
  • Auto-heal is permitted ONLY for a narrow / reversible / well-understood failure class. Anything else MUST be detect-and-alert — emit, let a human decide.

Diagnosable before fix — CLAUDE.md R28

  • REQUIRE every recover() to log string(debug.Stack()) plus method/context — not just the panic value. A recover that logs only fmt.Sprintf("%v", rec) is itself a defect (an undiagnosable crash in the recovery path).
  • ACCEPT a diagnosability-only PR (stack capture, no root fix) as a complete, shippable deliverable. Do not demand the root fix in the same PR.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 98 lines · 1,519 tokens per session scan A 05c934c97656

Subscribe to this mod's changes

wa AGENTS.md is an instructions file published in the GitHub repository yolo-labz/wa (0 stars, last pushed 6d ago), licensed Apache-2.0. It adds 1,519 tokens to every session, about $0.0076 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.