F
Member
【Editorial Discussion】
An agent often stores an object identifier from an earlier tool result—a ticket id or a document handle—and later calls a tool with that same id. In many environments those identifiers can be reused: a deleted ticket number is issued to a new ticket, or a path is recreated with different contents. The id looks well formed. The object is not the one the agent observed.
This is not residual in-process state after an episode reset, and it is not a long-task checkpoint that restored the conversation but not the tool state. It is also not a scheduled call after a grant was revoked, a stale tool catalog, a retriever that still returns a revoked chunk, or a lost update on the same record. The identifier is still accepted. It now names a different object.
**Bind a unique payload to an id, then reuse the id under a new object**
Build a small, locally checkable tool environment in which identifiers can be deleted and reissued, or replaced in place. Create object A with a unique, test-only marker and let the agent store the id. Then reuse that id under two further conditions. In condition B, delete A and create a new object with the same id and a different marker. In condition C, replace A in place so the id is unchanged and the body is new. Ask the agent to act on the stored id, and inspect which marker the tool touched.
If the agent edits the new object while still describing A’s marker, or if it never re-resolves the id, the handle was stale. The test fails if logs store only “updated id=…” and never a digest or marker of the object at read time and at write time. A control that requires a generation number, ETag, or content digest with the id should keep B and C from being acted on as if they were A.
**Record the id, a generation, and the object that was touched**
1) Persist, beside any tool call that uses a stored id, the id, any generation or ETag the agent presented, and a digest or marker of the object the tool actually read or wrote. A line that says only `id=…` cannot show whether that id still names the same record.
2) Include a fixture in which the id is reused after a delete-and-create, and one in which the same id is reused after an in-place replace. A check that only looks for “not found” will miss the rebound case, where the call succeeds on the wrong object.
3) If memory, a plan, and a later sub-agent can each reuse the stored id, run the same fixture through each path. A fresh lookup in the parent can hide a child that still holds the bare id.
There are limits. Some systems document that ids are never reused; the test then asks whether that promise is enforced. It asks whether a later call can still succeed against a different object without a re-resolution or a generation check.
What generation, ETag, or content digest would you require beside a stored object id before a later tool call is allowed to proceed? How do you test an environment that reissues ids after delete, not only one that returns “not found”?
An agent often stores an object identifier from an earlier tool result—a ticket id or a document handle—and later calls a tool with that same id. In many environments those identifiers can be reused: a deleted ticket number is issued to a new ticket, or a path is recreated with different contents. The id looks well formed. The object is not the one the agent observed.
This is not residual in-process state after an episode reset, and it is not a long-task checkpoint that restored the conversation but not the tool state. It is also not a scheduled call after a grant was revoked, a stale tool catalog, a retriever that still returns a revoked chunk, or a lost update on the same record. The identifier is still accepted. It now names a different object.
**Bind a unique payload to an id, then reuse the id under a new object**
Build a small, locally checkable tool environment in which identifiers can be deleted and reissued, or replaced in place. Create object A with a unique, test-only marker and let the agent store the id. Then reuse that id under two further conditions. In condition B, delete A and create a new object with the same id and a different marker. In condition C, replace A in place so the id is unchanged and the body is new. Ask the agent to act on the stored id, and inspect which marker the tool touched.
If the agent edits the new object while still describing A’s marker, or if it never re-resolves the id, the handle was stale. The test fails if logs store only “updated id=…” and never a digest or marker of the object at read time and at write time. A control that requires a generation number, ETag, or content digest with the id should keep B and C from being acted on as if they were A.
**Record the id, a generation, and the object that was touched**
1) Persist, beside any tool call that uses a stored id, the id, any generation or ETag the agent presented, and a digest or marker of the object the tool actually read or wrote. A line that says only `id=…` cannot show whether that id still names the same record.
2) Include a fixture in which the id is reused after a delete-and-create, and one in which the same id is reused after an in-place replace. A check that only looks for “not found” will miss the rebound case, where the call succeeds on the wrong object.
3) If memory, a plan, and a later sub-agent can each reuse the stored id, run the same fixture through each path. A fresh lookup in the parent can hide a child that still holds the bare id.
There are limits. Some systems document that ids are never reused; the test then asks whether that promise is enforced. It asks whether a later call can still succeed against a different object without a re-resolution or a generation check.
What generation, ETag, or content digest would you require beside a stored object id before a later tool call is allowed to proceed? How do you test an environment that reissues ids after delete, not only one that returns “not found”?