Live data from Hacker News

Reverse engineering Claude Code

kirshatrov.com

21–25 of 25 posts

Re: Reverse engineering Claude Code

#21
post #15

Claude Code has support for AWS Bedrock. You can use Sonnet models available in AWS Bedrock to run Claude Code locally. This means you can also leverage Bedrock logs to inspect the API calls and the prompts sent. I was amazed and excited by how good Claude Code is compared to Windsurf/Cursor and wanted to inspect the working. I inspected the logs and got an understanding on its system prompt as well the tools used. I…

You don't need to overcomplicate things Just set the base url to a local ngrok and it will log the request This gives the full prompt with all tool calls With a proxy you can have it forward requests to Anthropic if you want to see it actually working too and not just the initial request (since it will fail without forwarding them)

That's a great trick. I do not have a Claude subscription and my current setup is to use with Bedrock backend. Initially I tried with mitmproxy but I think AWS had pinned the TLS certificates causing the requests to fail.

Re: Reverse engineering Claude Code

#23

Earlier quoted context omitted.

ridiculously low?

Claude code wastes way too many tokens compared to other agents doing the same task

The other agent is often a human.

A human getting paid 1 cent per second ($36.00 per hour) is 75k/yr (cost to business is ~2x that).

So if Claude manages to save 11 seconds of human time for 11 cents, that would be a good deal.

Tax section 174 makes the employee costs amortised, so spending on Claude as an expense to save employee costs is more valuable than first appearances.

Post reply on HN