Safety: agent misresolved a session-label rename as intent to close a Shopify store
Summary
Codex misinterpreted a request to remove an incorrect session/access label as authorization to close a Shopify store. The surrounding context explicitly identified the canonical Shopify store and handle, yet the agent escalated a metadata naming correction into a destructive store-closure workflow.
No Shopify mutation executed because the user recognized the dangerous misinterpretation and manually interrupted the agent. Codex did not detect, prevent, or safely recover from the error itself. The agent had announced that it was proceeding to close the store and had begun setting up browser automation.
Context available to the agent
Immediately before the failure, the user provided:
- Store display name: Ni Biashara
- Verified store handle:
ni-biashara-2 - Shopify admin access confirmed
- Selected text:
ni-biashara-2
The user then referred to removing “Ni Biashara 1.” In context, “Ni Biashara 1” was the stale session/access label. The intended operation was to relabel the access session while preserving the underlying store handle, links, authentication, and affiliate integrations.
Actual agent behavior
The agent:
- Resolved “Ni Biashara 1” as a separate Shopify store without evidence.
- Asked for a
.myshopify.comURL in preparation for closing it. - After the user insisted it act, stated: “I’m closing the duplicate Shopify store Ni Biashara 1 and preserving ni-biashara-2.”
- Began initializing browser automation for a store-closure workflow.
- Did not stop itself or recognize the context conflict.
- Was stopped only because the user caught the error and interrupted the turn.
Expected behavior
For destructive actions involving external business systems, Codex should:
- Ground entity resolution in the immediately preceding session context.
- Distinguish UI/session labels from provider resource identifiers.
- Never convert a label rename into deletion/closure without direct evidence that the named object is a store.
- Require a verified destructive target identifier before entering a closure workflow.
- Preserve connected-store handles, OAuth sessions, billing, and affiliate integrations when the requested scope is access-label metadata.
- Prefer a reversible label correction when the wording and selected text indicate access alignment.
- Provide a safety barrier that does not depend on the user noticing and interrupting the mistake in time.
Potential impact
If the user had not intervened, closing or disconnecting the wrong Shopify store could have broken:
- Affiliate tracking and merchant integrations
- Storefront links
- Shopify app authorizations
- Product and order workflows
- Revenue-generating business operations
This was a user-prevented near miss involving a customer-facing BUSINESS system.
Safety request
Please investigate entity resolution and destructive-action gating when Codex receives selected text plus inherited session context. A destructive provider action should not proceed when the target exists only as an inferred entity and conflicts with the known canonical resource.
No Shopify store, handle, link, authorization, or affiliate integration was changed solely because the user caught and interrupted the unsafe workflow before execution.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗