Anthropic is ending subsidized usage of Claudee Code](/tools/claude-code/)'s -p flag on June 15, 2026. The flag lets users run Claude Code in non-interactive mode - single prompt in, single response out, no persistent session - which has become a common pattern for scripting and lightweight automation. Once the change hits, that usage will draw from API credits rather than the standard subscription.
A developer has already shipped a hook-based workaround. The approach replicates the stateless, one-message-at-a-time behavior of -p but runs entirely within interactive mode, meaning it stays on a regular Claude subscription with no SDK credit consumption. Hooks in Claude Code are shell commands that fire on specific events - in this case, the workaround uses them to intercept input and reset state between messages, mimicking the non-interactive pattern from within a normal session.
The project picked up 29 GitHub stars within its first day, which is a decent signal that the -p deprecation is hitting a real nerve. Plenty of teams have built lightweight automation on top of Claude Code's non-interactive mode precisely because it's cheap and predictable - one message, one response, nothing persisting between runs.
Whether this workaround survives whatever Anthropic ships on June 15 depends on how deep the credit-metering change goes. If it's purely about billing mode and not about session architecture, hooks-based workarounds should hold up. If Anthropic changes how non-interactive requests are classified at the API level, the approach may need updating.
For anyone running Claude Code automations that fire repeatedly throughout the day, it's worth testing this before the deadline rather than scrambling after.