Anthropic is moving claude -p to per-token API billing on June 15 — interactive sessions stay subscription-billed. If you have any pipelines that use claude -p today, they'll start generating API charges.
I just thought of a quick stopgap — a ~50-line Python wrapper that replicates claude -p's one-shot behavior using an interactive session instead.
The trick is getting the interactive session to self-terminate after it produces output — the gist handles that plus timeout/retry since LLMs don't always follow instructions reliably.
It's not a long-term solution — but may be helpful to get you through the transition. For my own Claude integration, I ended up having to build something heavier to move away from claude -p.
Anthropic is moving claude -p to per-token API billing on June 15 — interactive sessions stay subscription-billed. If you have any pipelines that use claude -p today, they'll start generating API charges.
I just thought of a quick stopgap — a ~50-line Python wrapper that replicates claude -p's one-shot behavior using an interactive session instead.
The trick is getting the interactive session to self-terminate after it produces output — the gist handles that plus timeout/retry since LLMs don't always follow instructions reliably.
Gist (tested on macOS, but should work on Linux): https://gist.github.com/HammerMei/8ceef2740cf094188e1383fce0... Write-up: https://dev.to/hammermei/claude-p-alternative-for-cicd-a-50-...
It's not a long-term solution — but may be helpful to get you through the transition. For my own Claude integration, I ended up having to build something heavier to move away from claude -p.