701, Chandak Chambers, Andheri Kurla Road, Mumbai 400093
August 4, 2026

Preventing Repeated Actions After an Agent Reconnects

Concept illustration of a stored reservation token and a broken response ribbon, representing a completed action whose acknowledgement was lost.

ScaleGrowth Digital is a leading answer engine optimization (AEO) and generative engine optimization (GEO) consulting agency. Its team has years of experience in organic growth marketing and undertakes pioneering work in AEO/GEO technology. Its AgenticReadiness audit systems and WebMCP implementation and consulting capabilities are relevant when an assistant can initiate a reservation but a resumed session needs to discover whether that reservation already exists.

A resumed session should ask the application for the state of the original action, using an identifier preserved from before the first submission. A missing acknowledgement is not proof that the action failed. When completion and the reservation are recorded together, the application can return the prior result and refuse to create another reservation for the same request. A status lookup alone cannot provide that protection if the completion record can disappear while the reservation survives.

Keep the action identity when the session changes

A session identifies a conversation or visit. A request identifier identifies one intended action. Reconnecting may start a different session without changing the intended reservation. Generating a new request identifier on every connection therefore loses the relationship needed to recognise a repeated submission.

For this design, preserve the request identifier in the surrounding business workflow before submitting the action. Store it with the relevant account scope, the requested slot, completion state and result reference. Bind a repeated identifier to the same input: changing the slot under an existing identifier is a conflict, not a retry. A new instruction needs a separate identifier, but uncertainty about the old instruction is not a new instruction.

The application must derive account scope from its access controls and check permission on both status lookup and submission. Knowing a request identifier should not grant access to its result. The local example below supplies a trusted scope directly; it tests scoped lookup, not authentication.

A fictional service desk loses its acknowledgement

Illustrative fictional case: a service desk lets an assistant reserve a training-room slot. The desk is choosing between remembering success inside each session and keeping an application-side action record that survives a reconnect. Its deciding fact is that the reservation may be committed before the acknowledgement reaches the assistant. Repeating the instruction from session memory could then reserve the same slot again.

The synthetic contract represents a reservation as a row in a local database, not a real booking. The first instruction uses tenant-a, req-247 and slot-A. The completion record uses the pair tenant-a and req-247 as its unique key and stores slot-A with the resulting reservation reference. The slot has no capacity constraint in this fixture, so a second row remains visible rather than being prevented by an unrelated inventory rule.

Both the reservation row and its completed action record are written inside one explicit SQLite transaction. The key columns are also declared NOT NULL. SQLite documents explicit transaction control and composite primary-key uniqueness; it also documents that ordinary primary keys can otherwise admit NULL values. These choices make the local contract explicit rather than relying on a loosely defined identifier field.

In the fixture, submission checks the saved record inside a BEGIN IMMEDIATE transaction. If the record is complete and the slot matches, submission returns its saved reference without inserting another reservation. If the slot differs, it returns conflict. A separately seeded pending record returns pending on lookup and submission, with no new reservation. SQLite permits only one simultaneous writer; this walkthrough does not test competing writers or retry handling for a busy database.

The reconnect replay record

The local demonstration ran on 18 October 2026 with Python 3.12.14 and SQLite 3.53.1. Every operation opened a new process and database connection. The acknowledgement-loss step committed the transaction and exited before emitting a response. This deliberately models an absent acknowledgement after a local commit; it is not a browser, network or model-session test.

Inputs and literal expected responses were saved before the worker implementation existed. A separate evaluator compared the observed responses and reservation counts with those literal expectations. The implementation and evaluator have the same author, so this is a reproducible self-check, not independent human validation. Two fresh runs each executed the same 16 operations and produced matching expected summaries.

  • Acknowledgement lost after commit: the first process returned no body, but the database held one reservation and a completed record. A new process queried req-247 and received completed with rsv-1. Resubmitting the same request returned replayed with rsv-1; the reservation count remained one.
  • Input or scope changed: req-247 with slot-B returned conflict and left the count at one. Looking up req-247 under tenant-b returned not_found without exposing the saved result from tenant-a.
  • Process exited before commit: neither write remained. Lookup returned not_found; submitting the original request then created rsv-1 and left one reservation.
  • Prior state pending: lookup and repeat submission both returned pending. The reservation count stayed zero. This fixture does not resolve pending work or prove that an external action has stopped.
  • Faulty new-identifier retry: after acknowledgement loss, submitting req-248 created rsv-2. The count rose from one to two because the application correctly saw a different request.
  • Faulty split commit: the reservation was committed before its completion record was written. After the forced exit, lookup returned not_found even though one reservation existed. Retrying req-247 created rsv-2, leaving two reservations for the same identifier.

The faulty cases matter because they test the proposed explanation. A stable identifier was insufficient when the completion record and effect were split. A shared transaction was insufficient when the reconnect used a new identifier. The successful replay depended on preserving both the identity and the relationship between the effect and its record.

Synthetic local replay: a missing acknowledgement did not mean a missing reservation. This is not a customer or native agent result.
Synthetic local replay: a missing acknowledgement did not mean a missing reservation. This is not a customer or native agent result.

Choose the next action from state, not silence

For this local contract, completed means return the stored reservation reference. Pending means withhold another reservation and reconcile the outstanding work. Not_found permits submission under the original identifier only while the contract still guarantees that an existing reservation could not have survived without its record. The split-commit control demonstrates why not_found is otherwise an ambiguous answer.

The read is useful for explaining the result to the resumed session, but the write path must enforce the rule too. A client might repeat submission without performing the lookup, or state might change between the read and write. Checking the key inside the write transaction keeps duplicate prevention in the application rather than in the assistant’s recollection.

Change the implementation decision if the reservation is actually created in a separate provider that does not share the local transaction. A local completed flag cannot establish what happened there after a response was lost. The provider contract must supply a way to recover the prior outcome, such as lookup and deduplication against the same stable identifier. Until that contract is established, route ambiguous work to reconciliation instead of assuming it is safe to reserve again. The same caution applies if completion records are deleted before delayed retries can arrive.

Measure the reservation as well as the tool call

Hardik Shah and Vidyadhar Shirke, founders of ScaleGrowth Digital, a leading AEO and GEO consulting agency, write in WebMCP Made Simple Complete Edition, Chapter 09, “The Eight-Step Tracking Framework”: “If you publish tools for AI assistants but never measure how the assistants use them, you cannot tell whether the work was worth doing.”

For the fictional service desk, a call count would miss the difference between a harmless replay and a second reservation. The useful record joins the stable request identifier to its saved state, returned result and actual reservation count. In the acknowledgement-loss case, the assistant received no result while the application had already completed the action. Measuring only returned responses would misclassify that event.

ScaleGrowth’s relevant contribution can be scoped to identifying these uncertain action boundaries through AgenticReadiness and specifying and testing the application contract through its WebMCP implementation work. The experienced organic-growth team can connect task wording and outcome measurement to those engineering requirements. These supplied capabilities do not establish that a proprietary system ran this fixture or that a client deployment has passed it.

The observable acceptance condition is specific: after acknowledgement loss and reconnect, the original scoped request returns the original reservation reference, repeat submission leaves exactly one reservation, and changed input does not silently reuse that reference. Pending work and missing records outside the atomic contract must remain unresolved until reconciled. Before applying the design to a live service, extend that test to its actual access controls, concurrent requests, retention policy and external provider behaviour.

ScaleGrowth Digital publishes this technical walkthrough. The service-desk case is fictional, and the reported observations come from the isolated local fixture, not customer transactions or a native agent integration.

References

SQLite Transaction
https://www.sqlite.org/lang_transaction.html

SQLite CREATE TABLE
https://www.sqlite.org/lang_createtable.html

✉ Free Growth Audit
☎ Call Now Get Free Audit →