Epilogue - v1 Changes
This is a continuation of the entry ai-platform/v1-implementation
Epilogue - Changes
Background
This v1 platform relied heavily on invocation of Claude Code through Headless CLI e.g. claude -p. which was documented by Anthropic as acceptable usage pattern for instances where you do not want/need an interactive shell.
The CLI allows you to dynamically set other parameters like agents personas, skills, permissions, working directory, etc. when an agent is invoked. I have spent months learning the nuances of Claude Code’s environment, working around bugs and missing documentation. But the system has finally come together.
The Claude Code CLI currently works with both OAuth (subscription) and API_KEY (pay per-call) authentication mechanisms.
Headless Mode
Instead of the claude command launching an interactive terminal session to chat, adding -p to the command launches Claude Code, using all of the same features/instrumentation, but runs the command in the background . 100% Claude Code, just no UI.
This is a documented (supported) feature of Claude Code.
This is why we can’t have nice things…
Meanwhile, a population of people have been doing something a bit different: exporting their Claude Code OAuth token and loading it into third-party agent harnesses to (intentionally) bypass Claude Code’s harness - a clear violation of terms. I’ve heard some people were even altering http headers to bypass usage limits (which come with the subscription).
tldr
Anthropic has said, the loop hole is allowing user to aggressively call Anthropic APIs making it challenging to support the platform, when expected rate limits are being by-passed.
Make sense to me.
Fixing the leak: Plug the hole
To counter-act this, Anthropic has taken action: banning accounts and finally blocking OAuth tokens from being used outside the first-party CLI.
Am I missing something?
Believe it or not, this move to block the “loop hole” has upset a lot of people.
Can we agree? … This is like stealing your neighbor’s internet and being upset when they discover it and cut the cord.
I don’t blame Anthropic - it was the right move. If anything, it probably should have happened sooner.
Problem solved, right?
Apparently not.
In late March, Anthropic launched a new feature to the CLI: claude -p --bare - which starts a stripped down version of Claude Code so that implementers can programmatically layer on only the components that are needed: permissions, settings, hooks, etc.
At face value, this seems like it would be perfect for my solution, right?
Using —bare has some helpful advantages, but there’s a nuance that wrecks the whole thing:
Anthropic has chosen not to support OAuth (subscription) - even though it is used in the first-party app.
Anthropic’s documentation has been slowly morphing to downplay claude -p too.
I recently discovered this hiding in small print in the docs:
tldr
“—bare is the recommended mode for scripted and SDK calls, and will become the default for -p in a future release.”
What This Means
Anthropic is forcing all subscription users out of CLI, unless it is interactive chat.
If users want to continue using the “headless” mode, they need to switch to using the API_KEY authentication method.
The strategy is clear:
Subscription
is for interactive chat or using the Claude Desktop app
where you live 100% in the ecosystem and there’s _minimal” control to modify how it works
API
is for programmatic access and customization
What’s confusing about the move…
In some ways, I think I understand…
The other part of me is frustrated. What’s the difference if I am chatting or scripting, so long as I play by the rules?
It should be the same call on the backend, to the same infrastructure. The only thing I can reason is that this [second] move fewer subscriptions and more API usage. 💰
If the switch is inevitable, so be it. But, it’s causing me reconsider whether or not I want to be tied so closely to Claude Code’s agent harness/ecosystem anyway.
The answer is no.
Summary
I am currently redesigning the platform to have less dependency on Claude Code. It involves migration to Pi Coding Agent where I get near-full control of every aspect of the platform.
Principles remain the same. Different engine under the hood.
Will I still use Anthropic’s models? Definitely. But going forward, not always. The new design will allow me to use almost any model, from any provider.
Once these changes are in place, I’ll continue the next entry in the collection.
Exciting stuff to come!
Prefer content in your inbox?
I occasionally send out an email with site updates and other tech stuff. Zero Spam.
You'll get two emails initially: a confirmation link to verify, and a welcome message.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.