VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Vocabulary Coding and Engineering | Semantic Idempotency: When AI Receives the Same Instruction Twice, Is It One Action or Two?

Two university researchers connect reviewer comments to decisions, manuscript changes and locations in a response matrix.

When a person says “send the invoice” and repeats the message because nothing appears to happen, the second sentence may be a retry of the first request, not permission to send a second invoice. Vocabulary Coding and Engineering proposes Semantic Idempotency: preserve the identity of the intended operation when a message travels through retries, translations, paraphrases and AI agents. The objective is to distinguish repeating words from repeating an action, so that communication failure does not quietly turn one human intention into multiple consequences.

Software engineering already distinguishes operations that can be repeated without changing their intended effect from operations that may cause an additional effect. RFC 9110, section 9.2.2, defines idempotency for HTTP request methods in this limited sense. This article applies the analogy to meaning and authority, rather than claiming that HTTP itself can infer human intentions. A proposed Z record must distinguish the source utterance, authorized operation, operation identity, retry attempt, outcome and unresolved state. The words alone cannot determine whether a second action is wanted.

  • A repeated sentence may be a retry, reminder, new request or correction.
  • Identical text does not establish identical intent; different text can refer to the same operation.
  • Use a scoped operation identifier and retain the original authorization.
  • Do not automatically retry consequential actions with unknown outcomes unless safe recovery is established.
  • Deduplicate effects, not legitimate audit history or independent requests.
  • A changed target or condition requires a new evaluation, not blind reuse of an operation key.
  • The proposed protocol needs empirical tests; it does not guarantee exactly-once real-world effects.

Chapter index

1. One sentence, two possible worlds

A person asks a friend to order one notebook. The friend has already placed the order, but a message confirming it is delayed. The person asks again: “Can you order the notebook?” In one interpretation, the second message means please complete the earlier request if it remains unfinished. In another, it means buy another notebook. The sentence is compatible with both worlds. A system that immediately orders a second item has made an operational decision using evidence that may not be sufficient. The important distinction is whether the user intended one purchase or two, not whether the sentences have matching characters.

2. A message is not the event it describes

Messages can be copied, quoted, translated, resent or delivered more than once. Events may occur once even if multiple documents describe them. The proposed vocabulary model distinguishes utterance identity, operation identity and actual event identity. A new message can refer to an old operation. An old message can be replayed after its authorization has expired. Multiple receipts may record separate attempts to deliver one request. None of these identities is interchangeable. If the system counts messages as events, repetition becomes an invisible multiplier. If it deduplicates every matching sentence, it may erase legitimate new actions.

3. The technical analogy: idempotency

In arithmetic, applying a function twice can sometimes produce the same final result as applying it once. Setting a fictional account preference to dark mode twice leaves the preference in dark mode. Incrementing an account counter twice normally increases it twice. HTTP semantics uses an analogous distinction for the intended effects of requests. RFC 9110 also notes that server logs and other incidental effects can still differ. Our language-engineering proposal is not a replacement for protocol semantics. It asks how human intent can be linked to an operation with known repetition behavior.

4. Why a perfect paraphrase is not enough

An AI may rewrite “send my copy of invoice 42” as “please email me invoice number 42.” These expressions can preserve the target and recipient. Nevertheless, performing both might deliver two emails if they are treated as independent operations. Conversely, a user can type exactly the same request on two different days because a new event is desired. Similarity scores and text hashes alone are poor evidence for operation identity. They can support duplicate detection, but they do not establish authorization. A receiving agent should preserve the explicit relationship to a previous operation when that relationship is known.

5. A minimal semantic operation record

A proposed record contains an operation ID, requesting principal, authorized actor or service, intended action, target identity, quantity, scope, destination, conditions, expiry if specified, source message and definition version. Separate attempt records contain attempt identifiers and outcome evidence. The operation record also describes whether the requested effect is known to be safely repeatable. If the user says “one copy”, that quantity is part of the meaning and should not be inferred from how often the request appears. IDs must be scoped appropriately; a bare identifier from another tenant or workflow must not control an unrelated action.

6. Work through one fictional invoice

Operation INV-SEND-01 means email one copy of invoice 42 to the authorized recipient. Attempt A times out before the client receives a response. The outcome is unknown: perhaps the email was delivered, perhaps it was not. Attempt B arrives carrying the same operation identifier and unchanged scope. If the service offers a trustworthy deduplication mechanism, the client can use it according to its documented rules; otherwise it should inspect the authoritative status or seek clarification rather than assume that the timeout proves failure. Marking the action as completed requires evidence of the relevant outcome.

7. The distinction between desired and observed effect

A payment instruction can be accepted by an intermediary without the payment being settled. An email provider can accept a message without establishing that a recipient read it. A delivery service can dispatch a parcel without delivering it. The word done must therefore be qualified by the stage that was observed. A retry protocol should know which outcome is being deduplicated. If a system says sent, it should name what that means in its own service: queued, accepted, transmitted or otherwise verified. Different effects need different receipts and evidence, not a single optimistic status.

8. Four common forms of repetition

A transport retry resends a request because delivery or response failed. A reminder asks for progress on an existing operation. A fresh instruction authorizes a new operation. A correction changes some part of an earlier request and may require cancellation or compensation if an action has already occurred. The same natural-language sentence may function in more than one category. The system should not force a choice from wording alone. Thread context, explicit references, timestamps and authoritative operation records can help. When the remaining uncertainty changes a consequential action, a clear question is better than guessing.

9. The same operation key with a changed payload

Suppose INV-SEND-01 originally points to invoice 42 and the permitted recipient. A later message claims to use that operation identifier but changes the recipient. A well-designed workflow should not treat this as an ordinary retry. The discrepancy may be an honest correction, a software defect or an unauthorized alteration. Preserve the mismatch and stop the automatic path. A new action or revision requires appropriate authorization and a clear relation to the original. Comparing the scope and target is particularly important because an identifier is not a bearer credential and does not confer rights.

10. An operation can expire while its words survive

A person may authorize a reminder today but not a recurring reminder every day. A purchase approval might be limited to a particular quote, deadline or quantity. If a message is replayed weeks later, the words still exist but the authority may no longer apply. Store expiry or validity conditions where the source defines them. Never fill in an unknown expiry as though it were indefinite authorization. Even when a service still recognizes an old operation key, the workflow must consider the current state and applicable authority. Preserving meaning through time includes preserving limitations on action.

11. Exactly-once language requires humility

A distributed system may encounter crashes between executing an effect and recording a receipt. An external service may have a different definition of completion or lack a deduplication feature. In such circumstances, an AI assistant cannot promise exactly one physical consequence simply by assigning an ID. Durable operation records, transactional boundaries where supported, reconciliation and reliable downstream interfaces can reduce duplicate risk. They do not erase every failure mode. State the scope of the guarantee: for example, at most one committed update in a particular database under documented conditions, rather than exactly one event everywhere in the world.

12. Preserve a complete attempt history

Preventing duplicate effects should not delete evidence that multiple attempts occurred. An audit trail can show an original request, two network attempts, a status query and one confirmed business event. This is useful for debugging, billing disputes and reviewing failures. The audit log and business effect ledger serve different purposes. A system that counts three audit entries as three orders is wrong; a system that deletes the audit entries to make the count look tidy loses evidence. Link attempts to an operation identifier while leaving each attempt distinguishable. Apply appropriate privacy and retention rules to both logs.

13. Zoom 0: an individual using an assistant

A student may ask an AI to save an essay, then ask again after a slow response. The student probably cares that the current document has been saved in the intended place. A safe interface can display the existing document and its revision instead of silently creating a new copy. If the student explicitly wants a second version, the interface should support that too. The distinction is especially valuable when editing, sending or submitting work. A clear receipt and a visible record of what changed reduce unnecessary repeated requests and make the user’s control over the task more intelligible.

14. Zoom 1: families and everyday spending

A family orders household supplies. Two people forward the same shopping request to a shared assistant. A household-level order identity could distinguish a forwarded request from a separate shopping list. But it should not assume that all matching items are duplicates: one person may genuinely need an additional item. The assistant can surface the existing intended quantity, recent order and unresolved question before adding anything consequential. This is not an invitation to monitor private conversations indiscriminately. Use authorized information only and preserve the minimum context necessary for the decision.

15. Zoom 2: businesses and institutional workflows

An organization receives a customer service request through email and a support form. Both messages may concern the same broken device. Linking them to one case can avoid repeated investigations, but the system must not merge distinct incidents merely because the customer describes similar symptoms. Case identity, device identity, time, source and explicit relationship matter. The same principle applies to invoices, refunds and approvals. A duplicate message is not a duplicate entitlement, and a legitimate second claim must not be suppressed merely to improve efficiency metrics. Review uncertain merges and maintain a route for correction.

16. Zoom 3: public administration

Imagine a public office that receives repeated applications when its confirmation service is unreliable. Residents may believe the first submission disappeared. A transparent reference number and a status lookup can help them understand whether a request already exists. The record should preserve submission attempts without automatically creating several conflicting cases. At the same time, people must be able to submit a legitimately new application or an authorized amendment. The legal effect of any submission depends on the relevant jurisdiction and process; this fictional design is not a general rule about administrative law.

17. Zoom 4: distributed AI agents

An orchestrating AI may ask three specialist agents to help with one task. Each specialist may produce a message describing the same desired operation. If every agent independently acts, the operation can be multiplied. An architecture can separate planning messages from authorized execution messages, designate the responsible executor and give each requested effect a scoped identity. A specialist report should not inherit permission merely because it repeats the original instruction. This complements the Semantic Commit Boundary: that earlier safeguard asks whether an action may proceed; the present safeguard asks whether the same authorized operation has already been attempted or completed.

18. Zoom 5: archives and generations

Future historians may find multiple copies of an order, a newspaper report and a receipt. These documents can preserve independent evidence of one event or describe genuinely different events. An archive should retain source identities and explicit relationships such as copy of, confirms, revises or refers to. Counting every surviving document as a separate event can distort historical records. Equally, merging all documents with similar words can erase differences. Semantic idempotency at this zoom becomes disciplined event identification, with uncertainty preserved where surviving evidence cannot settle the question.

19. The trial: repeated request versus independent request

Construct six fictional cases: an unchanged retry with the same operation ID; an independent request with identical text but a new explicit authorization; a paraphrase linked to the existing operation; a key reused with changed target; a timeout with unknown outcome; and an expired authorization. Expected behavior is to link the unchanged retry, allow a genuinely authorized fresh operation, retain the paraphrase relationship, reject the conflicting payload for automatic execution, reconcile the unknown outcome, and stop the expired request. These are expected outcomes to test, not observed results. Record both the intended effect and the actual observed effect.

20. Use a simulator before real-world trials

A toy service can model a counter for committed operations, a map of operation identifiers to approved scope, and an append-only attempt log. Inject a response loss after a simulated commit. Retry the same approved operation through a deduplicating interface and inspect whether the simulated counter increments again. Then run a distinct authorized operation with identical text and check that the counter increments once more. This tests the distinction that a text comparison would miss. A real-world system must address concurrency, durability, permissions and downstream failure modes separately before any live deployment.

21. Concurrency is a different engineering problem

Two requests for the same operation may arrive simultaneously. A naive implementation that reads a completed flag and then independently writes an effect can permit both executions. A system needs appropriate atomicity or transactional controls in the relevant service, not merely a vocabulary record. Where a downstream operation cannot be coordinated atomically, reconciliation and carefully defined recovery matter. The proposed Z record identifies what is intended to happen once; the execution architecture determines whether the intended repetition policy can actually be enforced. A language protocol cannot repair a flawed transaction mechanism by itself.

22. The user-facing confirmation

A useful message might say: “Your earlier request to send invoice 42 is recorded as accepted by the mail service. Do you want another copy sent, or are you asking about the earlier send?” If the service cannot establish the earlier outcome, say that explicitly. This preserves the user’s option to request a fresh action without pretending that an unknown result is a failure. Low-risk, safely repeatable operations can have simpler interfaces. Confirmation requirements should be proportional to the risk and grounded in the actual system capabilities, not imposed as an empty ritual.

23. Privacy, replay and misuse

Operation identifiers should not expose private details or function as authentication tokens. Validate the requesting principal and permitted target independently of the identifier. Protect the logs, minimize unnecessary message contents and define appropriate retention and deletion practices. Indefinitely storing all raw conversations in the name of deduplication would create new privacy risks. Some operations require a longer retained receipt than others; make the scope explicit. The system must also detect suspicious reuse across contexts without treating every repeated request as malicious. Uncertainty can be a normal consequence of unreliable communication.

24. Four-week practical build

Week 1: choose a harmless simulated workflow, define the operation and attempt record, and enumerate its effects. Week 2: implement an explicit retry path and test new operations with matching text. Week 3: inject lost responses, changed payloads, expired authority and concurrent attempts; document actual failures. Week 4: have an independent reviewer reproduce the results and inspect whether the user-facing explanation matches the trace. Keep all testing synthetic until the real service has a documented safe operation contract and appropriate review.

25. Questions readers should ask

If an AI says it tried again, was that a new action or another attempt at the same action? If a receipt is missing, what evidence establishes whether the action occurred? Is the requested operation safely repeatable, and within which service boundary? Does a retry preserve the original authorization, target and conditions? What happens if the same key accompanies changed data? Can the user deliberately request an additional action? These questions are more useful than treating repetition as always harmless or always forbidden. They turn a familiar vocabulary problem into a concrete test of the system.

26. The next engineering step

Add operation identity and attempt identity to the proposed meaning transfer record. Keep the semantic validation profile attached, so recipients can see what the record was checked against, and preserve the distinct authority and outcome evidence. A pilot can measure both duplicate effects and incorrectly suppressed legitimate operations. Report the denominator, failure cases, retry conditions and limits of the tested environment. Zero loss in this context means retaining the distinctions needed to answer the declared questions about operation identity and scope, not claiming that all natural language or external effects can be perfectly controlled.

Technical references

Research status: HTTP idempotency is an established protocol concept. Semantic Idempotency is an exploratory language-engineering extension. All operation examples and proposed trials are fictional. Exactly-once real-world execution, universal zero loss and production safety are not established.