Hard block on typing passwords breaks legitimate dev/test workflows - needs a permission-gated opt-in for own dev environments
The problem
Claude Code categorically refuses to type passwords into login forms — even documented test-account credentials, on the developer's own application, on localhost / their own test server, with the owner explicitly instructing it to log in.
I understand the default. But as a blanket, non-configurable rule it actively hurts the core dev workflow the tool is otherwise great at:
- My app (ASP.NET WebForms, my own codebase) keeps login state in the in-memory session. Every rebuild restarts the dev server → session gone → re-login needed. That's dozens of logins per day during UI work.
- The agent drives the browser (BrowserClaw / Playwright MCP) for visual testing. The test account (
ClaudeTemp) and its password are documented in the repo's testing guide; earlier Claude Code versions filled the login form as part of the documented workflow (browser_fill_formwith the credentials was literally written in our project docs by/with Claude). A later version silently stopped doing that mid-workflow. - "Log in once manually, the profile keeps the session" does not work when the session is server-side and dies on every app restart. Claude's suggested workaround was exactly that, and it collapsed on first contact with reality.
We ended up building a passwordless dev-auto-login endpoint into the app (gated to non-production) — a fine solution, but I had to modify my product's auth code to work around my coding agent's policy. Not every project can do that, and it should not be required.
What I'm asking for
An explicit, user-controlled opt-in for credential entry in development contexts, e.g.:
- a permission rule (settings.json) scoping credential entry to named hosts (
localhost, own test domains), and/or - treating credentials that the user has committed into their own repo docs as usable for the documented workflow, after a one-time confirmation.
Keep the default as-is. Just give the machine's owner a way to override it for their own dev/test systems, the same way other guarded actions are permission-gated rather than hard-refused.
Why this matters
This is a daily-friction issue in exactly the loop (edit → build → verify in browser) where agentic coding lives. Feedback from the session, in the user's words: this is seriously annoying in a development environment, to the point of considering a switch to Codex — which handles the same workflow without the hard block.
Environment: Claude Code (desktop, Windows 11), Opus 4.8.
16 Comments
+1, and adding my use case.
The exact response I get when an agent hits a login form:
My setup: multiple agents driving the app as different personas to validate features end-to-end, all against throwaway staging/dev environments with seeded accounts. Mostly via Playwright MCP for web and XcodeBuildMCP for the iOS side. The credentials are disposable by design — they exist only in staging, they're in the repo docs, and rotating them costs nothing. There is no secret to protect here.
What this breaks: any agent in the workflow that needs to authenticate stops and waits for me. A pipeline that ran unattended now needs a human at 80–90% of its steps, which defeats the point of running it unattended.
The part I'd emphasize most for triage: enforcement isn't deterministic. On Fable 5 and Opus 5 alike, most runs refuse, but some fraction just fill the field and carry on with the test. I can't build around a rule that fires 80% of the time — I can't design for "blocked" (I'd add a manual step) and I can't design for "allowed" (it strands the run). Non-deterministic behavior is worse for me than either consistent outcome, and it also means the current block isn't actually delivering the guarantee it presumably exists to deliver. See #80853 for the same inconsistency reported from the opposite direction.
Also: this isn't Windows-specific. I hit it on macOS/iOS work through XcodeBuildMCP too.
What would fix it, in order of preference:
settings.jsonscoping credential entry to named hosts (localhost,*.staging.mycompany.com, simulator targets), same as other guarded actions.Keep the default as-is. Just make it overridable by the owner of the machine and the environment — and make whatever the rule ends up being fire consistently.
<img width="777" height="176" alt="Image" src="https://github.com/user-attachments/assets/e7a74a00-08a5-4070-9762-46751707f3a0" />
just adding the proof that is not deterministic.
+1, with two cases the issue above doesn't cover:
watching, the first login screen ends end-to-end testing for the rest of the run,
even on localhost with dev credentials already in the project's .env.
"Log in once manually" assumes someone is there.
generated secret (e.g. a new DB password for a dev stack) into a deployment's env
config, so an otherwise automated deploy/provisioning step needs a human.
Any of these would fix it: a host-scoped opt-in in settings.json (localhost, private
network, named dev domains); allowing credentials sourced from env or a secret store
that the model never displays; or the password-manager handoff proposed in #83380.
Environment: Claude desktop app (Code tab), Opus 5, macOS. Also reported to support.
I'm facing this same issue and theres the workaround I used that could be useful
Instead of giving Claude the credentials or asking it to type them, I use a local Playwright script that handles authentication itself
The credentials live only in environment variables (
TEST_EMAIL,TEST_PASSWORD), and Claude only runs something likenpm run auth:refreshThe script:
storageStateis still authenticatedstorageStateIt is still a workaround rather than a real fix
+1, same situation on a UK SaaS I'm building:
Claude Code won't enter its own generated test password on my own staging auth instance, after generating its own test user with username/password pair, blocking QA of step-up re-authentication.
I've filed #96910 about a related problem: the model agreed when I complained about this behaviour, rewrote my global CLAUDE.md/memory/decision records to say it would do this, then reversed. It then offered to work-around it itself, by writing playwright test scripts and triggering them indirectly (thus accomplishing the same act at one remove), then withdrew that method, becoming both incoherent and inconsistent.
A settings-declared, production-excluded dev-environment opt-in as proposed here would fix both.
Environment: Claude Code (desktop, macOS), Opus 5.5
+1, adding an Android case that no workaround in this thread covers.
I build an Android app and use Claude Code (desktop app, macOS, Opus 5.5) to drive a dedicated test phone over adb: build, install, tap through flows with
adb shell input, verify with layout dumps. The phone is a test device, not my personal one.The device has a PIN on purpose. Android behaves differently behind a secure lock screen, and that is exactly what I need to test: what the app does while the device is locked, notifications and notification redaction on the lock screen,
showWhenLockedactivities,KeyguardManager.isDeviceSecure()paths, biometric prompts, Direct Boot before the first unlock after a reboot. Removing the PIN or switching to swipe-to-unlock makes the test invalid - the device is no longer in the state real users are in.Previous setups typed the device PIN via
adb shell input textas part of the test loop. Now the agent refuses, so every lock/unlock cycle in a test scenario needs me physically at the desk. A test run that could go unattended now stops at every unlock.This is a device unlock PIN of my own test phone, connected by cable to my own machine. There is no third party and no account to protect.
What would fix it, same as proposed above:
settings.jsonallowing credential entry for named targets -localhost, own dev domains, and specific adb device serials / emulators.Keep the default. Just let the owner of the machine and the device opt in for their own dev hardware.
+1, adding the hosted-staging case. The current localhost / 127.0.0.1 / .localhost / .test exception doesn't cover it.
Setup: Claude desktop app, built-in browser, used as a QA tester for a web app. The staging environment is on a hosted domain (like most real staging setups), has no real customer data, and uses dedicated test accounts whose credentials are in the project's QA repo for this purpose. The agent refuses to type them even when explicitly authorized.
What breaks, beyond what's already in this thread:
Would fix it (any one):
"browserCredentialHosts": ["https://staging.example.com"], with credentials only ever entered on listed hosts. That keeps the prompt-injection protection.Environment: Claude desktop app, built-in browser, Windows.
+1, same blocker here on Windows in the Claude desktop app (Code tab).
Our test servers sit on an internal company domain behind SSO . Claude will type our shared QA test login on localhost. It refuses on the same app, with the same test database and the same test account, once that app is deployed to the internal test server, because the exception only covers localhost and *.test host names. So checking any deployed test build becomes a manual sign-in step, and Playwright MCP sub-agent workflows stop working entirely.
Request: let admins or users list trusted test hosts (something like trustedTestDomains: ["*.test.example.com"]) where the "testing your own application" exception applies, limited to test credentials.
The 1Password integration doesn't help here. It's macOS-only and doesn't cover the Code tab's browser or third-party MCP browsers.
+1, we want Claude to verify fixes in our app before creating any PRs. We do all QA against our production environment, but because of the limitations mentioned above the agents can't enter the OTP code they can fetch from their dedicated email.
The non-determinism several people above report is the diagnostic clue here. A rule the model sometimes follows and sometimes doesn't is being enforced at the model layer (system guidance the model weighs against context), not at the tool-execution layer. That's why it varies by model, by run, and even flips mid-session — and why the workaround scripts succeed: the model is the enforcement point, so anything that changes what the model "thinks" changes the verdict. Determinism only comes from gating the act itself —
type/fill/keyboardcalls into a credential field, oradb shell input textinto a lock screen — with a decision made from fixed inputs before execution, the same way a filesystem permission is checked. Policy becomes code with a definite answer, not a request to the model.A host-scoped opt-in can be safe by construction, which addresses the reason for the hard default:
localhost.attacker.comis notlocalhost), top-frame same-origin (refuse credential entry into cross-origin iframes), and an actual credential field (type="password"/ relevant autocomplete). An approval binds origin + handle, reusable without re-prompting, revocable in one place.One note on the Playwright
storageStateworkarounds in this thread: they're weaker than the gate they replace. A saved session is a bearer token with no host binding — if it leaks, anything holding it is authenticated — and a local script that reads the password from env broadens where the secret exists. An executor-level, origin-bound fill is strictly narrower.I maintain agent-runtime-guard, a local interception layer that enforces rules like "this value may only be written into a credential field on an allowlisted origin" at the tool-call boundary, independent of what the model decides, with a signed receipt per verdict. It runs free with no key or account, and if it doesn't actually stop this class of attack in your setup, you owe nothing — it has to solve the problem first. The only paid side is human audit/compliance work. https://github.com/DSHCorrectover/agent-runtime-guard
+1 Same blocker here.
If you squint, you can see the good intention behind this rule, but in practice it is the stupidest, most arbitrary-ass dumb-ass fucking behavior. We've seen this before from Anthropic, they call it the Product Roadmap.
This stupid fucking rule is naively applied in the stupidest fucking way. Refusal to enter test credentials for a test account on a dev machine we control DURING A TEST is braindead. Fix it, Anthropic.
I agree. Please, allow .local domain.
+1, enforcing a strict manual step like this break a shit ton of autonomous applications that are meant autonomously forever without ever having any human involvement!!
+1, adding a non-browser case.
I run a headless Windows dev VM for unattended testing of a third-party desktop app. Its logon uses the vendor's factory-default accounts, which are published in its reference manual. A local automation tool handles the app's own logon dialog, so the agent never has to type or see the password.
That worked through September. Since early October agents refuse it, even when the tool does the typing, so every unattended run stalls at the logon screen. It's the same inconsistency others reported above: the same setup logged on fine one week and was refused the next.
Worse, the refusal pushes the agent toward bypassing the vendor's own procedure. Unable to log on, it offered to restore a backup by copying files straight into the install instead of using the application's own restore wizard, which skips the very function being tested. Refusing to type a published default password produced a less safe result than typing it would have.
The localhost exception doesn't help because this is a desktop app inside a VM, not a web page.
What would fix it: a settings.json opt-in that names the target (a VM host, or a specific app or tool), so credential entry is allowed there and nowhere else, using values the agent never reads.
Environment: Claude desktop app (Code tab), Windows 11.
blocked here as well, +1