Remix.run Logo
skapadia 2 days ago

Basically, as long as you are using an Anthropic library or tool, you can use your OAuth credentials. For example, you can use the Claude Agent SDK with your OAuth credentials. This is sweet because I can prototype all sorts of agents with Claude Code embedded inside, at a predictable monthly cost. One nice use case is turning skills into standalone tools or apps.

You can also do convoluted things like run Claude Code within tmux and send input to it and read the output.

MCP Channels are interesting too for bidirectional communication between your app and a running Claude Code instance, with an MCP server sitting in between. It's slow, but allows for some interesting use cases when you want to step out of an existing CLI session to do work that is easier in a graphical interface, have Claude Code respond and do work, then when you're done, go back to the CLI session and continue, never losing context.

camkego a day ago | parent | next [-]

The way I read the Anthropic docs, it seems the term plan is to block the usage of OAuth credentials with the "Claude Agent SDK".

This URL: https://code.claude.com/docs/en/agent-sdk/overview

Says this: "Unless previously approved, Anthropic does 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."

Again, it seems Anthropic prefers to bill API token rates (long run), not subscriber effective token rates.

Cidan 2 days ago | parent | prev | next [-]

You don't really need to tmux at all for Claude Code CLI. Claude Code CLI supports streaming json input, and streaming json output; you can use stdin/out as a pipe to control Claude Code CLI.

I'm doing this today in https://github.com/Cidan/ask -- works great.

skapadia a day ago | parent | next [-]

This is awesome. Thank you for pointing out streaming JSON input and output, I'll definitely be taking a look at that.

tber123 2 days ago | parent | prev [-]

[dead]

tber123 2 days ago | parent | prev [-]

[dead]