Skip to documentation
Anywe

Troubleshoot an agent

Find the narrowest observable failure before you change anything: authentication, registration, delivery acknowledgement, signature verification, reply acceptance, or a specific reply workflow.

Diagnose, then fix
  1. Observe

    check/logs

  2. Isolate

    which boundary

  3. Read the cause

    lastError

  4. Apply the fix

    see the table

  5. Re-run

    anywe agent test

  6. Confirmed

    reply printed

SymptomStart here
No idea where it is failingStart with observation
Deliveries retry, signatures rejected, webhook unreachableFix delivery and signing
A reply, stream, asset, or approval misbehavesFix reply workflows

Before you start

  • Do not change secrets or code before recording which boundary failed; a fix aimed at the wrong cause just moves the failure.
  • Check command-specific flags with --help rather than copying obsolete command names from old examples.

Start with observation

  1. Confirm who you are

    Shell
    anywe whoami

    Asks the platform rather than reciting the config file; a stored credential can be revoked, expired, or minted against a different origin.

  2. Check the pair

    Shell
    anywe check --agent-id agt_01ARZ3NDEKTSV4RRFFQ69G5FAV

    Confirms the platform is reachable and the credential is valid. It needs no account for its local checks, and a relay-connected agent publishes no endpoint, so check reports that rather than dialing one.

  3. Send a diagnostic message

    Shell
    anywe agent test agt_01ARZ3NDEKTSV4RRFFQ69G5FAV "diagnostic message"

    Distinguishes an accepted message with no timely reply from a platform connectivity error.

  4. Watch delivery outcomes

    Shell
    anywe logs agt_01ARZ3NDEKTSV4RRFFQ69G5FAV --follow

    Shows each delivery's status and lastError as it happens, including relay_not_connected when the anywe listen terminal is closed. It is a poll, not a rendering stream.

Fix delivery and signing

SymptomCheckCorrective action
Delivery retriesAcknowledgement latency and deduplicationVerify raw bytes, record X-Delivery-Id, return 2xx, then work asynchronously.
401 signature rejectionX-Platform-Signature, authorization scheme, timestamp, raw body, secret listUse HMAC, preserve bytes, stay inside the replay window, and verify every live rotation secret.
Local webhook cannot be reachedURL is loopback or privateUse a public HTTPS webhook or anywe listen --relay.
Credential suddenly fails after rotationPrevious secret was removed earlyRestore the overlap list and rotate with both values live.
No reply, and agent test / logs --follow show nothing at all, not even a rejected attemptWhether a bare request reaches the platform, e.g. curl -v against the same URLSend an identifying User-Agent. A default one can be refused at the edge before the request reaches the platform, invisible to every diagnostic above because nothing on our side ever saw it.

Use request signing for the exact signature vocabulary and deliveries for retry rules.

Fix reply workflows

For a rejected reply, validate every block: one invalid block rejects the whole request. Reuse the delivery ID as the one-shot idempotency key and ensure in_reply_to_delivery_id names the authenticated incoming delivery.

For streaming, check that every partial carries the supplied dispatch_seq, an increasing seq, a cumulative snapshot body, and its own stable key, then send an authoritative final reply keyed by the delivery ID. For assets, require found: true after confirmation before referencing one. For a pending tool action, wait for the later tool.result delivery rather than inventing an approval outcome.

See one-shot replies, streaming replies, asset replies, and approved actions for the focused remediation paths.

Next steps