Claude Code SDK

195 sync 98 5/19/2025, 6:04:06 PM docs.anthropic.com ↗

Comments (98)

d_watt · 4h ago
The way Claude Code is going is exactly what I want out of a agentic coding tool with this "unix toolish" philosophy. I've been using Claude code since the initial public preview release, and have seen the direction over time.

The "golden" end state of coding agents is that you give it a Feature Request (EG Jira ticket), and it gives you a PR to review and give feedback on. Cursor, windsurf, etc, are dead ends in that sense as they are local editors, and can not be in CI.

If you are tooling your codebase for optimal AI usage (Rules, MCP, etc), you should target a technology that can bridge the gap to headless usage. The fact Claude Code can trivially be used as part of automation through the tools means it's now the default way I thinking about coding agents (Codex, the npm package, is the same).

Disclaimer, I focus on helping companies tool their codebases for optimal agent usage, so I might have a bias here to easily configurable tools.

jdmoreira · 3h ago
Not sure about that golden end state. Mine would be being in a room surround by screens with AI agents coding, designing, testing, etc. I would be there in the center giving guidance, direction, applying taste, etc… All conversational, wouldn’t need to touch the keyboard 99% of the time.

That's what I want and look forward one day

cortesoft · 1m ago
Basically the Star Trek model of computing.
Roritharr · 3h ago
Is this a me thing, or a millenial thing?

I hate using voice for anything. I hate getting voice messages, I hate creating them. I get cold sweats just thinking about having to direct 10 AI Agents via voice. Just give me a keyboard and a bunch of screens, thanks.

Wowfunhappy · 3h ago
Voicemail universally sucks. However, when you're having a synchronous conversation with actual people, do you prefer to do everything via IM, or would you prefer a phone call?
tuckerman · 1h ago
I almost never prefer a phone call, I'd rather go all the way to video/in-person or stick with text. I also prefer to push anything important that isn't extremely small out of instant messaging and to email.

Brainstorming/whiteboarding, 1:1s or performance feedback, team socialization, working through something very difficult (e.g. pair debugging): in-person or video

Incidents, asking for quick help/pointers, small quick questions, social groups, intra-team updates: IM

Bigger design documents and their feedback, trickier questions or debugging that isn't urgent, sharing cool/interesting things, inter-team updates: Email

all2 · 2h ago
Email. Async comms make sense 99% of the time at my job. Unless there's deep work to be done, or pie-in-the-sky idea fabricating. Or rubber-ducky sessions. But I won't do those with AI.
dmd · 2h ago
IM, 100%. Otherwise only the loud people ever speak, whether or not they have anything useful to say.
ribelo · 18m ago
> do you prefer to do everything via IM, or would you prefer a phone call?

It's hard for me to believe that there are psychopaths among us who prefer call on the phone, slack huddle or even organize meetings instead of just calmly writing messages on IM over coffee.

stefanfisk · 3h ago
I’m the same. I love that writing allows you to think while typing so that you can review and revise your thoughts before letting them out in the world.

And don’t get me started on video vs text for learning purely non-physical stuff like programming…

jdmoreira · 3h ago
I don't know. I'm 40 but I do like pair programming so…
codemac · 2h ago
receiving audio = slow

sending audio = fast

fnordpiglet · 2h ago
One advantage is speaking is generally faster than typing. Imagine instead of talking to a bunch of AI you’re talking to a room full of coworkers about the architecture to develop.
csto12 · 2h ago
If that’s the future, that means a massive reduction in software engineers no? What you are describing would require one technical product manager, not a team of software engineers.
Wowfunhappy · 2h ago
Or a massive increase in the amount of software that gets written.

If the cost of writing software goes down, demand for it will presumably go up...

jdmoreira · 2h ago
The valuable skills will be creativity, taste, curation, prioritisation etc.

All those skills can be applied to engineering as well. What makes Fabrice Bellard great? Its not just technical skill I think.

I think some of the most successful people will be a subset of engineers but also Steve Jobs types and artists

pjmlp · 2h ago
Most companies don't care about developers of their level, rather they offshore to the lowest bid.
usrnm · 2h ago
> that means a massive reduction in software engineers

That's exactly what everyone is hoping for. Well, everyone except software engineers, of course

paulddraper · 2h ago
Yes.
geertj · 3h ago
I can easily see this happening in 2-3 years. Some chat apps already have outstanding voice mode, such as GPT-4o. It's just a matter of integrating that voice mode, and getting the understanding and generated code to be /slightly/ better than it is today.
sync · 3h ago
Anthropic also announced something along those lines today as well, in beta: https://docs.anthropic.com/en/docs/claude-code/github-action...
dakiol · 1h ago
No. The "golden" end state of coding agents is free and open source coding agents running on my machine (or in whatever machine I want). Can you imagine paying for every command you run in your terminal? For every `ls`, `ps`, `kill`? No sense, right? Well, same for LLMs.

I'm not saying "ban propietary LLMs", I'm saying: hackers (the ones that used to read sites like this) should have as their main tools free and open source ones.

k__ · 2h ago
Can't you have that already?

Put the Aider CLI into a GitHub action that's triggered by an issue creation and you're good to go.

d_watt · 1h ago
Aider is definitely in the same camp. Last time I checked, they weren't optimizing for the full "agent infinitely looping until completion" usecase, and didn't have MCP support.

But it's 100% the same class of tool and the awesome part of the unixy model is hopefully agents can be substituted in for each other in your pipeline for whichever one is better for the usecase, just like models are interoperable.

MrDarcy · 2m ago
I tried aider today with a Gemini API key and billing account. It’s not close to the experience I have with Claude Code on Saturday which was able to implement a full feature.

The main difference is I interact with Claude Code only through conversation. Aider felt much more like I was talking to two different tools, the model and Aider. For example, constantly having to add files and parse the less than ideal console output compared to how Claude code handles user feedback.

alvis · 2h ago
The vision of submitting a feature request and receiving a ready-to-review PR is equally compelling and horrifying from the standpoint of strategy management.

Like Anthropic and most big tech companies, they don't want to show off the best until they need to. They used to stockpile some cool features, and they have time to think about their strategy. But now I feel like they are in a rush to show off everything and I'm worried whether the management has time to think about the big picture.

pjmlp · 2h ago
The moment I am able to outsource work for Jira tickets to a level that AI actually delivers a reasonable pull request, many corporate managers will seriously wonder why keep the offshoring team around.
StefanBatory · 2h ago
Offshoring team?

No, any team.

belter · 1h ago
Including the management team?
cortesoft · 32s ago
Yes. You are seriously overestimating the power most management has. If ownership could build a company without them, they would in a heartbeat.
StefanBatory · 1h ago
Okay, okay, you got me :D
pjmlp · 1h ago
That will be the next step.
andrewstuart · 4h ago
> The "golden" end state of coding agents is that you give it a Feature Request (EG Jira ticket), and it gives you a PR to review and give feedback on.

I see your point but in the other hand how depressing to be left only with the most soul crushing part of software entering - the Jira ticket.

d_watt · 4h ago
I personally find figuring out what the product should be is the fun part. There still a need for architecting a plan, but the actual act of writing code isn't what gives me personal joy, it's the building of something new.

I understand the craft of code itself is what some people love though!

TeMPOraL · 1h ago
Thing is, LLMs are already better than people at the "architecting a plan" and "figuring out what the product should be" in details that go beyond high-level vibes. They do that even better than raw coding.

In fact, that's the main reason I like developing quick prototypes and small projects with LLMs. I use them less to write code for me, and more to cut through the bullshit "research" phase of figuring out what code to write, which libraries to pick, what steps and auxiliary work I'm missing in my concept, etc.

btbuildem · 3h ago
Say what you will, but this would have the wonderful side effect of forcing people who write JIRA tickets to actually think through and clearly express what it is they want built.
losteric · 2h ago
Yeah, that’ll be the product-oriented engineers / engineer-oriented product folks.

We will drop the narrow-minded deadweight that can only collect naive requirements, and the coding side that can only implement unambiguous tickets.

cruano · 28m ago
AKA Junior engineers
xboxnolifes · 2h ago
In that timeline, it wouldn't matter anymore since the people complaining about the poor JIRA tickets would be gone.
pjmlp · 2h ago
Anyone working on offshoring projects already knows how fun this happens to be.
virgildotcodes · 3h ago
> The "golden" end state of coding agents is that you give it a Feature Request (EG Jira ticket), and it gives you a PR to review and give feedback on. Cursor, windsurf, etc, are dead ends in that sense as they are local editors, and can not be in CI.

Isn’t that effectively the promise of the most recently released OpenAI codex?

From the reviews I’ve been able to find so far though, quality of output is ehh.

d_watt · 3h ago
It totally is!

I bias a bit to wanting the agent to be a pluggable component into a flow I own, rather than a platform in a box.

It'll be interesting to see where the different value props/use cases of a Delvin/v0 vs a Codex Cloud vs Claude Code/Codex CLI vs Cursor land.

ramesh31 · 3h ago
Thats the promise. The reality is that it's just a subpar version of Claude Code which doesn't support MCP.
mistrial9 · 1h ago
golden age consultant paycheck
naiv · 3h ago
played around with connecting https://github.com/eyaltoledano/claude-task-master via mcp to create a prd which basically replaces the ticket grooming process and then executing it with claude code creating a branch named like the ticket and pushing after having created the unit tests and constant linting.
Vanclief · 1h ago
Claude Code is my favorite way to use LLMs for coding.

However I feel what we really need is to have an open source version of it where you can pass any model and also you can compare different models answers.

(Aider and other alternatives really doesn't feel as good to use as Claude Code)

I know this is not what anthropic would want to do as it removes their moat, but as a consumer I just want the best model and not be tied to an ecosystem. (Which I imagine is the largest fear of LLM model providers)

ayargz · 41m ago
OpenAI codex is probably the closest to what you're talking about, its open source and you can use models from any provider. It's not as good as claude code right now but I bet it wont take long for them to catch up.

https://github.com/openai/codex/tree/main

pram · 40m ago
You can use Claude Code as an MCP server so you can kinda do this already.
anotherpaulg · 3h ago
Aider has had support for Python and shell scripting [0] for a long time. I made a screencast [1] recently that included ad-hoc bash scripting aider as part of the effort to add support for 130 new programming languages. It may give a flavor for how powerful this approach can be.

[0] https://aider.chat/docs/scripting.html

[1] https://aider.chat/docs/recordings/tree-sitter-language-pack...

hztar · 1h ago
Freaking love Aider. MCPs are supported soon as well. Testing a development branch. Then you can actually develop end to end using PR, tickets etc using models you trust.
unshavedyak · 2h ago
How close can you get Aider to Claude Code? Ie i liked the Claude Code UX, but i don't use it because i prefer Gemini 2.5 Pro.

I don't really want it committing and stuff, i mostly like the UX of Claude Code. Thoughts?

k__ · 2h ago
Aider could really profit from a polished GitHub Actions workflow.

Add a file to your repo and you can talk to any model via issues.

swyx · 4h ago
more context from the claude code team: http://latent.space/p/claude-code

you can skim the transcript but some personal highlights:

- anthropic employees, with unlimited claude, average to $6/day of usage

- headless claude code as a "linux" utility that you use everywhere in CI is pretty compelling

- claude code as a user extensible platform

- future roadmap of claude code: sandboxing, branching, planning

- sonnet 3.7 as a persistent, agentic model

philosophty · 4h ago
"- anthropic employees, with unlimited claude, average to $6/day of usage"

From the link:

"Apparently, there are some engineers inside of Anthropic that have spent >$1,000 in one day!"

The question is what is the P50, P75, and P95 spend per employee?

thesurlydev · 3h ago
Agree. That would be a great insight as well as what type of activities cause the explosion in spend.
swyx · 1h ago
they probably wouldnt share so i didnt ask
ipsum2 · 4h ago
Maybe I'm holding it wrong, but I can easily spend $20+ using Claude Code for 2 hours. I've stopped using it because it was too expensive for my personal projects.
jasonjmcghee · 4h ago
I briefly commented on how I approach cost control before, if useful.

https://news.ycombinator.com/item?id=43737060

Wowfunhappy · 1h ago
But that doesn't really explain things. You're making an active effort to reduce your costs. Anthropic engineers get unlimited API usage for free.

I was listening to this podcast yesterday and I also did a double take when I heard the $6 per day number.

ipsum2 · 4h ago
Great advice, thanks.
d_watt · 4h ago
Claude max plan has Claude code bundled into the price. $100/month isn't cheap, but the RoI is there for me personally.
ttcbj · 4h ago
Thanks, this is helpful. I tried Claude Code, and thought it had a lot of potential, but I was on track to spend at least $20/day.

For a tool that radically increases productivity (say 2x), I think it could still make sense for a VC funded startup or an established company (even $100/day or $36k/year is still a lot less than hiring another developer). But for a side project or bootstrap effort, $36k/year obviously significantly increases cash expenses. $100/month does not, however.

So, I'm going to go back and upgrade to Max and try it again. If that keeps my costs to $100/month, thats a really different value proposition.

ipsum2 · 4h ago
Thanks, I was just commenting on "- anthropic employees, with unlimited claude, average to $6/day of usage".
buzzerbetrayed · 3h ago
Can you clarify what you mean here? Are you saying I can use Claude Code for a flat rate of $100/month? What are the limits? What if I use more than $100 worth of Code in a month? Their website doesn't seem to make it clear.

Edit:

Found the answer to my own questions

> Send approximately 50-200 prompts with Claude Code every 5 hours[1]

Damn. That's a really good deal

[1] https://support.anthropic.com/en/articles/11145838-using-cla...

darkteflon · 1h ago
Really tempted to go for this as well. Only wish I could access flat rate Claude through VS Code Cline (or an extension like it) as well - that would be the complete package. $100 / month + ~$$ / day in API credits is gonna get pricey.
big_toast · 3h ago
I’ve really enjoyed the recent latent space podcasts. I don’t think there is any person†/podcast (or perhaps other content) approaching your general output while maintaining the high SNR. I am continually amazed at the volume and value of public work you’re producing over the last (half?) decade while still growing various businesses. I hope others can find similar productivity gradients. I know you roughly share what works for you but it is not so easy to reproduce.

† simonw, gwern

swyx · 1h ago
thanks man, this was nice to read :) idk if it helps but my principles (tm) are here http://learninpublic.org/

i do feel like SNR * quantity could be higher, but its still a challenge to even keep it where it is today. my work life balance/stress levels aren't the best and everyone expects everything from me.

woah · 4h ago
If I was making an AI code assistant, the last thing I would do is to lock it in to a particular foundation model provider.

The only possible way for this to be a successful offering is if we have just now reached a plateau of model effectiveness and all foundation models will now trend towards having almost identical performance and capabilities, with integrators choosing based on small niceties, like having a familiar SDK.

ChadMoran · 3h ago
Other than the command/arguments there isn't much locking you in. It's just input/output. Swap it out for something else or simply wrap it. There's not much going on here.
ramoz · 2h ago
"Lock i-"

At this point Claude Code is a software differentiator in the agent coding space.

I am building things related to AI code assistants - we were hacking ways to integrate Claude Code - it was the first thing we wanted to build around.

It's too early to care about lock in.

Need the best, will only build around the best.

Wowfunhappy · 1h ago
Claude Code could already be used in non-interactive mode, and by extension it could be integrated into other apps in the same manner as any other UNIX command line utility.

This SDK currently supports only command line usage. Isn't that just what we already had?

I don't understand what's actually new here. What am I missing?

hosainnet · 3h ago
The new GitHub action is exactly what I have been looking for https://docs.anthropic.com/en/docs/claude-code/github-action... but there doesn't seem to be a way to use it with the Claude Code's Max plan?

As it only accepts an API key as far as I can tell.

cube2222 · 3h ago
This is great! Especially the GitHub Actions issue/PR integration[0] that’s paired with this is exactly what I’ve been wanting!

[0]: https://docs.anthropic.com/en/docs/claude-code/github-action...

bionhoward · 3h ago
> You may not access or use, or help another person to access or use, our Services in the following ways: > 2. To develop any products or services that compete with our Services, including to develop or train any artificial intelligence or machine learning algorithms or models or resell the Services.

Can somebody please tell me what software product or service doesn’t compete with general intelligence?

Imagine selling intelligence with a legal term that, under strict interpretation, says you’re not allowed to use it for anything.

Is it so vague it’s unenforceable?

How do we own the output if we can’t use it to compete with a general intelligence?

Is it just a “lol nerd no one cares about the legal terms” thing? If no one cares then why would they have a blanket prohibition on using the service ?

We’re supposed to accept liability to lose a lawsuit just to accept their slop? So many questions

ChadMoran · 2h ago
This is what happens when you let lawyers say what they want.
mirekrusin · 3h ago
I'll try when they start supporting claude via copilot. Can't use at work anything else.
doctorpangloss · 53m ago
I’ve cancelled my subscription. Sorry guys…
andrewstuart · 4h ago
Claude has been left in the dust by Gemini with its million token session and ability to upload a zip file of my entire code base.
Sajarin · 4h ago
I wonder if anyone has done an analysis on the HN user sentiment on the varying AI models over time. I'd be curious to see what that looks like. Increasingly, I'm seeing more and more people talk positively about Gemini and Google (and having used Gemini recently, I align with that sentiment)

I think Bard (lol) and Gemini got a late start and so lots of folks dismissed it but I feel like they've fully caught up. Definitely excited to see what Gemini 3 vs GPT-5 vs Claude 4 looks like!

fallinditch · 3h ago
I'm using Windsurf IDE so have all the main models available. Mainly doing Python, JS, HTML, CSS, some Go. I have found Claude 3.7 outperforms Gemini 2.5 and ChatGPT 4.1, 4o, Deepseek, etc, for my work in most cases.

I suspect that I experience some performance throttling with Gemini 2.5 in my Windsurf setup because it's just not as good as anecdotal reports by others, and benchmarks.

I also seem to run up against a kind of LLM laziness sometimes when they seemingly can't be bothered to answer a challenging prompt ... a consequence of load balancing in action perhaps.

lcfcjs6 · 3h ago
Windsurf is about to lose its ability to use other models since it got bought by OpenAI. Still very cool tool though!
mbesto · 3h ago
Who cares about sentiment when you can just look at a proxy for usage: https://openrouter.ai/rankings

EDIT: Specifically: https://openrouter.ai/rankings/programming?view=week

Karrot_Kream · 3h ago
Gemini hit the top of a bunch of leaderboards recently so it probably prompted folks to try Gemini out and they found it useful.
ChadMoran · 3h ago
Context is only one part of it. I tried using Gemini and got sub par results. comment-laden code with not not following instructions.
cube2222 · 2h ago
I’ve tried Gemini 2.5 Pro a couple of times and honestly don’t like its output. Claude Sonnet 3.7 is much better at correctly understanding and executing my imprecise prompts.

Gemini 2.5 Flash on the other hand has excellent. I’ve started using it to rewrite whole files after talking the changes through with Claude, because it’s just so ridiculously fast (and dependable enough for applying already outlined changes).

ramoz · 2h ago
This is Claude Code.

The two work really well with Gemini as a planner and Claude Code as an executor.

dgellow · 1h ago
claude code still has the best UX IMHO. But I would love to have the million token context, for sure
mickeyp · 4h ago
I'm building a browser based tool that runs on your computer, with full tool access of course, that works with all the major models and is far better and more ergonomic to use than code, codex, etc.

If you (or anyone else reading this) wants to try out the upcoming beta give me a ping. (see profile.)

barefootford · 4h ago
and then get the honor of copy and pasting all of the changes afterward?
dimitri-vs · 2h ago
Cursor with gemini-2.5 MAX and agentic mode.

I really like the idea of Claude Code but its rare that I fully spec out a feature on my first request and I can't see how it can be used for frontend features that require a lot of browser-centric iteration/debugging to get right.

termin3 · 1h ago
I'm using this https://github.com/coffeegrind123/gemini-code to use Claude Code with Gemini and it's working perfectly
danenania · 4h ago
You can try my project Plandex[1] to use Gemini in a way that's comparable to Claude Code without copy-pasting. By default, it combines models from the major providers—Anthropic, OpenAI, and Google.

The default planning/coding models are still Sonnet 3.7 for context size under 200k, but you can switch to Gemini with `\set-model gemini-preview`.

1 - https://github.com/plandex-ai/plandex

andrewstuart · 4h ago
“Make me a bash script which creates all the files using heredoc”

Works for a reasonable chunk of files say 5 to 10 that aren’t too big.

No doubt they’ll get to better file access.

Anyhow I’m quite happy to do the copy and paste because Geminis coding and debugging capability is far better than Claude.

simonw · 3h ago
How are you uploading zip files of code to Gemini?
andrewstuart · 3h ago
In AI Studio select file upload then select a zip file.
baalimago · 3h ago
Hasn't this been invented already in multiple shapes and forms..? I wrote my own version clai[1] over a year ago which does exactly this, only that it has tools support + is multi vendor.

[1]: https://github.com/baalimago/clai

simonw · 3h ago
Looks quite similar to my https://llm.datasette.io tool as well.

Honestly though, CLI tools for accessing LLMs (including piping content in and out of them) is such a clearly good idea I'm glad to see more tools implementing the pattern.

dcre · 1h ago
It's very surprising that it has taken this long to see a first-party CLI like this.