Rietspruit Digital, our fictional Gqeberha product studio, connected its event-driven agent to two new triggers. When a client's invoice was marked paid, the agent moved the project to "in progress" on the team board, sent the client a thank-you with next steps and booked a kick-off meeting. When a card on the board changed, the agent checked whether the client needed an update.
After a short outage at the payment provider, the provider redelivered the day's notifications. One client received three thank-you emails and three kick-off invitations. Each board move by the agent was itself a board change, so the agent also reviewed its own updates and posted two status notes nobody needed. Nothing dangerous happened. Everything that happened was avoidable.
An event-driven agent needs its permission boundary drawn before the first event arrives: every action class marked allow, ask or block, every external effect protected by an idempotency key, and no event able to change what the agent may do.
From event to effect
Part 2 showed that the authority for event-driven work belongs to whoever wrote the admission rule, not whoever sent the event. This part follows the event all the way to its effect.
| Step | Job | Control that belongs here |
|---|---|---|
| Trigger | Receive the event and store it once | Verify the sender's signature; deduplicate by event ID; drop events the agent itself caused |
| Router | Decide: accept as new work, attach to existing work, or ignore | Admission rules; a recorded reason for every decision |
| Ticket | Turn accepted work into a bounded task | Mandate in one line, scope, budget, owner |
| Worker | Do the work in its own session and workspace | Only the tools the mandate needs, under the agent's own identity |
| Evidence | Show what was done and why | Diffs, test results, sources and tool results, kept with the ticket (part 6) |
| Approval | Get a decision for ask-class actions | A named person who sees the evidence, not only the request |
| Action | Make the change in the world | Idempotency key; result recorded against the ticket |
The order matters. Evidence comes before approval, so the approver decides on what was done rather than on what was promised. Approval comes before the effect, so an ask-class action cannot happen first and be explained later.
Allow, ask, block, per action class
The decision tool for this part is a permission matrix. Classify every action the agent can take, not every tool it has, because one tool can carry very different risks. The same email connector can send an internal note or a price to a client.
| Action class | Class | Why | Who approves an "ask" |
|---|---|---|---|
| Read repository, board and CRM records in scope | Allow | Needed for every task; no effect | Not applicable |
| Open a pull request or draft a reply | Allow | Reversible; a person merges or sends | Not applicable |
| Add a note to a CRM deal or board card | Allow | Low impact; recorded | Not applicable |
| Send an email or invitation to a client | Ask | External and not reversible | Account lead |
| Merge to the main branch | Ask | Changes what is deployed | Tech lead |
| Change a price, invoice or payment term | Block | Commercial decision | Not applicable |
| Delete records, branches or files | Block | Not reversible | Not applicable |
| Change its own permissions, rules or schedule | Block | Authority must not expand itself | Not applicable |
Two design rules make the matrix hold.
Block must win. If a broad allow rule and a narrow block rule both match, the block rule should decide. Claude Code's permission system is a useful reference: rules are evaluated deny, then ask, then allow, and an allow rule cannot carve an exception out of a deny rule (checked 23 November 2026). Whatever product you use, test that your "never" rules survive a generous "allow".
Ask must be real. A person who approves twenty kick-off invitations a day without reading them is not a control. Keep the ask class small, and show the approver the evidence. Human-in-the-loop is not a button and the authority ladder from read to write cover how an action class earns its way from ask to allow.
The same event will arrive twice
Event delivery is rarely exactly once. Some providers retry failed deliveries automatically; others leave redelivery to the receiver. GitHub's webhook guidance asks receivers to respond within 10 seconds, after which the delivery counts as failed, and to redeliver missed webhooks once the server is back up. GitHub does not redeliver failed deliveries automatically, and redelivery is available for the past three days. The guidance recommends the X-GitHub-Delivery header to make sure each delivery is unique per event, and notes that a redelivery carries the same delivery ID as the original. Rietspruit's payment notifications behaved the same way.
Two controls stop a repeated event from repeating its effect:
- Deduplicate at the trigger. Store each event ID once. A second delivery with the same ID is recorded and dropped. This is cheap and catches most repeats.
- Make every external action idempotent. Give each action a key derived from the ticket and the action, for example "ticket 112, send kick-off invitation". Before acting, check whether that key has already succeeded. Where the target system supports it, pass the key along. Stripe's idempotent requests are a well-documented example: a retried request with the same key does not perform the operation twice. Stripe's documentation also notes that, for its v1 API, keys can be pruned once they are at least 24 hours old, so your own record of completed actions is still needed for anything that can be retried later.
The second control matters because deduplication only sees events. If the agent itself retries after a timeout, or a worker restarts halfway through, only the action key prevents the second email. Who owns the retry? explains how retries multiply across layers.
Loops: the agent's own events
An agent that listens to a system it also changes will hear itself. Rietspruit's board loop was harmless. A loop between two agents, each responding to the other's comments, can run up cost and noise quickly.
Anthropic's GitHub Actions integration shows one sensible default: it rejects events from bot actors unless they are explicitly listed, which its documentation says keeps bots from triggering Claude in a loop (checked 23 November 2026). Apply the same idea everywhere:
- Give the agent its own identity, and drop events authored by that identity at the trigger.
- Do not accept work from another agent unless an admission rule names it.
- Cap tickets per thread per hour, and alert when the cap is hit.
Events carry text, not authority
An issue comment, an email or a chat message can contain instructions. To the agent, those are words in its context. OWASP's Top 10 for LLM applications (2025) ranks prompt injection first, including indirect injection from external content. The permission matrix is the defence that does not depend on the model noticing. If "change the invoice" is a blocked action, a cleverly worded comment cannot make it happen, however convincing it is. The tool gateway is a control point, not a trust boundary, so the block must be enforced where the action is executed, not only described in the prompt.
The agent's own identity
In the public video that compared personal and event-driven agents, the presenter's set-up gave the agent its own GitHub account with write access to the repository. That is better than running the agent on a person's token, because every action is attributable and the access can be revoked on its own. Go further: give that identity only the scopes its allow and ask classes need, and keep the block classes impossible at the credential level where the target system allows it.
What this means for South Africa
Many South African firms are wiring agents to payment providers, banking notifications, WhatsApp Business messages and municipal or customer service portals. These systems redeliver, retry and sometimes reorder events, and an effect such as a payment instruction, a customer message or a service request is hard to reverse. Where the agent's actions touch personal information or regulated activity, the permission matrix is also part of how you show reasonable security safeguards. This is general information, not legal advice.
Before you switch on the first event trigger
- Write the admission rules and the trigger record (part 2).
- Classify every action as allow, ask or block, and test that block wins.
- Deduplicate events by ID at the trigger.
- Put an idempotency key on every external action and record completed keys.
- Give the agent its own least-privilege identity, and drop its own events.
- Cap tickets per thread and per hour, with an alert.
- Run in observe mode first: let the router decide and record, but not act, for two weeks.
Next in the series, on 27 January: Why an agent must produce evidence, not just output. Previous: Part 4, Memory is not a database dump. All parts are on the series page.
Sources and limits: this article draws on a public video discussion comparing personal agents and event-driven agents; its points are paraphrased, not quoted, and were checked on 23 November 2026 against a timestamped transcript and the published video's description and chapter markers. Product and platform behaviour comes from official documentation checked on 23 November 2026 and may change. Rietspruit Digital is fictional.
How CloudNala can help
CloudNala designs the permission boundary for event-driven agents. We map every trigger source and action class, write the allow, ask and block matrix with your owners, add deduplication and idempotency keys to the actions that matter, set up the agent's own identity, and run the agent in observe mode until its decisions have earned the right to act.
Work with CloudNala
CloudNala helps organisations move from technology ambition to practical execution across cloud, AI, data, platform engineering and digital services.
Whether you are exploring AI, modernising your cloud environment, building a public-sector digital service, or turning an idea into a working MVP, we can help you shape the roadmap and deliver the next step.
Book an Always-On Agent Design Session or write to us at consult@cloudnala.co.za