Content

Wachete and Change-Monitoring APIs for Agents

A Wachete alert can arrive twice from ordinary polling or push delivery. The risk isn't the duplicate notice, it's the agent running the same follow-up action twice.

Chaitrali Kakde

DevRel Engineer

IntegrationsOct 16, 2026

Key takeaways

  • -Both polling and push alerts can report one Wachete change more than once: polling from overlapping timers, push from a resent event the monitor isn't sure you received.
  • -The alert is cheap to see twice. The follow-up, like a support ticket, email, or price update, is not, if the agent treats the repeat as a brand-new change.
  • -Swytchcode's retry logic covers the outbound call your agent makes; it does not by itself collapse two separate Wachete notifications into one.
  • -Give the follow-up a stable reference built from the change itself, such as the page and edit id, so a second alert finds the first result instead of creating another.
  • -Connect Wachete with swy get wachete and swy auth connect wachete. Start with a read that lists changes, and leave the follow-up write off until the reference is stable.

Wachete watches a page, a price, or a record, and tells your agent when it changes. That part works well. The part that goes wrong is the agent doing the follow-up twice, because the same change arrived as two alerts. Polling, where your side asks on a timer whether something changed, can see the same edit in two overlapping checks. Push alerts, where the monitor calls you, can resend the same event if the monitor isn't sure you received it the first time. Either way, one real edit can produce two notices.

A second copy of the notice itself is cheap. A second support ticket, a second email, or a second order placed because the agent treated the repeat as a brand-new change is not.

The general problem is that neither polling nor push alerts guarantee you one notice per change, and nothing in Wachete's own delivery stops a follow-up action from running twice for the same edit. Swytchcode's fix is to give that follow-up a stable reference to check against, so a repeated alert finds the first result instead of creating a second one.

The problem: a repeated alert, not a failed call, causes the duplicate

Polling means your side asks, on a timer, "what changed?" If the timer overlaps, or the previous answer was slow to arrive, the same change can show up in two separate polls. Push means the monitor calls you when something changes, and networks repeat messages; a monitor can resend the same event if it is not sure the first one was received. Neither style is wrong. Both need a rule for the follow-up, because the alert is not the risky part, the action it triggers is.

This is a different problem from a failed API call being retried. Swytchcode's own retry logic only concerns the outbound call your agent makes afterward, and it does not, by itself, collapse two separate Wachete notifications into one. If two alerts arrive for the same edit, that is two inputs, and your follow-up logic has to recognize them as the same change on its own.

How Swytchcode solves it

Swytchcode downloads a catalog of what the follow-up system can do, and only an action you add with swy add method can run, so you can turn on a read that lists recent changes while leaving "create a ticket," "send an email," or "update the price" off until the reference for that write is stable. The Wachete key itself is stored with swy auth connect, on your machine, added only when a call runs rather than sitting in the chat or a project env file.

For the duplicate-follow-up problem specifically, the fix is giving the write a stable reference built from the change itself, such as the page and something that identifies this particular edit, rather than a random value created when the alert arrives. The second alert then finds the first ticket instead of opening another.

Setting up Wachete with Swytchcode

From the project folder, in order:

swy init --editor=claude --mode=sandbox
swy get wachete
swy discover "list changes" --project wachete
swy info <id from discover>
swy add method <id from discover>
swy auth connect wachete

swy get wachete downloads the integration without turning every action on. Use the method name swy discover prints rather than one copied from an old note, and watch a page you control, not a customer's production site, until you have seen a repeated alert produce exactly one follow-up. Do not add the follow-up write until that read is working.

Policies: making retries and repeated alerts safe

Leave "create a ticket," "send an email," or "update the price" off until the reference for that write is stable. If the follow-up is hard to undo, have a person approve it. On Business and Enterprise, that hold goes to Slack or Telegram, and silence for 48 hours means it does not run. Free and Pro can allow or deny the action outright, without that hold.

A change monitor like Wachete is useful specifically because it tells an agent when something changed, but neither polling nor push delivery guarantees exactly one notice per change, and the follow-up action, not the alert, is where a duplicate actually costs something. Swytchcode solves that by letting the read happen freely while keeping the write off until it has a stable reference to check against, and by letting a person approve the write when the reference or the stakes aren't settled yet.

FAQ

What is the difference between polling and a push alert?

Polling is when you ask on a schedule whether something changed. A push alert is when the monitor tells you. Both can report one change more than once.

If Wachete fires twice, will Swytchcode ignore the second alert automatically?

No. Swytchcode's retry rule is about the call your side makes outward, and it retries a create or an update only when an idempotency key is already set on that call. Two alerts are two separate inputs; the follow-up action has to reuse a stable reference so the second one does not create a second ticket or email.

What should that stable reference be?

Something you can rebuild from the change itself, such as the page and the edit id the monitor gave you, not a random value created when the alert was received.

Can the assistant see the Wachete key?

Not on this path. It is stored with swy auth connect wachete and added only when the call runs.

Can I build an AI agent on top of Wachete with Swytchcode?

Yes. The catalog and the allow list are built for exactly this: you decide whether an agent can only list and summarize changes, or whether it can also open tickets, send email, or update a price based on them.

Can Swytchcode stop an agent from running the same follow-up twice, even if it's asked to?

It stops the agent from having the follow-up action at all until you add it with swy add method, and a policy can hold that write for a person to approve. Deduplicating two alerts that both arrive legitimately is still the agent's own logic to get right, using a stable reference rather than a value created fresh each time.

If an agent retries a Wachete-triggered call after a timeout, will Swytchcode let it duplicate the follow-up?

Not automatically. Swytchcode retries a create or an update on its own only when the call already carries an idempotency key. Without one, a lost response is not retried automatically, which avoids a silent duplicate, but the deeper fix for Wachete specifically is giving the write a stable reference so even two genuinely separate alerts for the same edit land on one result.

More content

Ready to make your agent's tool calls reliable?

Give this prompt to your agent and get started.