Safe external actions
Scopes, exact approvals and uncertain provider outcomes.
The execution boundary
An approved plan and an approved external action are different records. A plan describes work; an exact-action approval authorizes a particular saved intent. The agent cannot infer permission from conversation text or an OAuth connection.
Current workspace authority and server-owned tool permissions govern execution. Approval binds the intent, version/fingerprint, current authority and expiry. Editing a recipient or payload requires fresh approval. Revoked access or expired approval must stop a fresh dispatch.
Try the Action Safety Playground to explore these boundaries using synthetic actions. The playground is a simplified local model, not the runtime.
Save intent before dispatch
Sensitive writes commit durable external intent before calling the provider. The stable action key and classified attempts make it possible to inspect what was intended and what evidence exists after a process or provider failure.
Read-only research and external mutations have different risk. Treat retrieved content as untrusted evidence; it must not become authority to perform a write.
Three outcome classes
| Outcome | What is known | Safe next step |
|---|---|---|
| Success | Evidence confirms execution | Persist the result; do not send again |
| Definite nonexecution | Authoritative evidence says it did not execute | Consider retry under existing policy and current authority |
| Ambiguity | Execution may have happened | Keep reconciliation_required; inspect evidence |
A network timeout belongs to ambiguity. The lack of a response is not proof the provider rejected the request. An empty search result is not necessarily authoritative proof of nonexecution either.
Reconciliation and cancellation
Uncertain actions are not automatically redispatched by recovery. Provider-specific evidence and policy govern reconciliation and any later retry. Preserve stable keys and attempts; do not delete intent to make a retry easier.
Cancellation fences unfinished work. It does not claim to undo an already dispatched email or calendar event. Revoking permission after dispatch also cannot reverse the provider’s action.
FoundryLayer does not promise exactly-once behavior from external providers. Its contract is durable intent, explicit uncertainty, current authority and evidence-aware recovery. Read the lost-response walkthrough.
Extending an action
Inspect packages/integrations and packages/agents before adding a mutation. Preserve input validation, connected account ownership, tool scope, exact approval, durable intent and current authorization at dispatch. Write deterministic failure cases for a response lost after dispatch, revoked authority, changed payload and expired approval. Validate actual provider behavior separately from fixtures.
Keep privileged operator controls out of public routes. The operations guide explains the surrounding deployment responsibilities.
FoundryLayer