Comment by adastra22

14 days ago

> Claude Code has been inherently limited to conversations

How so? I’ve been using “claude -p” for a while now.

But even within an interactive session, an agent call out is non-interactive. It operates entirely autonomously, and then reports back the end result to the top level agent.

Because of OAuth. If they gave people API keys then no-one buys their ludicrously priced API product (I assume their strategy is to subsidise their consumer product with the business product).

You can use Claude Code SDK but it requires a token from Claude Code. If you use this token anywhere else, your account gets shut down.

Claude -p still hits Claude Code with all the tools, all the Claude Code wrapping.

  • I believe they’re talking about Claude Code’s built-in agents feature which works fine with a Max subscription.

    https://code.claude.com/docs/en/sub-agents

    Are you talking about the same thing or something else like having Claude start new shell sessions?

    • Okay...and continue to work up the levels? Why do you think OAuth might be limiting? Why do you think they started building subagents first? What is the difference between subagents and products like Aider?

      If they were able to wrap the API directly, this is relatively easy to implement but they have to do this within Claude Code which is based on giving a prompt/hiding API access. This is obvious if you think carefully about what Claude Code is, what requests it is sending to the API, etc.

      1 reply →

  • That’s not what this subthread is about. They’re talking about the subagent within Claude Code itself.

    Btw, you can use the Claude Agent SDK (the renamed Claude Code SDK) with a subscription. I can tell you it works out of the box, and AFAIK it is not a ToS violation.

    • Yes, you can build feature in OP with SDK have done this. Works well...but this is something completely different to agents.

      Subagents and the auth implementation are linked because Anthropic's initial strategy was to have a prompt-based interaction which, because of the progress in model performance, has ended up being limiting as users want to run things without prompting. This is why they developed Claude Code Web (this product is more similiar to what this feature will do than subagents, subagents are similar if you have a very shallow understanding...the purpose of this change is to abstract away human interaction, i assume that will use subagents but the context/prompt management is quite different).

    • Oh really? I was looking at the Agent SDK for an idea and the docs seemed to imply that wasn't the case.

          Unless previously approved, we do not allow third party developers to offer Claude.ai login or rate limits for their products, including agents built on the Claude Agent SDK. Please use the API key authentication methods described in this document instead.
      

      I didn't dig deeper, but I'd pick it back up for a little personal project if I could just use my current subscription. Does it just use your local CC session out of the box?

      1 reply →

  • > If they gave people API keys then no-one buys their ludicrously priced API product

    The main driver for those subscriptions is that their monthly cost with Opus 3.7 and up pays itself back in couple hours of basic CC use, relative to API prices.

  • can't you just rip the oauth client secret out of the code?

    • You can. This is how Opencode worked, but they are clamping down on that approach.

      As someone else has mentioned, you can actually use SDK for programmatic access. But that happens within the CC wrapper so it isn't a true API experience i.e. it has CC tools.