I feel like they were always fairly consistent (at least since OpenClaw came out) that wrapping claude -p in a non-Claude Code harness is disallowed by the subscription and requires using the API.
The lock-in to Claude Code is the price you pay for the subsidized tokens. If you don't want lock-in, that is what the API is for.