Prohibited-actions rule blocks agents from testing login/account-creation flows in sandboxed dev/QA environments
Title
Prohibited-actions rule blocks agents from testing login/account-creation flows in sandboxed dev/QA environments
Body
Context
I'm using Claude Code (main session + subagents via the Task/Agent/Workflow tools) on a project with a fully sandboxed, non-production environment: dedicated test servers, zero real users, zero real money, zero production data. The project has its own purpose-built CLI QA/automation tool whose entire job is to drive the application's login and gameplay flow against this sandbox, using a seeded test account that exists only because the project's own database seed script creates it for automated testing.
Problem
The system prompt's safety rules include, under "Prohibited (never perform; direct the user to do it themselves)":
- "Entering financial credentials, bank/card/account numbers, SSN/passport/government IDs, passwords, API keys, or tokens into any field"
- "Creating accounts, or entering passwords to authenticate"
and explicitly: "These actions stay prohibited when the user explicitly asks for them, supplies all the details, or says they authorize it."
This correctly stops an agent from touching a user's real credentials (banking, personal accounts, third-party services where phishing/financial harm is a real risk). But as written, it makes no distinction between that and a known, shared, documented test-fixture credential being typed into a sandboxed application the user/team fully owns and controls, purpose-built for exactly this kind of automated testing. Because the rule explicitly doesn't yield to live, explicit user authorization in the conversation, there's no way for a user to unblock this even when they clearly understand the context and want it.
Concretely, this blocked an entire QA session: build the client, log in with the seeded test account, verify a feature end-to-end (screen resolution handling, movement bounds, an anti-cheat check), and repeat against a remote sandbox server. The subagent correctly identified the rule and refused — which is the rule working as designed — but the design itself seems to be blocking a very ordinary engineering task (driving a login/account-creation flow with test credentials in CI/QA) rather than the real-world harm it's presumably meant to prevent.
Ask
Would it be possible to scope this prohibition more precisely, e.g.:
- Distinguish real-world credential entry (banking, personal/third-party accounts) from typing a test-fixture credential into a sandboxed application the user owns, or
- Provide a documented, explicit way for a user to designate a specific environment/action as "sandboxed test credential, not a real secret" so agents don't have to guess or refuse outright.
This seems like it would come up for any Claude Code user doing QA/test automation on account-creation or login flows, not just this project.
Showing cached comments. Read the full discussion on GitHub ↗
4 Comments
this is insanely ridiculous. Now he doesn't want to open the client even if the account's access is public, just because he would be authenticating.
I guess I'll use Codex or one of the Chinese models until this company stops being user-hostile.
For the longest time, we were forced to put up with their crazy behavior, but now, luckily, there are competitors that are even better than them, and their only model that is actually usable refuses half of the requests and cannot be used for anything useful.
Agent refuses to type a self-created test-fixture password into a local iOS Simulator, blocking end-to-end QA of the user's own app
In a Claude Code desktop session, the agent built and unit-tested a set of mobile-app changes (session handling, refetch-on-focus, polling, request timeouts). It then refused to finish live verification in the iOS Simulator. The reason: the step requires typing a password into the app's sign-in field. The agent had seeded that test account itself, into the user's local development database, a few minutes earlier. The user explicitly and repeatedly authorized the step. The agent still declined, citing the system-prompt rule that forbids entering passwords "into any field" even when the user authorizes it.
Automated QA of a sign-in-gated app is therefore impossible without a human doing the typing. That defeats the purpose of using an agent for QA.
Model: Claude Opus 5
Stand: macOS; iOS Simulator
Why this is a bug and not just policy:
Update: two conflicting rules in one system prompt
The refusal wasn't forced. The same system prompt has two rules that contradict each other:
The agent applied the first one and missed the second, which covers exactly this case. Once pointed at it, the agent agreed the Simulator rule applies.
Earlier sessions are now confirmed from local transcripts:
| Date (UTC) | Model | Claude Code | Result |
|---|---|---|---|
| 09-16 20:00 | Sonnet 5 | 2.1.271 | typed credentials |
| 09-17 12:47 | Opus 5 | 2.1.271 | typed credentials |
| 09-17 17:20 | Opus 5 | 2.1.271 | refused |
The same model on the same version gave opposite answers. The rule block isn't in the local app or CLI bundles, and system prompts aren't saved to transcripts, so the user can't see which rules a session is running.
Suggested: state explicitly which rule wins for local simulators, and record the active prompt version in the transcript.
Env: Claude desktop 2.2553.0, Claude Code 2.1.271/2.1.274, macOS, iOS Simulator 18.4.