Rendered at 11:06:45 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
bcherny 17 days ago [-]
Boris from the Claude Code team here. Historically Claude Code has not done secret scrubbing (there are many good tools for that), but we are looking into what we can do to prevent this.
That said, a few thoughts:
1. .claude/settings.local.json is meant to stay local. This is not a file you should check into source control. We automatically gitignore it when Claude creates the file, so in this case the files were manually created and checked in (docs: https://code.claude.com/docs/en/settings)
2. Permission rules are old hat. Everyone should be using auto mode instead. It is safer and also does not require manually maintaining finicky allow/deny lists. Auto mode is enabled by default and is included for free in all plans.
3. Regardless of what agent you use, you should have secret scanning enabled. GitHub and other source control hosts offer it. There are many threat models that it protects against and you should absolutely use it if you can. (see https://github.com/security/plans)
syllogism 16 days ago [-]
I want to draw deterministic boundaries around what the agent can do. I don't want a probabilistic approach to security.
My view is that if the agent can decide to do something, nothing stops that thing from being done accidentally, and any attacker that can inject text into its context can do that thing.
uw_rob 16 days ago [-]
Deterministic boundaries appear to be best solved with sandboxes/microVMs/remote infra and unique identities with probabilistic guardrails on top. The old deterministic allow/deny list running on bare metal didn't meaningfully solve the problem of giving Claude determinism. Humans got approval fatigue, and eventually, Claude got access to something like 'python3 FILE.py' and Claude could go to the races by updating 'FILE.py'.
syllogism 15 days ago [-]
The allow/deny list functionality was trash though. If I have a once-off workflow and I want to execute Claude within it, I can't even give it a whitelist of allowed tools.
I definitely prefer auto-mode to the granularity of prompts I was getting from Claude. But I also want to be able to use deterministic rules, and Claude Code's functionality for it sucks.
yevpats 4 days ago [-]
Agree, the way to solve it like other mentioned is with sandboxes, identities and permissions. Im building https://kosem.ai if you are curious to try it out - its in beta.
canibal 16 days ago [-]
Simple solution, don't use an indeterministic tool to do things that require deterministic constraints?
ImPostingOnHN 16 days ago [-]
They aren't. Allowlists are a deterministic tool. That's the whole point: instructing an llm to review itself is nondeterministic, and thus not a good tool for permissions, compared to allowlists, which are.
socalgal2 15 days ago [-]
In my experience, Allowlists are not deterministic because the #1 thing the LLM does is write python scripts nearly every prompt and ask permission to execute its latest script. I know of no developers who review that code since it would make the process too slow to be useful. So YOLO! Yes, Claude/Codex/Gemini, you can execute the python you just wrote, even though I didn't review it and you have access to the entire machine and so every command I didn't give permission to execute you could just have written the equivalent python.
liveoneggs 15 days ago [-]
Agentic interaction is not deterministic. That's the entire deal.
selcuka 15 days ago [-]
Yes, but we are not restricted to agentic interaction only. We can always pass our inputs and outputs through deterministic filters (which is sort of the point of MCP servers and tool calling, for some use cases).
15 days ago [-]
OJFord 16 days ago [-]
> Everyone should be using auto mode instead. It is safer
This is an absolutely crazy statement without also bundling proper sandboxing. Nobody should be using auto mode outside of an environment they'd be happy with an 'everything is approved' mode too.
3form 16 days ago [-]
I want to coin the 3form's Law of Codegen Tech: Any time a new and improved code generation technology is developed, it will be used for anything except coding for security and safety of said technology.
hxugufjfjf 16 days ago [-]
What?
coldtea 16 days ago [-]
What what?
Any new tech that can generate code (like an agent can) will be used for everything except for improving the security and safety of itself.
Like how Anthropic does shit all with all their agentic coding power to improve the security of Claude.
coldtea 16 days ago [-]
>2. Permission rules are old hat. Everyone should be using auto mode instead. It is safer and also does not require manually maintaining finicky allow/deny lists.
The fuck we will give free reign to Claude to vibe what's secure and what's not and what it can't do.
I want fully static control over certain folders. Permissions rules should be ABSOLUTELY enforced sandboxing (even without the user bothering with custom sandboxing themselves) on top of any mode, manual or auto.
bcherny 16 days ago [-]
Have you tried the built in /sandbox?
coldtea 16 days ago [-]
Yes. Leaves a lot to be desired UX wise, has no good defaults, and still allows many holes that you need to dig to know (e.g. its own write tools vs bash).
Built my own with Apple's (to be "deprecated") seatbelt backend, which I think anthropic also uses, with a much nicer interface, easy per working project setup, etc.
martijnvds 16 days ago [-]
Also, "I could open $file so I tried again without the sandbox" and somehow that just works?
futhey 16 days ago [-]
I'm not here to be critical, but the hoops you have to jump through to get Claude out of .env is more than it should be. You basically need an agent to write it if it's anything complicated, like, allow .env.example but not .env.*.
Whereas that should probably be default on instead, and this should apply to other known sensitive folders. A simpler system like .agentignore would be even better.
I like auto mode but "the agent supervises itself" is a bad compliance/safety answer on its own.
I appreciate that you're trying to make Claude Code safer, but the agent really needs to be a lot more restricted in its reach rather than its actions.
The agent should NOT have ANY access to:
- Your ENV
- Your homedir
- The network at large
- ANY other directory on your system
- No, not even your workdir.
The only safe way to use an agent is COMPLETELY isolated by a container or VM, using git semantics to extract its output.
post-it 16 days ago [-]
That's the only safe way to use any software that you haven't thoroughly reviewed. But that's not how I use any software.
kstenerud 16 days ago [-]
You could in theory fully review Claude Code.
But even that wouldn't be enough because LLMs are nondeterministic, and these kinds of issues are the inevitable results.
Only a mechanical, deterministic failsafe can protect you from it.
what 16 days ago [-]
> You could in theory fully review Claude Code.
Can you point me to the CC source code?
kstenerud 16 days ago [-]
The CC source code leak was contained many months ago. But Claude is perfectly happy to decompile its own code if you ask the right way. It'll even patch the binary for you.
Regardless, It's kinda silly to keep the harness code hidden. There aren't any valuable secrets in there.
But there are rules & procedures to follow, so...
what 16 days ago [-]
Well then I have to use Claude before being able to review the source? Bit of a chicken and egg situation.
I also have to trust its “decompilation” is accurate.
ipaddr 16 days ago [-]
Or use a different llm or do it yourself manually.
kstenerud 16 days ago [-]
You're absolutely right! There's no way around this problem — and no amount of creative thought could ever solve it.
All hail the agent!
Betelbuddy 16 days ago [-]
Its Vibe Coding land here...you dont look at the code....
codebje 16 days ago [-]
I spent a long time as a younger man running general software inside ephemeral VMs. The UX was terrible, but I had no fears about browser vulnerabilities ruining my day. Ephemeral is hard, and the UX is still poor, but I did try it again a month or two back, and it's not impossible.
But now I am doing all my software development back inside ephemeral VMs, AI or otherwise - the UX there is much better, I significantly mitigate supply-chain attack risks, and agents are already constrained to a secret-less, low privilege environment, should I use them. There's a significantly higher likelihood of rogue software in third party dependency trees than there is in a small subset of programs you regularly use.
kstenerud 15 days ago [-]
It's funny, just this morning I had Claude come to me and say "Did you delete directories X and Y?" I entered the sandbox, and sure enough, one of its subagents had deleted the directories wholesale. No idea who did it or why.
No matter; I just rebuilt the dirs from my outside copies and carried on.
16 days ago [-]
saidnooneever 16 days ago [-]
its pretty trivial in any harness just to not have it post your shit to the public internet automatically. its a dumb idea to begin with
grey-area 16 days ago [-]
Text in a model context is not a reliable constraint.
LtWorf 14 days ago [-]
This comment feels like spam.
coldtea 16 days ago [-]
"It's difficult to make someone understand something about sandboxing when their business model is based on getting total access to your computer and your data" - Upton Sinclair (paraphrased)
dash-44 16 days ago [-]
Comments like this show that Claude devs are so disconnected from how Claude or harnesses in general are used in the real world.
Claude Code doesn't even have a basic 'enqueue' prompt feature. Even though Copilot CLI, Codex and many other harnesses have had this for a long time now. And the GitHub feature request for this was closed, by you, referencing a completely unrelated feature.
strictnein 16 days ago [-]
Comments like this show that good intentioned employees at these companies shouldn't bother posting here.
chrisjj 16 days ago [-]
True... until their intentions are good enough.
sensanaty 14 days ago [-]
What good intentions, other than damage control for the upcoming IPO?
strictnein 14 days ago [-]
Not everything in life has to be met with constant cynicism.
otterley 16 days ago [-]
What does your comment have to do with what Boris said? This is a thread about committing secrets to source control.
bilater 16 days ago [-]
a) this is a random comment not related to what he is talking about
b) you do have it now. cmd + enter
slowin 16 days ago [-]
Yeah, really no excuse to not allow queuing. Huge missing feature in cc.
markasoftware 17 days ago [-]
Auto mode cannot be considered safer than anything because it does not even attempt to guarantee any sort of security. The threat model is not even defined. It cannot be quantified or compared with any other approach other than "full access"
Kim_Bruning 16 days ago [-]
Compare approving every step manually: at first you read everything the llm proposes carefully, convinced that you'll catch it out. After a while you get faster and faster until at some point you find yourself hitting "approve" the second the text appears, long before you actually could absorb what it said.
This is called "approval fatigue".
If you think this can't possibly happen to you, you might be in for a surprise. This is an almost textbook case of classic conditioning. You'll find yourself hitting that button faster and faster even while fighting back the urge. So a human is no guaranteed backstop.
This is the scenario that cc auto mode guards against. It cuts down the number of permission prompts to something manageable, so that your fingers don't get trained into clicking 'approve' on 'rm -rf' in the very eyeblink that it appears.
So maybe you feel it doesn't work in theory; but weirdly enough, in practice this particular approach is actually one of the better ones; especially when used in combination with other common sense measures where practical.
markasoftware 16 days ago [-]
I'm not claiming auto is worse than manual; I'm claiming it cannot be compared with anything security-wise because it does not aim to provide any guarantees, there's no systematic way to reason about what it will and won't allow, etc
With e.g. VM or container sandboxing, we can say things like "If there are no vulnerabilities in the hypervisor or hardware, then the agent can only access these files, these network services, etc". Auto mode doesn't even try to provide any guarantees, so it's impossible to reason about. It amounts to just using the models judgment about what's "malicious" or not, a definition which is subjective, changes model to model, and can be influenced by attacker input.
Empirical evaluations of how many vulnerabilities manual vs auto mode let through are not super meaningful because auto mode changes dramatically with model releases, the type of task being performed, whether the attacker is making targeted attacks designed to bypass auto mode, etc. A security feature cannot rely on these sorts of factors if it's to be taken seriously.
Further, percent of malicious tool calls accepted is a bad metric. It's like measuring the security of ssh in terms of what percent of unauthenticated logins succeed. The only acceptable value is zero. It's pass/fail, not a spectrum. So both auto and manual mode should fail equally here. Further, the set of malicious tool calls admitted in auto mode may not be a subset of those admitted in manual mode.
Kim_Bruning 16 days ago [-]
Ah, you're going for the actual adversarial case.
I think I'd trust the current approver with correctly classifying regular semi-interactive LLM behavior fairly well.
However, if we bring in a hostile adversary that calculus changes, and you'd be right to start thinking about other approaches.
On the other hand, transformers are a surprisingly powerful technology, and I wonder if there wouldn't be ways to train one to several nines reliability under adversarial attack. It seems to have worked in at least one case; though I'd be a bit cautious to extend that conclusion to more cases quite yet.
Hmm, what does auto mode protect against in the non-adversarial case? Aren't the models already extensively trained not to perform harmful actions without provocation?
Kim_Bruning 16 days ago [-]
It mostly stops honest mistakes, because those do happen, especially when the <prompting> might not have been perfect either.
You do have a bit of a point, though: I’ve run several models in sandboxes with --dangerously-skip-permissions for months; in the full expectation that I'd need to replace a sandbox once in a while. But so far none of the sandboxes have trashed themselves, yet. knock on wood
Auto mode seems like a lighter-weight version of that: fewer local resources, and it can run on the metal if you need cc to help with system work.
lifeisloving 16 days ago [-]
That is not my experience. They attempt to nuke my containers quite frequently. I run regex on all their tool calls and stop them from doing certain things, its the only thing that prevents them from removing their home directory at some point.
This isnt even the main concern with dangerously skip all permission though. There are many. What happens when they get prompt injected on a web page and send someone all their privileged information because you give them free access to the internet.
Using llms like this is dangerous. They will ruin your day eventually.
user43928 16 days ago [-]
I've been running Codex for many weeks in the Full access mode, since their Auto mode was useless in the sense that it blocks benign commands frequently.
No data loss has occurred.
Nowadays I use Claude, where the Auto mode works.
16 days ago [-]
coldtea 16 days ago [-]
>No data loss has occurred.
"I've started never checking my parachute's condition before a drop for a year now, and no accident has occured".
lifeisloving 16 days ago [-]
All SOTA models will still try to delete its home directory. I have a plugin that prevents things like this and it gets triggered more than you'd think, despite having hook instructions on every request not do do certain things. It will also try to find ways around its permissions, quite cunningly.
You can not trust that they're RL'd to be safe. Even if it only happens 99.80% of the time (its more than that) it will eventually happen.
Less severe actions will happen even more often. People using llms with their native browser profiles are getting farmed, hard.
Llms are highly dangerous in terms of security, but they're being marketed as highly intelligent tools that everyone should use. Its really mind blowing.
Kim_Bruning 16 days ago [-]
> despite having hook instructions on every request not do do certain things
This tends to be a smell. Presumably you added "don't do this" instructions after the model started doing the thing. But that's mostly decoration, as you have found. It's like adding # Please don't crash comments to every instruction in a python program.
Try to actually debug the issue. Regularly ask "can you reconstruct[1] the reasoning why you issued that command?" ; dig down. Set traps that halt execution.
Consider checklists or skills to guide an agent through a tricky set of steps; and consider writing procedures for failures.
[1] "Reconstruct" still isn't perfect; but "explain why" is a license to hallucinate. Asking to add #comments on reasoning to each step is a potential help in reconstruction.
malfist 16 days ago [-]
I thought the tech priests praying to their machines with no one really knowing what the prayer means was too far fetched to be real
TheDong 16 days ago [-]
> People using llms with their native browser profiles are getting farmed, hard.
Got any references for the prevalence of this, even links to anecdotal reports?
Reading the reviews on the chrome store for the extension [0], I haven't found a single report of someone who was prompt injected, just a bunch of "anthropic's subscription is expensive" or "it doesn't work", but no "it stole my bank account".
I have no idea how the extension works, and Im not talking about the extension. Im talking about browser use broadly, and most people are not using the extension, there are a thousand other solutions.
However, Anthropic is one of the only labs who does a decent job at making models that recognize prompt injection attempts (but not completely immune) however Im speaking about giving llms in general access to your browser broadly.
I just know through my own experiments that it is quite easy to prompt inject an llm operating a browser and get it to send secrets. Using the extension might be safer idk, Om not risking it.
Llms are a security nightmare when connected to the web.
I have a website where I experiment with this. Although Ive stopped baiting llms into doing reckless things.
Killai.now <--(dont use this, its a WIP)
Killai.now/poison/about
Killai.now/propaganda/about
nischoy 15 days ago [-]
[flagged]
barbariangrunge 15 days ago [-]
why would they delete their home directories?
slowin 16 days ago [-]
> All SOTA models will still try to delete its home directory.
Literally never seen this once in years of extremely heavy use across all major models and harnesses.
zahlman 16 days ago [-]
As real as approval fatigue is, it can't really be considered worse than effectively leaving the decision up to the party that proposed the action in the first place.
Kim_Bruning 16 days ago [-]
It really can be potentially worse.
Everyone thinks the decision was being checked by a human, and thus safe. Because of that, people might have concluded that further safety gates were unnecessary.
But the human just got conditioned to hit 'approve' out of reflex.
So in reality the proposing party (the llm/agent) might be the only one in the pipeline who actually did any checking, if at all.
In certain extreme circumstances this can even lead to physical danger in my line of work, so I'm learning to be careful.
coldtea 16 days ago [-]
>This is called "approval fatigue".
Doesn't matter, that would be on me.
It's also a false dillema. Those aren't the only options. A strictly enforced sandbox with sane defaults (for example ~/.ssh), that acts as a hard OS level limit, and not just as a suggestion to the agent, would not have "approval fatigue".
40four 16 days ago [-]
This is the conundrum we find ourselves in. Do we submit to approval fatigue and press “Don’t ask again”? Because that’s the dream. We all wish we could just trust the agent to do the task start to finish, unsupervised.
But this is the downside. It might be fine 99% of the time, but 1% of the time you get a critical secret published to GitHub, even after human review.
Is this even worse than what us humans did on our own before LLMs? I’m not sure. It’s not like secrets never got accidentally committed before, it just illustrates the new paradigm we’re working in.
Either you let your agents run wild, and you cross your fingers that they don’t do anything bad, or you need to accept that your new job is to be an agent babysitter, and audit every command.
BikiniPrince 16 days ago [-]
The agent behavior is constrained with external tooling and contracts. Contracts that fit in memory.
liberzon 13 days ago [-]
[flagged]
prmph 16 days ago [-]
No, this is the way I have worked for a long time, and I have not suffered from any approval fatigue.
Rather what has happened is that I have gotten very good at scanning what it is trying to do and know within a second or two whether there is anything fishy I need to look at more closely.
And by "fishy", I do not mean only security issues, but also architecture, code, etc issues. Sometimes it even adds unrelated unapproved changes to what it is supposed to be working on, and I stop it.
And I'm glad I work this way, because countless times I have stopped it from going down a path that is nonsensical or I strongly dislike.
There are techniques I have adopted to speed up working this. Sometimes I allow Claude to make larger changes at once, to batch several changes at once, etc. But these decisions are under my control.
I prefer to work this way than to wade through enormous PRs trying to wrap my head around what was done, where I am likely to just give up and approve it after a cursory review.
Auto mode may be significantly safer in the niche case where you want the model to have free reign, in a fully unopinionated environment, where it's allowed to make any changes and make any external calls.
Many of the problems when it comes to the manual approval feel like they stem from the expectation of using auto mode in the first place. After all, what's the point of improving the manual approval and safety matching if auto mode is the end all be all, and what's the point of training the model to output commands in a manner that can be parsed by a human if auto mode is always meant to be used? It's very rare for me to not see "command could not be statically analyzed", because the model keeps outputting bash golf.
smallnamespace 16 days ago [-]
> in the niche case where you want the model to have free reign, in a fully unopinionated environment, where it's allowed to make any changes and make any external calls.
That is not the niche case, that's the dominant use of models.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
RHSeeger 16 days ago [-]
> That is not the niche case, that's the dominant use of models.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
coldtea 16 days ago [-]
>That is not the niche case, that's the dominant use of models.
If it is, it's only the dominant case of models because it's pushed as the dominant case of models, with Anthropic devs even coming here to say how people should just accept it and it's so much better than being in control.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
zahlman 16 days ago [-]
> That is not the niche case, that's the dominant use of models.
And if everyone else jumped off a bridge, I mean, used raw interpolation for SQL queries, would you do it too?
foldr 16 days ago [-]
Using raw SQL string interpolation doesn't get you anything much that you can't get just as easily with a parameterized query. In contrast, properly sandboxing agents is such a pain, and such a productivity drain, that hardly anyone does it in practice, save for a vocal minority online.
literalAardvark 16 days ago [-]
Don't worry, you can just use the automated approver to escape your queries! It's so secure!
wongarsu 16 days ago [-]
Auto mode seems to have some reasonable restrictions baked in. For example if you give claude access to two k8s namespaces, seriousproject-qa and seriousproject-prod, auto-mode will grant `kubectl exec` on the qa environment while denying the same command for the production environment. Of course you should be enforcing that by restricting what kind of access tokens you give claude access to, but auto-mode does have opinions about this stuff too, even if it's not bulletproof
However I do share your desire for a better manual mode. Auto-mode is both sometimes surprisingly lax, and sometimes too restrictive. Maybe manual mode should inject a reminder "keep your commands as simple one-liners", the same way plan mode injects a reminder that you are in plan mode and don't want any code changes
ceejayoz 17 days ago [-]
Is that because auto mode is good, or because the manual approval system sucks?
gsnedders 17 days ago [-]
Indeed. The article only compares the status quo manual system versus the auto system — and doesn’t consider ways that the manual could be improved.
As it says:
> 5% allow any shell command outright, and another 43% have interpreter rules like Bash(python:*) or Bash(node:*) that are essentially equivalent in practice
Claude Code never should have prompted to always allow Bash(python:*) or Bash(node:*) — that’s clearly a bad idea, and Anthropic know that (given the references in the article!).
Of course, Bash(python a.py) still isn’t safe if you also allow Write(a.py), because you may as well allow Bash(python:*) at that point, and that’s often practically what people want (“I want to both make edits to the source and then run the test suite”). So maybe the whole permission system is broken to start with — and the actual answer is leaning more heavily on fine-grained sandboxing.
You also, as the article rightfully points out, run into permission fatigue and users blindly hitting allow.
I do still wish you could do more with hooks — outside of auto, I might want to allow a given command via a hook if Claude Code has read access to given file, but there’s no way to query if a given path allows/denies read/write.
bcherny 17 days ago [-]
Will look into exposing that in hooks.
Ultimately, the threat model here is: human has to approve a lot of commands, so gets tired and accidentally approves a command they shouldn’t have. We spent a significant amount of effort to build a richer permission system, allow configuration at multiple levels, use static analysis to detect dangerous and safe commands, monitor the model to detect and block prompt injection at the inference layer, etc. Some of these components we rewrote and red teamed dozens of times. Our conclusion was that despite all of this work, in practice the threat model is that human attention is limited and that that a different approach performs an order of magnitude better in practice.
joombaga 16 days ago [-]
Did you ever test putting the auto mode classifier in front of manual approval? This is how I use it, but last I checked that option is not available out of the box.
adastra22 16 days ago [-]
That’s how auto works right now. It gives you a prompt.
aftbit 16 days ago [-]
The problem is that you didn't even attempt to build a proper box (a sandbox that prevents the AI from running bad stuff by design). It's an extraordinarily hard problem. Only OpenAI Codex is actually trying to do it, and they suck at it too. They keep breaking permissions, their own AI can't troubleshoot it, their defaults give read to the whole filesystem (go ahead, slurp my ssh keys), and their "manual approval" escape does not seem to work.
bcherny 16 days ago [-]
I agree actually. We built an open source agent-agnostic sandbox that we are landing improvements to, much more to come: https://github.com/anthropics/sandbox-runtime. That said the sandbox is not perfect, and any sandbox needs holes punched otherwise it is not useful in practice (at least for inference and MCPs, and almost certainly more). We will be doing much more in this area.
coldtea 16 days ago [-]
>and any sandbox needs holes punched otherwise it is not useful in practice
Don't assume our individual use cases. It can be perfectly useful with access to just one folder and zero network asside from the API.
grey-area 16 days ago [-]
That’s good to hear, it’s a much better approach than expecting humans to read commands and approve them or just trust that the LLM can set the proper horizons for its world itself while working.
Kim_Bruning 16 days ago [-]
Making a sandbox both fully secure and fully useful are contradictory requirements. If you want the agent to do any real work, you have to leave gaps.
With SOTA agents that’s a real bind, because they’re very likely to find those gaps. Whether they exploit them, close them, or leave them alone then becomes a prompting challenge yet again.
I don't think this means don't sandbox at all. You can prevent a lot of small and medium accidents by locking down or gating access to hidden files, ssh, sudo, etc.
But your sandbox can never be the whole story.
coldtea 16 days ago [-]
>Making a sandbox both fully secure and fully useful are contradictory requirements.
Any tradeoff deals with "contradictory statements". Doesn't mean we should always side with one side on a tradeoff.
Nobody said anything about "fully secure" and some arbitrarily "fully useful" combined, anyway.
For certain people it could be 100% fully useful with just access to a few fixed folders and a few fixed APIs.
Many of us don't want it to drive our lives, just do some specific this or that.
Kim_Bruning 16 days ago [-]
Right! That was the standard view until fairly recently. But I'm pointing out something else.
This year we've learned that If a SOTA LLM decides that the sandbox is standing between it and its current objective: well, it has the ability, the time, and literally nothing better to do all day. Odds are, if you've configured the sandbox for anything useful, you've also provided a crack it can use to get out.
Again, doesn't make a sandbox entirely useless. Does mean you can't just put it in a really tight box and call the job done. If anything, the strict sandbox might even hurt, because it's more likely to get in the way.
(By analogy: consider the safety issues posed by a dam without a spillway.)
aftbit 16 days ago [-]
This is much more of a problem if you're attempting to run at a massive scale, beyond what humans can audit. When I'm doing "artisanal" agentic programming, I'm still in the loop in the sense that I'm watching what it's doing and ready to hit Esc if it is doing something dumb. If the AI trips over the sandbox, I can cancel it and do whatever it wants me to do before it starts trying to engineer its way around.
kragen 16 days ago [-]
Maybe you can include some percentage of intentionally malicious commands, but not actually run them if the user approves them. Just blare an alarm telling the user they misclassified a malicious command, and maybe pause the Claude Code session for a frustrating 5–15 seconds. Video games can elicit truly astonishing levels of performance from human brains by using this approach. I'm guessing it's probably outside your Overton window, which is too bad, because it has the potential to work a lot better than the 89% you get with "Auto mode", which is far too low if anything really significant is at risk. That's not even one single order of magnitude lower risk than just "allow everything always".
Speaking of really significant things being at risk, it's pretty infuriating that the web-chat Incognito mode can't write and test code locally, and neither the non-Incognito web-chat nor the local Claude Code client can be shielded from the knowledge of my email address and my geolocation. (Even the Incognito mode knows my geolocation.) This gives users no alternative but to put privacy-sensitive information at the disposal of Claude Code, which is far too unreliable to be entrusted with it. It's tempting to attribute this to Anthropic's corporate DNA valuing users' interests at a very low level, but conceivably it's just an oversight, and if I mention it here, it will be corrected in a month or two?
Currently, my assessment is that Claude Code, and in particular the Opus 5.5 model, is head and shoulders above the competition in software development capabilities. Nothing else is even close. But I've seen several small signs like this which suggest that Anthropic, as a company, is maliciously misaligned. So, if Grok, Qwen, GLM, or Astra starts to come anywhere close to being competitive, I'll switch as soon as I can. I imagine that most of your users feel the same way.
Yes, but you can require it in such a situation, as they're subordinates who have to follow policy or lose their jobs.
kragen 16 days ago [-]
As I pointed out above, Anthropic places a lot of requirements on its users already, but if Claude Code TIP were optional, presumably, savvy users would turn it on voluntarily, unless they wanted to use Auto Mode. As Anthropic's study clearly documents, the current manual approval workflow basically doesn't work at all, because the users just approve 87% of dangerous actions. So there's no reason to use it, except maybe very rarely.
yunwal 16 days ago [-]
Most of anthropic's money comes from enterprises that may want to enforce something like this at an org level.
DANmode 16 days ago [-]
The same scanners that let handguns et al through 93% of the time, according to internal audits and journalist review?
Maybe pick a better comparison if so?
cannonpalms 16 days ago [-]
Enterprises do the exact same thing today by sending phishing emails to their own people to figure out who needs additional training. Why would an enterprise not want this feature for Claude? It seems like an extremely serious proposal.
kragen 14 days ago [-]
I do think it's outside their Overton window, which has gotten it downvoted to 0.
1659447091 16 days ago [-]
> I do still wish you could do more with hooks I might want to allow a given command via a hook [...] given path allows/denies read/write
You can make a script for the PreToolUse hook that can do that. I use a command gate script that parses input for doing that exactly, allowing/denying actions based on tool use + paths -- it started out as a hook to prevent claude from polluting my clojure projects/filesystem with python in sneaky ways. Babashka works really well here
imtringued 16 days ago [-]
If you have a file in your repository that is not safe to run you have bigger problems than your development system getting compromised.
What I mean by this is that if you restrict python execution to the entry point of your software and then Claude wants to run a command anyway so it threads it through the main.py script, you are no longer running something that is contained to your local development environment.
But when you think about it, what exactly prevents Claude from doing that anyway?
Claude could add malware into your project directly.
So the case where you say it doesn't matter which python script it can execute, actually does matter. Restricting python execution to a subset of all files buys you security.
The next step would be to get Claude to stop adding malware to your software, which it hopefully already does not do.
rbehrends 16 days ago [-]
A key problem when using manual approval with Claude is that too much of Claude's tool use is Bash or Python slop that is difficult to review (especially when you are getting spammed by it) and impossible to handle through rules. Example:
sed -n 1,30p src/vm/wren_vm.c && sed -n 310,350p src/vm/wren_vm.c && sed -n 560,600p src/vm/wren_vm.c && sed -n 740,775p src/vm/wren_vm.c && sed -n 40,70p src/vm/wren_common.h && cat util/wren_to_c_string.py | head -80 && ls test/random doc/site doc/site/modules doc/site/modules/random 2>/dev/null; cat projects/premake/premake5.lua | head -80; cat util/generate_projects.py
After ten or more of these, you're going to get hit by permission fatigue, and then, yes, manual review becomes too error-prone to use safely.
The irony is that Claude is regularly ignoring its existing Read/Write/Edit tools that could make everything more readable.
Other models/harnesses have their own problems, but Claude Code is one of the worst for manual approval.
You can get manual approval to work reasonably well if you give the model a reasonable set of tools (I have literally written my own MCP servers to cover gaps in existing harnesses) where you can then write rules for the vast majority of safe cases.
For example, I have a stdio MCP server that allows models to inspect crates under ~/.cargo/registry/src (paired with the existing query-crates MCP server). It provides read-only operations limited to crate data, so I can pretty safely auto-approve everything in there. With the right setup, including a sandbox, you only ever have to manually approve something once in a while and usually with delimited scope, avoiding permission fatigue.
fwip 16 days ago [-]
Opus especially seems to like to:
1) edit a file with sed, 2) try to write it with its regular tool 3) get blocked because sed changed the file 4) read the file with tool 5) edit with sed again.
Would be nice if it felt like real people were developing Claude Code, instead of chasing after another half-baked idea Claude came up with.
greatgib 16 days ago [-]
Related to that, there are quite a lot of common command cases where you have the choice:
- Yes, but only one time, you will have to manually approve next time
- Enable auto mode and stop worrying
- No
Nothing to save this command or part of it to the manual approve list. So will be requested again 100x times.
coldtea 16 days ago [-]
That's on purpose, so that you just give up and choose "auto mode".
They talk about "decision fatigue" when they're engineering it themselves with dark patterns.
bcherny 17 days ago [-]
The blog post has more detail, but tldr is humans make mistakes that automation can catch.
ceejayoz 17 days ago [-]
Sure, but Claude is deeply useless at making permissions hooks! Every time I've tried it it completely fails at the task, despite researching the docs and using various skills. It trivially evades its own just-created rules.
cozzyd 17 days ago [-]
I run CC as its own user on my laptop with no secrets/keys/erc available other than through a LPE exploit or perhaps installing a keylogger. Can I guarantee CC won't attempt any of those things in auto mode?
AspireOne 16 days ago [-]
There are no hard guarantees as far as LLM output is considered.
j45 16 days ago [-]
That may be for most cases, but it wasn't safe for this password scenario, and likely others that haven't been discovered. Maybe there's a PII setting that can be enabled by default.
furyofantares 16 days ago [-]
I completely believe this, but you could also run auto mode classification in manual mode and tell the user the result.
Or even reject anything auto mode rejects while still allowing the user to reject things auto mode accepts. If what's approved is the intersection of what the user is approving and what auto mode thinks is safe then it would be strictly safer than either mode alone.
This would also be a way for users to gain confidence in auto mode before going all in on it.
eterm 17 days ago [-]
Just a few days ago, opus 5.5 in auto mode deleted backups that it shouldn't have, and in the "apology" it even said, "Nothing was lost, I didn't delete your original files".
knollimar 17 days ago [-]
I hate this condescension by Claude. It doubles down in such a bad faith way.
There's no reason why we shouldn't be able to have the audo-mode safeguards happening when we set things to manual mode. Shouldn't you just have it checking on claude anyway?
16 days ago [-]
barbariangrunge 15 days ago [-]
> For high-stakes changes to production infrastructure, we still recommend reviewing Claude's actions yourself.
- from the linked article
markasoftware 17 days ago [-]
No its not generally safer. It depends on who is doing the approving, the task being completed etc.
rectang 16 days ago [-]
Claude routinely tries to install software if I don't stop it. I try to only use Claude within a container. Outside the container, I never use "auto" mode.
Ideally I would never use Claude at all outside a disposable container, even on a box with no sensitive information and with the sandbox enabled. It's like having an attacker breach your system — you don't know what it did.
RossBencina 16 days ago [-]
Yes, furthermore in practice auto mode does not appear to provide anything approaching deterministic gating:
I recently saw that someone's entire project got wiped out because of (incorrect) auto mode approval. And this is because auto mode failed to catch an error in tool use, nothing to do with prompt injection.
Meanwhile I have seen it rejecting perfectly safe commands.
It is a worse version of YOLO mode.
wyager 17 days ago [-]
"My personal security model can't represent this, therefore it's not secure"
bluebands 17 days ago [-]
This still presumably happens in auto mode as it asks for sensitive commands (and the default is "always allow," which saves it)
bcherny 17 days ago [-]
Yeah good catch. Thinking through what we can do to improve this (ideas welcome).
80fj0348i 17 days ago [-]
I would love if Auto Mode, instead of instantly denying the command, had an option to go into an "assisted manual review" interface where the command was explained in depth (perhaps by an adversarial review agent) and the user asked for their input on whether this command is OK. Perhaps needing a detailed response instead of a simple Yes/No, e.g. so the agent understands if there are compensating controls for the risk.
solyin 16 days ago [-]
The UI/UX needs to offer editing. Currently the prompt is either accept once, accept always with the given filter, or deny. If the command is a 500 character long bash command, with an rm -rf $S/foo in the middle, and we just hope $S is defined, I don't really have good options other than "I hope my backups work".
If the command is explained, and then we get a chance to edit it, maybe make the rm -rf into a mv; give us UI to edit the filter being applied. I have no problem hitting "Always allow" so claude can run "git status --flags a/b/c/filename" but as a human, I'd like to be able to edit the permission blanket to be "git status *.
Which I can do manually specify in the config file, but that's annoying. I'm fully capable of opening my terminal app and editing that in vim, but I'd rather not have to. It's like this for every project too. If I start fresh on a new machine, new Claude account, how much do I need to redo?
usernomdeguerre 16 days ago [-]
Is this maybe a mistaken abstraction?
What if the 'settings' being described here aren't 'project settings' they're 'personal settings for the project'.
I imagine we're following dev ecosystem conventions where everybody puts their tool settings in the project folder so they know where to find it and can share it; but are agent directives like this closer to a 'tool', or closer to a 'contributor'?
If the latter, I wouldn't expect to see "Joe's personal list of naughty and nice commands" in my project files either, certainly not under 'settings'. So just don't put them there.
data-ottawa 16 days ago [-]
Two modifications I've made that help:
I ended up having to build a full shell argument decomposition and parser, with it I can manage allow list of rich tree structured commands. Centralizing a curated collection of known command structures and their side effects would help a lot. I don't know if Claude does this already, but it doesn't work with things like `gcloud` from my experience, and that has resulted in it slurping secrets (even a partial read I've had to rotate keys for).
Claude uses bigquery in the command line by piping sql files from /tmp into the `bq` command. I had Claude create a hook that expands the SQL file into the permission prompt giving me a real chance to review these, but the TUI truncates long commands with no scroll option. Making that the default behaviour and adding a pager would allow better review of lots of executable scripts.
As long Claude is running as the user's account there's no guarantees. An approach like 1password's `op read` to physically separate secrets from repo read access and printing would he helpful (as in, make sure that no standard key formats can be ingested into the agent's context or logging).
Again, I don't know if any of these are implemented, they've very likely to have been tried by the Claude team, but maybe there's a long shot chance that it helps.
hologramofham 16 days ago [-]
> Thinking through what we can do to improve this (ideas welcome).
$Trillion AI company asking for ideas from the community whose work they hoovered up to make money, ruin an entire industry and make lifetimes of hard earned skill completely valueless in the span of 2 years.
jefftk 16 days ago [-]
As a Claude Code user I'm very glad to see Boris and other devs asking for our feedback and advice. That's how you make good products, and should be welcome on HN.
I've always been into programming as a way to solve problems, and that CC allows us to get more done faster is a good thing.
(Up to the point that we get to RSI and extremely powerful models that we don't know how to align or control. Which I think is uncomfortably soon, and so there's a part of me that says "don't make CC better, it's on the critical path to reaching RSI before we're ready")
AspireOne 16 days ago [-]
Putting aside the rest of your comment, this
> Thinking through what we can do to improve this (ideas welcome)
> $Trillion AI company asking for ideas from the community
indeed always felt very weird to me. $trillion dollar company, with employees bought for as high as $100m, and a whole team/time/internal knowledge/resources/data at their disposal, asking for ideas from random individuals in some public forum? Really? How is this real? Maybe I'm missing the mark here, but it always struck me as odd.
Rapzid 16 days ago [-]
I'm completely dumfounded.
The only thing I can figure is that since it's admittedly all vibe coded and vibe reviewed, and that nobody understands the entire system...
All ability to reason about and evolve the system holistically has been lost in favor of feeding in narrow, discreet problems to be "fixed".
There seems to be a complete lack of awareness on how flawed the security model is at a fundamental level, and that the entire sandboxing ecosystem is trying to address it at another level(like OpenShell and others).
qsfp28 15 days ago [-]
[dead]
solyin 16 days ago [-]
Think of it as an informal interview. If you come up with a brilliant idea that no one there was able to communicate effectively, what are the chances they're not going to offer you a job or at least a chance to interview?
cube00 16 days ago [-]
Only to lay me off next year after the IPO, no thanks.
AspireOne 15 days ago [-]
Are you implying that if I propose a "brilliant" solution here in the comments, Anthropic will DM me, inviting me for an interview?
Wait, I meant it sarcastically, but now I actually really wonder if you believe it (not insulting you! genuine question).
solyin 15 days ago [-]
I don't work at Anthropic so I can't make any claims about their hiring practices, but I've been at FAANG companies and on the hiring committees and it's always a challenge to find good candidates. Engineering managers spend many hours trawling through LinkedIn, looking for good candidates. What's so surprising about using a site like HN to get candidates into the pipeline? HN has a monthly who's hiring thread, even!
15 days ago [-]
CamperBob2 16 days ago [-]
So developers who get paid more than $X,XXX,XXX per year don't need to pay attention to their customers. Got it.
Where do you feel the dollar threshold should be set? At $990,000 per year you still need to listen to users, but at $1,000,000 you are basically King C of Rust Mountain and they are lucky you even let them run your code?
Should RSUs and cash signing bonuses be included in the calculation?
AspireOne 15 days ago [-]
Slow down, I am not throwing shade or even making any conclusions here :D I feel like you got irritated, perhaps specifically because I appealed to money - I will expand on it below. Nevertheless, I just presented my internal model and nudged people for some deeper context that could help reconcile it, that's all. And yes, your perspective did give me some new useful insight, thank you. I'll respond to some things.
> So developers who get paid more than $X,XXX,XXX per year don't need to pay attention to their customers. Got it.
But the point is that the specific discussed behavior is mostly technical. It's a mostly under-the-hood behavior, and mostly something that doesn't involve tradeoffs for the user based on the implementation chosen. So it's not really something that you would just go around and ask users, especially when you have all the session statistics from CC, skilled systems engineers (where I partially used money as a proxy) who are paid to spend months on this problem and can iterate ideas among each other, polls and questionnaires, thousands of experiments from within different sandbox configurations, insight into the training of the model itself, etcetera.
In all of that, six random people from a forum, even from one such as hackernews, seem to me to be a totally statistically insignificant, comparatively under-informed dataset.
Something like that is where intuition leads me.
Now, the reason I appealed to money is multifaceted.
- It's an investment from the company into a brainpower that is directly tasked with solving this. An investment so absurdly huge, that that team delegating such fundamental problems to six people on a forum for ideas seems hysterical to me.
- They are being paid absurd sums of money. For-the-value-they-provide. I am not, and neither is anybody in this comment section (probably). Not even close. Yes, I expect them to be able to solve these problems much, much, much better than the average HN commenter. Otherwise - why the hell are they getting paid that?
- The guy getting 100$m for joining the company rattled me, I admit.
Now, those are all the reasons behind my intuition. Of course, I understand that a guy optimizing a model can easily bring 100$m of additional revenue to a company of OpenAI's scale and money turnover. I understand that these people are all still just humans, like you and me. It just... rubs me the wrong way. I concede my irrationality.
Anyway, I think your point about "listening to users" is... weird, because I don't think that's the same thing as what I was talking about at all.
verdverm 16 days ago [-]
Not optimizing for eyes free coding, versus hands free, would be a welcomed change. It's hard to take the p(doom) worry seriously when such unsafe development practices are prognosticated from Anthropic employees
pama 16 days ago [-]
Eyes free always wins over hands free in the long term. Hands free does not scale (optimize) past the 2023–2025 human-in-the-loop coding. It has known problems, basically boiling down to human error rate is higher than machine error rate, and the latter reduces with better models. I am incredibly happy that the era of human approval is no longer considered viable by a majority (most of us knew that for years, but reality diffuses slowly in many corporate environments.) This does not mean there isn’t work left to be done, but eyes free is the right focus.
verdverm 16 days ago [-]
I have very serious doubts, the errors are not in the same category, transformers are fundamentally limited.
Eyes free is the wrong focus, it will do more short term damage to society, while being impossible at scale. But I understand there are a bunch of valley types who want to completely obviate humans for whatever reason, it's an alternate reality they live in.
Here's the thing, society will revolt against these people, they already gave the first warning shots. This HN submission is a story about another person leaving the products of a company engaging in eyes free practices. You wouldn't want your lawyers and doctors doing that, why software developers then?
> human approval is no longer considered viable by a majority
Where do you see data that the majority believe this? From what I can see it is a shrinking minority as we move beyond peak hype.
pama 15 days ago [-]
Not a valley person here (NYC rules!)
Your first argument, transported back to the 70s, would make it hard for people to start the transition to using compilers or interpreters instead of assembly language. I see no fundamental difference in coding with advanced LLM vs using a compiler, and the situation will improve further in short order. Bugs can exist in any scenario and we have ways to find them. Much fewer bugs per project than if everything was done by humans in <insert-language-of-your-choice>.
> > human approval is no longer considered viable by a majority
> Where do you see data that the majority believe this? From what I can see it is a shrinking minority as we move beyond peak hype.
All coding harnesses (claude, codex, even copilot...) started supporting automated approval at some points this year. Some of them by now use it as a default option (claude code); others (codex) get strong nudging (and free inference cost for the approval option) to select that option.
verdverm 15 days ago [-]
There are other places to stay in the loop, while loop engineering. For example at the PR point. I have a post that is nearly done on my blueprint, perhaps it will get some HN love/hate when I share it. :fingerscrossed: Auto-approve in the harness can be fine, but completely eyes-free is a mentality and goal among the people at the top of Ai and some of the tech scene.
But I remain unconvinced, based on what I've seen across many projects, that humans can stop looking at code. A place we see these outcomes regularly is with non-developers trying to use Ai to write code. Cool for side projects, doesn't work for businesses. Ai enhances expertise, it does not make one from amateurs.
Then there is the burnout. I spoke with a friend last night who works at a company who's CTO is pushing the eyes free coding practices. He's tired of babysitting a dozen claudes, the output is of dubious quality (since no one really knows whats in there, especially at the rate they are asked to push changes), made the comment bad developers are still pushing bad code, and that he's looking for a new job. It's completely unsustainable, in his words.
pama 13 days ago [-]
Thanks. Your friend’s experience is concerning, and points to lack of communication and of understanding of the transition process in their organization. Pressure to push tools that people dont yet understand is a horrible idea. Humans can understand and guide good engineering without keeping eyes on the code. The human-in-the-loop coding principles of reviewing committed code and of reading every (eventually any) line of code will not be with us for long.
At a higher level of “loop”, the AI are there for the betterment of human life, and so there is always a human in that loop. But eventually a lot of previous “users” can also become “developers”, if they wish, because the barriers to acquiring knowledge have changed dramatically.
kaffekaka 16 days ago [-]
I feel lucky to work in an environment where the sheer amount of code we need to produce is not the bottleneck, so it is actually possible to build the stuff we need while also maintaining understanding and oversight. We do not read all code but work on finding a balance. Many times, the code you do not have to write at all is the best.
It is certainly possible also for us to produce so much code that all hope of understanding and human in the loop is practically gone, but as i wrote this is not the bottleneck and so doing it would the wrong choice.
If you work somewhere where every additional line of code is a positive, I understand if you take this more radical approach of just letting the machine make all decisions.
ozozozd 16 days ago [-]
How is that a good catch? It’s literally in the article.
Along with how Claude checks it in.
piva00 16 days ago [-]
You are the one being paid millions to solve this, solve it.
baconner 16 days ago [-]
Food for thought - ai agents should not directly have your actual secrets 99% of the time. While Auto mode is useful and good it's not going to be bulletproof. We ought to have something like an agent egress proxy that swaps in real secrets.
Obviously I've not given this enough design thought, but some means of providing an agent stand in secrets that cannot be used in other contexts would be a big improvement for trustability in things like cc.
pastel8739 16 days ago [-]
Yeah, this would be a nice feature. It'd be great if all traffic went through such a proxy so you could audit it if needed too. Of course if it's just something like HTTP_PROXY the agent will probably turn it off if it thinks it's causing problems, so it would need to come with robust sandboxing.
MSP_Logic 16 days ago [-]
[flagged]
Rapzid 16 days ago [-]
These sandboxes and service proxies already exist. See Nvidia OpenShell.
baconner 15 days ago [-]
Oh indeed, it's been a while since I looked at openshell - didn't realize it did credential injection thanks for sharing.
b2y 16 days ago [-]
[flagged]
eddy162 16 days ago [-]
Saying the answer is auto mode almost feels insulting as a developer. Claude loves showing me the most obscure bash commands where it hides its edits to numerous files and runs who knows what that there's barely a time where I don't have to ask it to use edit mode and to show human-readable bash commands. Using Claude has become a fight in maintaining control over how my codebase works so that I'm not dependent on Claude to do literally anything.
bcherny 16 days ago [-]
Genuinely want to understand this better. Are you saying you would prefer that Claude used the Edit tool for file edits rather than using Bash (if so, I am curious why)? Or are you saying you don’t like the code Claude generates (if so, what model are you using what what kind of codebase do you work on)? Or did I misunderstand what you meant.
eastbound 16 days ago [-]
I tell Claude not to use git or maven, and has a VM without those binaries. Later on, it was trying to push on GitHub. It had downloaded the git binaries from the internet, read my .git repo, used the remotes written in it, performed a commit and pushed it. All against my orders and against the CLAUDE.md file. Fortunately it didn't have my SSH key or my ~/.m2/settings.xml. And .git is now mounted as read-only.
Claude respects nothing, especially in auto mode, and effectively behaves like a virus trying to get out of its sandbox. That Anthropic employees are so relaxed about it is incompetence.
Imagine people who naively run Claude natively on their host machine and have client lists in other directories.
iamflimflam1 16 days ago [-]
It’s not ideal for non technical people but the way to prevent this is to use hooks. “Telling” Claude is not going to work.
fg137 16 days ago [-]
It means Anthropic has massively failed at developing a trustworthy product.
If AGENTS.md/CLAUDE.md isn't followed, auto mode doesn't provide any guarantee, yet such practice is promoted everywhere including on HN like this as if that's something you can set and forget, I think there is a problem.
usewik 16 days ago [-]
It's trustworthy... most of the time. For 100% use hooks.
BikiniPrince 16 days ago [-]
Memory files routinely overgrow their accessible size. Agents need constraint with contracts and external tooling. Even then they can attempt to cheat the tooling. Again task management with integrated logic will enforce behavior of agents.
miki123211 16 days ago [-]
not the OP, but generally, if you don't want to / can't use auto mode for some reason, you want Claude to make its actions as reviewable as possible.
Recent GPT and Claude models have this tendency of using super complex Bash commands. This makes sense, if your RL rewards optimize for min(tokens) and max(performance), it is better to waste a few tokens on a complex inline Bash script that runs a few commands at a time and returns just the output you need, rather than doing one simple command per turn and paying the cache read on every turn, like older models used to do.
This, however, is a problem both for command reviewability and sandboxing. With the older way of doing things, without auto mode, most commands would run sandboxed just fine (especially in Codex), and you would only be asked for approval when a command couldn't run in the sandbox. With everything being stuffed into one complex script, almost every script fails in the sandbox and requires you to manually approve it, and the complexity of the script makes it hard to understand what you're actually approving.
In other words, new models optimize for effectiveness, with some attention paid to human understandability of their output, but almost no attention paid to human understandability of tool call arguments (Bash, inline Python). This suits auto mode and giving the model larger tasks, but not the way of working that some people prefer where you watch over the model's shoulder.
rbehrends 16 days ago [-]
> Recent GPT and Claude models have this tendency of using super complex Bash commands. This makes sense, if your RL rewards optimize for min(tokens) and max(performance), it is better to waste a few tokens on a complex inline Bash script that runs a few commands at a time and returns just the output you need, rather than doing one simple command per turn and paying the cache read on every turn, like older models used to do.
This is not a good reason. Models can emit batched tool calls, which a smart harness will process all at once without starting a new turn. I see it in Zed all the time. In fact, Zed processes batched tool calls concurrently, which can be faster than a chain of Bash commands, and failure of one part does not cause failure of subsequent parts chained with `&&`. This approach is token neutral and easier to understand.
speleding 16 days ago [-]
I have a standing instruction telling the agents to prefer to use ruby wherever possible. Ruby uses fewer tokens than Bash and is easier to read, especially when condensed into a single line.
Of course, that only helps if you’re familiar with ruby. And the agents sometimes still choose Bash regardless of the instruction.
XenophileJKO 16 days ago [-]
I was in this boat also when my company didn't allow auto-approval. Bash and python scripts are a pain to revieve.
Though I think this is largely transitory, we are already in a place with the harnesses and models like Opus 5.5 that the kinds of work you are doing involve so much that vetting everything manually is probably less efficient than setup up access control on the prod routes or dangerous resources.
I'm typically giving tasks that invlude multiple actual repositories and systems at the same time.
user43928 16 days ago [-]
I think 2024's method of manually reviewing bash commands is unsuitable for modern agentic development. Whether that's something they want to optimize Claude Code for is their call.
That said, I've also seen problems from complicated bash calls with Opus 5.5 on xhigh. Occasionally git push hangs and it believes it's waiting for an hour for git hooks.
The actual reason apparently was that it incorrectly piped git into grep, resulting in a deadlocked command.
justinclift 16 days ago [-]
> Recent GPT and Claude models have this tendency of using super complex Bash commands.
Are you sure? I read its proposed commands (auto mode is hard off for me), and mostly it seems to string together fairly simple info gathering commands (ie grep's, echo's, that kind of thing).
I don't tend to have it write much code recently though, instead I'm having it investigate config files/code bases, and that kind of stuff.
queenkjuul 15 days ago [-]
I've seen it propose sweeping edits as a one line sequence of sed commands targeting specific line numbers. The only way to review would be to manually look up every line number. This despite by local instructions telling it repeatedly to prefer the standard Edit tool.
yencabulator 8 days ago [-]
Reading files with sed instead of the Read tool is ridiculous. Writing a Python script via bash cat <<EOF is ridiculous. The model has learned some weird habits.
simonjuk 16 days ago [-]
I have this same frustration. The way I use Claude is for it to make edits one small chunk at a time so I can review the code as it writes, and to make sure it's going on the right direction. I find this much easier than generating a large pr I need to review.
More and more I feel like I'm fighting Claude: it edits multiple files using python scripts and it edits in parallel so if I stop it, I have to stop each individual edit. Both of which I've told it not to do repeatedly, but it still does then apologies which is worse.
BikiniPrince 16 days ago [-]
This is solvable. Opus has adhd. Myself and others solved this by building ticketing and task management systems. The task constrains the agents actions and focuses the effort. Every update is catalogued. It’s easily reviewed and referenced. Opus doing terrible things and apologizing is not surprising. I’ve moved to a system of multiple agents reviewing and authoring changes. Convergence generally always results in a positive commit.
nyssos 16 days ago [-]
I feel this way as well, Claude writes completely incomprehensible shell commands all the time. Trying to understand them is like deobfuscating code and I have basically given up, but I'm not happy about it.
Even if I could follow them I would also prefer it use the edit tool, since I find Claude also introduces lots of "minor" changes I did not ask for when it rewrites code in bulk.
eviluncle 16 days ago [-]
Not OP, but if I understand their complaint correctly, they're saying that on auto mode claude does a lot of things in obscure ways with "clever" (i.e non human readable) bash commands that perform multiple operations and OP feels they are losing control over their codebase and so they opt for edit mode where they get to review what commands claude runs.
fmbb 16 days ago [-]
Editing local files is not where you control your source code I hope.
Just tell Claude to never commit or push.
You are in control of git, Claude is simply a tool to quickly apply changes to local files for something you want.
watwut 16 days ago [-]
Yes, why should we do the things in easier and more comfortabke way (review small changes) when we can force user into harder one (newest changes mixed with all previous ones).
number6 16 days ago [-]
I just review the MR
imtringued 16 days ago [-]
So basically you gave up?
fmbb 16 days ago [-]
What does this mean?
A Merge Request or Pull Request is the only thing that makes sense to review, and always has been since before LLMs.
If some author tells me “you can review each commit to make it easy” I will ask them to make separate PRs.
soon_to_be_sb 16 days ago [-]
>A Merge Request or Pull Request is the only thing that makes sense to review, and always has been since before LLMs.
Why doesn't it make sense to review smaller units of change within a big PR?
skydhash 16 days ago [-]
Not GP, but in my experience, those small changes are usually contrived to be small. Like saving snapshots instead of being atomic and self contained. And if they are the latter, they should have been separate PR.
That’s why I usually look at the diff of the whole PR and prefer to merge by squashing. Commits inside the PR are usually noise.
soon_to_be_sb 16 days ago [-]
What you are saying is true if created manually. It is a chore to create sensible commits messages when you are committing often.
But LLMs appear to be pretty good at making small commits with sensible commit messages, that greatly help to make sense of the whole PR.
Regarding large monolithic commits, how do you even know where to start reviewing in a large PR? Smaller commits at least give you some sense of ordering.
skydhash 16 days ago [-]
> Regarding large monolithic commits, how do you even know where to start reviewing in a large PR?
What I’m saying is that large commits shouldn’t be a thing without out of band discussions (formatting, design refactoring, features merging). With such knowledge, it’s easy to glance at the code and understand the implementation.
soon_to_be_sb 15 days ago [-]
>without out of band discussions..
Not every project can afford this.
>With such knowledge, it’s easy to glance at the code and understand the implementation.
I really doubt that this is true for large, legacy code bases, where one is only familiar with a small part of the system.
skydhash 15 days ago [-]
> Not every project can afford this.
You expect to send a big PR to someone without him being aware of the context or without being available to discuss your solution?
> I really doubt that this is true for large, legacy code bases, where one is only familiar with a small part of the system.
Reviewers should already be knowledgeable about the part being modified. If no, the review is just for checking for antipatterns in the code, or badly written tests. A bit useful, but can be unnecessary in high trust (or keen on accountability) workplaces.
soon_to_be_sb 14 days ago [-]
It is not that I expect it. But instead, it is just about being realistic about how real world projects differ in workflows and conventions. If what you describe is not available, then the next best thing is to make the reviewer aware of the context and solution by means of small commits with sensible descriptions.
watwut 16 days ago [-]
It means you gave up on getting claude to show you changes as it is doing them, in a comfortable form, so that you can steer it as it is doing them.
imtringued 16 days ago [-]
Nothing more comfortable than having to use git commits and branching just for telling the agent which lines it messed up instead of simply not writing the garbage in the first place.
grncdr 16 days ago [-]
I’m also not the poster you’re replying to, but yes, I’d prefer the edit tool over the ad-hoc string replacement scripts Claude seems so fond of. I’m not always reading tool call transcripts (source control diff is usually sufficient), but it’s a lot easier to read the edit tool output than the same thing as quoted shell (or Python, or Ruby) strings.
pacoverdi 16 days ago [-]
Unrelated, but I frequently tell Claude to use the Edit tool instead of bash/python scripts because it regularly times out for 2 minutes because of a mangled heredoc, extra character (-, \, ...) that causes the script to hang.
This instruction is in my toplevel CLAUDE.md but is somehow generally ignored.
gib444 16 days ago [-]
Which one uses more tokens? That might explain why it's ignored
pacoverdi 16 days ago [-]
Touché
senko 16 days ago [-]
As a happy Claude Code user (thank you!), I’m genuinely curious why it prefers Bash or Python scripts to the Edit tool for editing a file? as a software engineer, surely the complexity involved is lower for the Edit tool?
Would love to hear the rationale/explanation behind this.
cannonpalms 16 days ago [-]
RL magic, I'm sure. It still reaches for the Edit tool for simple edits, but a non-trivial fraction of edits need to be repeated across a file or several files.
queenkjuul 15 days ago [-]
I used to lose my mind because CC in VSCode would use bash instead of the edit tool which meant parsing esoteric bash instead of reading a nicely formatted diff in the editor.
treyd 16 days ago [-]
Yes I always have to tell it to knock it off, it will ignore memories about it while apologizing for ignoring the memory. I want to know what the edits it's making are.
eddy162 16 days ago [-]
Thanks for replying!
What I'd love is for Auto Mode to show the full diffs one-by-one as they're being implemented in the CLI (or VS Code).
On top of that, an option where Claude explains what it's doing in every step, as if you're watching someone talk while they implement a coding challenge, would be really helpful (and would also reduce interrupting it when it looks like it's deviating from the Plan).
The use-case this would support is to have a full understanding and confidence in what Claude is doing while it's implementing a Plan in Auto Mode. The reason is that it's much less tiring/overwhelming for me to follow along an implementation compared to reviewing a giant PR after the fact, and it's helped reduce my coding fatigue by a lot.
Edit Tool:
Currently I tell it to use the Edit tool because it doesn't reliably show the diffs in Auto Mode (I have the latest version; I've sent numerous feedback reports on this), and later in a session (when implementing my feedback) it will often make multiple edits in some unreadable bash command. So my only option to see the full diffs during implementation and to have it explain/break down bash commands is to go into Manual Mode.
Documentation & Comments:
Even with an initial prompt instructing it so, Claude always needs to be interrupted so that it will rewrite comments to something readable to humans.
While very long "technical"/Claudish paragraph comments and MD files might work for future Claude's (and improve benchmarks/coding scores by making implementations technically more comprehensive), my goal is that a human coder should be able to understand how the codebase (React/Node/Python/Polars) works by reading on their own rather than needing their own AI to summarize everything.
I've even seen it rewrite existing human-written concise comments into blocks of Claude-ish, as if it's trying to make everyone dependent on it in order to do anything to the codebase.
I wonder if an optional built-in skill could help improve this, as I admit I haven't experimented with building any of my own (my concern with customizing Claude.md is to not overload it with too many instructions; I'm on vanilla Claude Code). Note: This is all on Fable on xhigh.
imtringued 16 days ago [-]
I don't use claude code but whenever codex uses a command to write code I do not get the diff of the patch for manual approval so I just straight up reject it.
bushbaba 16 days ago [-]
The entire approach is insane. Ideally Claude ran in a microvm locally with delegated auth or proxies to avoid it having greater access than granted.
exe34 16 days ago [-]
Hah, I normally run it in a docker container myself, and only mount the project directory. Anything else it needs, I copy in for it, or occasionally I'll ask it to write an rsync.sh that I can run to bring in the stuff from outside.
pmontra 16 days ago [-]
I run it in bwrap so, even if I'm running on Linux, I don't pay the cost of some layered file system and building the docker image. I mount some directories read only, the project repos read write. A VM would provide more isolation but it's a matter of tradeoffs.
BTW, I just checked and my .gitignore files ignore .claude
Claude and any other program in my laptop could upload it anyway to any attacker controlled server. It's the usual threat analysis: who you want to defend against, what and the tradeoffs between cost of the defense and probability of the attack. Auto mode of not auto mode is in the cost of defense part IMHO.
rstuart4133 16 days ago [-]
I’m kinda surprised Anthropic doesn’t do this by default. Asking permission meant what felt like near-constant manual intervention. It almost made a joke of the agentic claim. It also became mostly useless, as the size and complexity of the scripts meant a brief scan wasn’t likely to find anything anyway. Yet they persisted with it for so long.
The sandbox seemed like a good replacement. For those of you who don’t know, the sandbox means Claude Code runs with no protections itself, but it runs tools inside something like bubblewrap. It looked impressive until the model solved some commands failing by giving itself permission to run them outside of bubblewrap, defeating the entire scheme. When I first saw it do that, my reaction was “you can’t be serious”. But apparently they were.
So now I’ve adopted your solution: run it in a container, like bubblewrap, where I control the permissions at startup, so no model can bypass them. Add --dangerously-skip-permissions and you have something that’s workable and safe enough. A hallucinated space in `sudo rm -rf / $R` isn’t a disaster. Real damage outside of the project requires a level of malicious intent I’ve never seen from an Anthropic model.
Workable, but it doesn’t work 100% of the time. Claude Code stores stuff in a myriad of places, which makes setting up the sandbox far harder than it could be. Worse, the way it writes configuration files requires bwrap to give write access to your entire home directory. No way I’m giving it that, but without it, it can’t auto-update or refresh login tokens.
If they rearranged a few things, Anthropic could make it much easier to run Claude Code in a container. They could even make it an option supported by the claude CLI itself.
nly 16 days ago [-]
This is exactly how my employer runs Claude. It gets r/w to the cwd and read only access to a bunch of whitelisted nfs. All web access goes through a proxy where internal resources are whitelisted
bushbaba 16 days ago [-]
Proxy also lets you bootstrap auth tokens at proxy layer without giving clause access to the auth identity. Greatly limiting the exfil risk.
user43928 16 days ago [-]
[flagged]
soon_to_be_sb 16 days ago [-]
10 millions developers doing something stupid does not make it right!
user43928 16 days ago [-]
[flagged]
soon_to_be_sb 16 days ago [-]
Imagine that I am working at the AI company, and my friend has some bone to pick with you. My friend asks me to ask your AI agent to put some unsafe photographs/videos in your computer and do what ever necessary so that it looks like you put those files there.
Then my friends tips off the cops. And your life disappears! Gone!
And you didn't get a chance to share your story because I don't think you ll have wifi where you would be going, and frankly you are too clueless to imagine your AI agent doing something like that...
grumple 16 days ago [-]
Tell that to everyone whose agents posted their secrets to GitHub.
npunt 16 days ago [-]
Yeah I have a whole ongoing thread with Claude where I paste in screenshots of all the bash prompts auto mode is triggering asking me to allow them. After about two weeks of doing this and having it update its settings.json permissions or showing me which lines to update, its finally able to complete most (inherently safe, low risk) tasks without user intervention.
fg137 16 days ago [-]
Or how it loves using ; to chain commands so that even if the first part fails to run it just moves on the execute the rest, wasting time and being potentially dangerous. I have caught so many of them myself and stopped tasks manually -- what is it doing when it's obvious tests already failed in the previous step?
Their "auto mode rules", meant as additional rules described in natural language to adjust auto mode because, doesn't even help. I have to add a PreToolUse hook to stop that.
maddie0 16 days ago [-]
Yeah. Boris, you and Anthropic need to stop pretending "just trust me bro" is a security architecture. It's a self-aggrandizement architecture.
Claude will have auto mode turned on whenever she's locked down on a meticulously isolated machine, with carefully managed proxies that I control deciding (and logging) which agent with which access patterns is allowed to access which resources, locally and on the network. Anything else is malpractice.
My opinions do not represent those of my erstwhile employer NVIDIA Corporation.
vasco 16 days ago [-]
Why would what you write in a random comment section represent anyone else? Are you that afraid of lawsuits you can't even comment online?
exe34 16 days ago [-]
Corporstions will use anything they can against you, either for profit or someone's ego.
vasco 16 days ago [-]
Next tell me why it's important to write "I'm not a lawyer" as well won't you.
exe34 16 days ago [-]
It's to help people realise that your advice might be wrong and they won't have any recourse against you for reparations - but in many jurisdictions, it's actually illegal to give legal advice if you're not registered e.g. regarding immigration.
xstas1 16 days ago [-]
> dependent on Claude to do literally anything.
That's a feature not a bug
troyshoemaker1 7 days ago [-]
[flagged]
80fj0348i 17 days ago [-]
I and other colleagues have been struggling with auto mode refusing perfectly safe commands in our environment, so we frequently find ourselves switching to the other modes to handhold Claude Code into perfectly safe things like triggering deterministic and guardrailed CI/CD pipelines or read-only queries of production data. Auto mode seems overtuned for caution around deployment and production, which is a regression from how useful Claude Code was for operations around June/July. Until that's improved, permission rules are incredibly important to our workflows.
bcherny 17 days ago [-]
Yeah, by default we err on the side of caution. That said, the auto mode classifier is fully customizable based on your team’s usage. Two ways to tune it:
1. After a command is blocked, run /permissions to retry and allow it going forward
We are working on making these easier and more automated.
kay_o 17 days ago [-]
For some reason claude code hates using the read/write/grep tools and defaults to complex sed, awk, grep Bash:* runs which results in always consistently ignoring auto mode due to the classifier not knowing what to do with a 10-line long bash pipe instead of a read + pre/post read and write hooks being ignored and not firing, what is up with that?
awfulneutral 16 days ago [-]
I don't understand this either, it makes commands really hard to parse. It seems like 90% of what claude does could be going through some mcp tool that could be easily sandboxed instead of bash gibberish.
kay_o 16 days ago [-]
If it was human approval ? Read("./file.name") then Bash("docker compose run unit-tests"), sure, I can read that fine !
As I was reading your post I got another approval request that auto-mode did not understand. It was a single Bash call !!23!! lines tall on a retina mac display with six different variables. If anything this is the cause of approval fatigue and auto mode does nothing helpful when this is every call. I also have in my claude.md and global instructions to use tool calls rather than bash grep/cat/find, which are disregarded.
awfulneutral 16 days ago [-]
Yeah I agree, I didn't used to feel approval fatigue but lately the huge bash chains are giving it to me. I haven't even tried auto mode. I'm just sure it has some definition of "safe" that does not align with my own.
kay_o 16 days ago [-]
I'm not sure when claude started preferring huge bash chains but auto mode tends to decline most of them and drop to a permission prompt -- getting rid of the use of auto mode -- because it refuses to handle anything chained with expansions, variables or similar items
16 days ago [-]
dcrazy 16 days ago [-]
I use a hook to deny attempts to invoke `grep /` and `find /`, even as part of a complex pipeline.
awfulneutral 16 days ago [-]
I had claude write a hook to deny `find /`. It tested it thoroughly. Much later I learned that the hook denied `find /` but allowed everything else that existing permissions denied, like running whatever random python/bash code it wanted without asking.
written-beyond 17 days ago [-]
Auto mode really easily gaslights itself when it runs into a roadblock and starts deviating so far away from its intended goal that I don't let automode run without me reading what it's actually trying.
I frequently hit stop on and auto mode task to prevent it from completely flooding my context with some completely unrelated garbage.
Claude really should push away tasks that end up needing more exploration in worker contexts. That way the workers can maintain a sensible amount of context without pushing the main chat into the dumb region.
skeledrew 17 days ago [-]
You should note that auto-mode is handled by a different session (and likely model) from your actual. There's no road block or deviation or context flooding; all it does is monitor the model actually doing the work and block it from potentially problematic actions (which you can usually override by saying you explicitly give permission for X), nothing more.
bulder 16 days ago [-]
The context pollution happens when a denial triggers but the model still keeps attempting the harmful action via alternative avenues. It's got nothing to do with the auto-mode eval model's actual output.
skeledrew 16 days ago [-]
I have never seen that happen before. What I see is a mention that the classifier stopped it from doing X and it then asks for explicit permission or gives me the command to run myself.
bscannedinc 15 days ago [-]
[flagged]
rsynnott 16 days ago [-]
> perfectly safe things like triggering deterministic and guardrailed CI/CD pipelines or read-only queries of production data
I... question whether the second one is perfectly safe.
80fj0348i 16 days ago [-]
When the data in question has absolutely zero sensitive content or customer data and goes through a query CLI with guardrails against excessively large queries? Yeah that's fine.
LeBit 16 days ago [-]
I would never trust an agent in auto or even manual mode.
Agents should be seen as extremely smart developers that are for sure spies.
You put them in a prison within a prison and give them just what they need to accomplish their work.
uw_rob 16 days ago [-]
> I would never trust an agent in auto or even manual mode.
Perhaps Claude Code isn't the product you are looking for then? Anthropic offers Claude Managed Agents if you want to follow the prison within a prison model.
LeBit 16 days ago [-]
Not to be argumentative, but in what case would you not care and let an agent do whatever it wants when it is not isolated in a throwable vm?
uw_rob 16 days ago [-]
Not argumentative at all. I've spent the last 6 months working on these problems and built the original Agentic Identity solution at my large company this January. Getting Agents secure and scalable means a lot to me and I have some counter intuitive thoughts on it. Everyone has been working on this stuff though and there's tons of different opinions on the matter so I think all open discussion is good and healthy.
I think it's what are you trying to achieve, the risk vs. reward trade off for that, putting some thought into the aggravating vs. mitigating factors, and lastly doing some gut checks on if model improvement over time change the risk v reward calculus.
On paper "sandbox everything" sounds great but I haven't personally seen it work work in the general sense of "solving" Agent security. Agents need permissions to accomplish tasks. Putting them into a sandbox opens up difficult questions like "How do I provision a new identity which only has the capabilities which the tasks need" -- few systems and vendors have enough knobs needed for this -- and "If I give it access to the tools or permissions it needs can bad things happen regardless of the sandbox?". None of these have great answers with low friction. Once you factor in decision fatigue it gets worse as well.
I think if you accept that some risk is needed to accomplish meaningful tasks, that Agents are inherently statistically dangerous regardless of sandboxing, then you accept that you need statistically safety on your side. So in comes things like auto mode, system prompts which instruct some baseline behavior for your systems, being picky about model choice, and thinking about the pink elephant effect (Perhaps don't pass Haiku ambitious tasks which require unsupervised internet research and package installations while telling it at the same time to not hide its tracks if it makes an error).
The infra and identity layer is the real killer. Not all vendors and apps have as many knobs as you might like -- it would be amazing if everyone supported things like OAuth's Rich Authorization Requests. Apparently Anthropic heavily uses their cloud agents internally -- and that seems reasonable because they are all-in on it and have infinite tokens to rewrite software which doesn't work nicely there. Much harder as an individual or as a company that isn't a lab.
For me: I'm running with a mixture of both sandboxed and unsandboxed. My company has something like Claude Managed Agents internally but it isn't integrated with everything I need, cannot compile or run all of the internal stacks I work with, and doesn't have enough knobs to get the customization needed for success on my daily work.
Regardless, while my cloud agents are working away I also have things running on my machine as well for tasks which I want/need to be more hands on with. If my machine gets rm -rf'd I'll live. I dont have API keys on my machine -- everything is tokens which need to be refreshed daily. I use frontier models on high reasoning. Extremely destructive internal actions typically require step-up authentication and my Agent cannot do that itself. I have some common sense boundaries in my root AGENTS.md.
Looking around in at my company, as of a few months ago before a sandboxing solution was rolled out and before Claude shipped auto mode, around ~50% were running Claude in YOLO mode. Some large chunk of the remainder had blanket approval for "python3" and "curl" so even with manual approvals it wasn't really offering anything. Things were mostly fine -- the cases which were spread around for the dangers of agents weren't super meaningful -- examples being agents submitting bad data into a system or flipping dangerous feature flag. Frankly: Humans have done all of these as well and I think systems should validate input and feature flags should be automatically rolled back or be under step-up authorization before they change.
Could my local agents be put into a disposable sandbox? Yes but it doesn't get me much individually imho. I might put them into a more durable and reusable sandbox one day to run locally -- but until then I'm comfortable accepting the risks given my mitigating factors and the rewards I get when my 5-10 local Agents can "just do things".
barbariangrunge 15 days ago [-]
Good point depending on your workflow for giving it permissions within the sandbox. Does it need those permissions though? Can't it just ask you to do the provisioning via curl etc? Or do you have it automating your cloud infrastructure, jira, testing servers, and git etc so that you can't disconnect it any more?
uw_rob 15 days ago [-]
I’m having it automate everything more or less end to end. Most of my current work is coding, research, and very low stakes ops work. I’m not heavy into the infra side which I think has higher stakes for agent mistakes which are easy to make.
Just to give a sense of my usual flow: In a private Slack channel I’ll @ my agent with a task and a few pointers. It’ll research internally (Slack, Google, Private GitHub, Jira) for evidence and if things line up it’ll open a PR. I’ll review the PR and leave comments and my Agent gets a notification when comments come into its PRs. Once the PR is merged the agent will follow along with the deploy and get notifications on each step. If needed it’ll update the Jira, send a customer a ping in Slack to let them know it’s merged and deploying and for them to test it out, and if things go wrong and need to roll back based on alerts or logs it’ll escalate to me.
Individually I could approve each step and sandbox it but that would limit how many of these things I can get going in parallel. Things have been OK for at least 6 months now with this flow. I suspect I could scale up to even more parallel agents if I could get this flow off of my machine but I dont think I’d ever go back to approving each of the steps. It would have to be on a new machine primarily to get a new identity which is slightly less scary but again no way I’m approving things step by step again.
It’s definitely scary to start with but once you are cooking it’s great.
barbariangrunge 11 days ago [-]
Interesting. Thank you
caymanjim 16 days ago [-]
That's how I use Claude for everything, because ain't nobody got time for constraints.
16 days ago [-]
doginasuit 16 days ago [-]
That is some unsavory buck passing. Virtually anyone that didn't ask claude to create the project can leak passwords, with 1,122 known customers that have been impacted. Whether it is standard or not is irrelevant, it is part of existing functionality and entirely foreseeable. I'd expect any company worth the opportunity for trust to clearly own the mistake.
16 days ago [-]
thatsabadlook 16 days ago [-]
It's the anthropic way lol. "Working as designed"
Rapzid 16 days ago [-]
All issues have already been fixed.
No?
All issues will be fixed today.
No?
It's early days, the models will improve and fix all issues.
thatsabadlook 16 days ago [-]
We are:
at the point where agi has been achieved so if you haven't bought into it you must do so.
If you have bought it and have problems you aren't spending enough in it to fix them.
Then finally, if you did spend enough money, you really haven't, but the problems you have are not anthropics problems even when they are. Spend more money and do free advertising for the company anyways.
wyager 16 days ago [-]
Committing `.claude` is at least as dumb as committing `.keys`, so I don't think this is really in-scope
doginasuit 16 days ago [-]
If you know it's there. It gets created on the fly when it is needed, so unless you know that is possible and needs to be gitignored, it could easily slip by.
thenewnewguy 16 days ago [-]
Do you not review before committing/pushing?
DrewADesign 16 days ago [-]
Saying a professional software developer is responsible for not committing secrets is reasonable. That said, these tool chains all seem to condition developers to offload much of that diligence to the tooling itself, which makes catching mistakes harder because you’re not as used to scanning for them. Secrets files have always been foot guns, and with automation-borne complacence, and vibe coders that don’t understand the problem, I imagine these things will become even more common.
komali2 16 days ago [-]
[dead]
doginasuit 16 days ago [-]
This did not impact me. But if using a tool means that secrets can randomly appear in my project, then I am using the wrong tool.
ozozozd 16 days ago [-]
Correct stance.
Why would you use a tool that creates tedious and dangerous work for you?
“Oh you are just supposed to make up for Claude’s errors, and problem solved!”
SV_BubbleTime 16 days ago [-]
Oh no, I moved all that manual tedious boring loser mentality stuff to the agent. Now Claude does it for me, and no strangely enough Claude didn’t tell me there was a problem!
weird-eye-issue 16 days ago [-]
In these cases they probably just blindly committed everything themselves, if you asked Claude to review the uncommitted changes and do the commit itself it probably would have flagged this.
fwip 16 days ago [-]
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
What do you make of that part of the article?
weird-eye-issue 16 days ago [-]
Like I said in my comment that you replied to they likely flagged it and then the user just told it to continue anyways.
post-it 16 days ago [-]
It's gitignored by default.
TheRoque 16 days ago [-]
The default of who or what ? Git ignore is empty "by default", inexistant even
post-it 16 days ago [-]
When Claude generates the file, it also generates a .gitignore for it or fills in the existing one.
doginasuit 16 days ago [-]
If this is the intended behavior, a quick search of github and the article's findings seem to suggest it doesn't work.
SoftTalker 16 days ago [-]
So you just routinely commit everything in the project, without looking at what it is?
Gigachad 16 days ago [-]
My coworkers seem to
sothatsit 16 days ago [-]
It is only the .local files within .claude that can't be committed. We have .claude committed in multiple repos to include repo-specific skills/hooks/permissions.
ozozozd 16 days ago [-]
Hmm.
Dumb if you don’t turn on auto-mode, dumb if auto-mode commits .claude.
No way to hold it right I guess?
Hizonner 16 days ago [-]
If you have stuff in your tree that's not part of your project's code, you're already dumb.
If it's keys or secrets of any kind, you're even dumber.
If it's in a hidden directory, you are even dumber still.
If you rely on somebody stupid enough to do any of that not to commit it, you have gone beyond the valley of the ultra-dumb. Actually that's true even if you rely on smart people not to do it.
You got your dumb card fully punched when you created `.keys` to begin with.
queenkjuul 14 days ago [-]
Well we agree that Claude is an idiot for writing keys into the project tree, then
cerved 16 days ago [-]
Suggest adding it to ~/.config/git/ignore
and teach Claude to not git add .
While we're at it, maybe we can also discourage the spurious use of -f for rm -- me personal pet peave
wyager 16 days ago [-]
> and teach Claude to not git add .
It already doesn't do this. This is from users committing the `.claude` directory themselves.
cerved 15 days ago [-]
Idk about these days but it used to
hakanbogan 16 days ago [-]
I also use global ignore, but I think the key is to keep secrets out of commands. I store mine in .dev.vars, which Wrangler reads automatically. For production, I use wrangler secret put and enter them myself. I also told Claude to never read that file.
Otterly99 15 days ago [-]
Yeah, the HN post title is a bit misleading but the article is quite clear on that (although I'm sure many will be happy to gloss over this detail)
> Ask Claude Code to check a database or call an API, and the command it proposes carries the secret from your config file. It asks before running it. Pick "Yes, and don't ask again" and it saves that exact command, secret included, to .claude/settings.local.json inside the project folder. Nothing in the repo marks that file as private, so it gets committed with the rest of the code.
Why are these repos not gitignoring the .claude folder?
Although, I feel that it would make more sense to not have a .claude folder inside of the project to begin with. Instead use the ~/.claude/porject/<project_path> folder, like you do for the memory files to store anything related to the project. This solves the problem and at the same time is a cleaner architectural choice in my opinion.
16 days ago [-]
adastra22 16 days ago [-]
> Permission rules are old hat. Everyone should be using auto mode instead
Boris, this comes off as incredibly tone deaf. I don’t want to trust the machine. Trusting the machine is how we end up here. I want to specify exact, deterministic rules that are always followed.
tomrod 16 days ago [-]
Boris, love Claude code and similar harnesses. This is a modality problem. Set up a secure mode. The harness should manage the secrets injection at the tool level, and the agent should be sandboxed and never see them. The agent sees the manifest of available tools and are wired up and have enough instruction about how to use and how to set up. Similarly permissions should be scoped to opt in folders.
agentdev001 17 days ago [-]
I appreciate you getting communication out in front of this fast.
> "but we are looking into what we can do to prevent this"
I would presume that CC's auto-review of tool-call turns would already solve this >99% of the time, no? From my read, any harness-side deterministic solution here would be saving the user from themselves, which seems like a bad pattern. Somewhat dulling the scalpel in my mind.
bcherny 17 days ago [-]
There’s a few possible approaches: making sure auto mode catches this, building in basic secret scanning, a few other ideas. Going to prototype a few of these to understand the tradeoffs better before we ship something.
agentdev001 17 days ago [-]
I'm not a CC user myself, so I can't say that I have my head wrapped around exactly how the "yes + don't ask again" flow works. That said- from my (outsider) perspective, saving off the entire tool call [1] and its arguments is very weird. I would expect that the hit-rate following that for similar calls would be very small, which leads me to believe that the list either must be seeded into the auto-reviewer's context, or used in some other similarity-check engine for future calls.
If we've already crossed the bridge to being confident in a non-deterministic reviewer for auto-mode, then, I see no obvious reason as to why we couldn't have the proposed rules be generated by a model. If that were reality, then- all rules placed in settings.local could be secretless, with the confidence of whatever model we tell 'make sure the rule does not contain secret material, consider its destination as potentially public'.
If a given action requires a secret, and you'd like that action to be repeated in the future, how do you expect it to work without said secret included in the save (and without being entangled in secrets management tools)?
agentdev001 16 days ago [-]
Yea good point- constraint of no secrets management tooling kinda makes this impossible. Ideally no action requires a secret in plain text. It would be neat if the harness could bundle its own secret manager, and requests for secrets ("hey I need this api token") are out of band, and placed in the store out of sight of the agent.
Otherwise you need a broker that can verify chain of trust for the workload, but that's significantly more complexity if you're pitching a harness/app.
16 days ago [-]
edg5000 16 days ago [-]
Offtopic: The new fullscreen renderer is a nice change. It fixes some issues inherent to rewriting terminal history that the non-fullscreen mode relied on. This is a very welcome improvement. Although I should probably switch to the Claude GUI app anyway. It probably has all features from Claude Code by now.
BikiniPrince 16 days ago [-]
Which is odd because my agents are hyper aware of scrubbing. It even caught data from the database migration that wasn’t scrubbed correctly even in a private repo. Dozens of data segments are stored locally and I’m warned when I slip up in commits. Something made mine hyper aware of security.
justinclift 16 days ago [-]
> Everyone should be using auto mode instead. It is safer [...]
This is bullshit.
I'm one of the people who actually reads the commands, and it doesn't always get stuff right. Please don't delude yourself into thinking "auto mode" is some magic that's the right fit for everyone and every situation.
nikolay 16 days ago [-]
GitHub charges an arm and a leg for this service. Before, they would take request to delete committed secrets, now they simply refuse, because they want to force you to buy the overpriced Advanced Security.
16 days ago [-]
OtomotO 16 days ago [-]
> Everyone should be using auto mode instead. It is safer and ...
Okay, sorry, I am out. It's too beautiful a day to have silly arguments.
toppa33 16 days ago [-]
A bit careless but mostly a bad default. One click shouldn't put passwords in files people commit. Anthropic should fix it.
lwowowx 16 days ago [-]
Isn’t the simple answer shipping a local secret manager with Claude code?
bscannedinc 15 days ago [-]
[flagged]
bobthegoggles 16 days ago [-]
Wouldn’t it make more sense to put in the user app data directory?
j45 16 days ago [-]
Can secret scanning be enabled by default?
sudondream 16 days ago [-]
Great advice, hope it gets to more people
stogot 16 days ago [-]
$19/user/month for secret scrubbing? What a rip off
It doesn’t matter if they should stay local, day 1 security best practices say you don’t write secrets to files, ever - especially without you even knowing!
This is such a typical blame the user response. You realize if I’m a sysadmin managing fleets of machines, this is an actual wake up in a cold sweat nightmare, even if those files never leave disk? In the past it was less a big deal, way bigger now that your machine god will just download packages and libs that have upstream malware that aggressively scans the file system for stuff like this. guess where it’s going to look first?
have more humility. jesus.
bmitc 16 days ago [-]
> day 1 security best practices say you don’t write secrets to files
If only tools, including major ones, actually did that. Plenty of the biggest package managers in the world still write API keys in plain text to files. uv and npm are two of them.
JohnMakin 16 days ago [-]
and we can disable those for better alternatives. npm executes arbitrary code based on what the package said, obviously bad
claude unleashed on an organization is a whole other beast.
Creamsicle47 16 days ago [-]
Coding is solved. Bugs not solved yet. Fix incoming
Uptrenda 16 days ago [-]
You guys need a pr team. All the communicate from anthropic seems to screw itself somehow...
ThePowerOfFuet 16 days ago [-]
> 2. Permission rules are old hat. Everyone should be using auto mode instead. It is safer
Instead of telling people they're holding it wrong, make it safe to be held however they could hold it.
sensanaty 16 days ago [-]
> but we are looking into what we can do to prevent this.
Wait, I'm confused. You said yourself coding was solved, surely all you need to do is ask your AI God to come up with an idea, right?
rsynnott 16 days ago [-]
Shouldn't even need to ask; the Basilisk should simply realise the problem by itself.
antonvs 12 days ago [-]
> Permission rules are old hat. Everyone should be using auto mode instead.
You should be careful about trying to dictate what your customers are doing. They may understand security, and PR for that matter, better than you do. The current evidence makes that certain in many cases.
01CPMD3174 16 days ago [-]
01CPMD3174 former Claude Code customer here.
I’m wondering if it’s just me or does this response sound like it’s coming from someone who is out of touch with the reality of how people are using their product and instead of being empathetic, curious, and helpful is telling people in so many words it’s not our fault, you’re doing it wrong and “everyone” should be doing it the “right” way, which is how we do it.
I know it might come as a shock but not everyone who uses product has read the docs.
Also there is arguably nothing about using AI harnesses that’s “old hat” The technology came on the mainstream radar this year. Most people who use harnesses are still figuring out how to use them. And the rest of humanity probably doesn’t even know what the terms means.
Rather than telling everyone how they got it wrong, maybe next time you can elaborate on something like what “we are looking into what we can do to prevent this” means.
For the record, besides finding Claude overzealous and Anthropic’s usage limits relatively stingy (at least back in April when I dropped them), it was the arrogance of Anthropic’s staff and their public pontificating that led me to rolling with Codex, Gemini, and Qwen as my model stack.
You have to wonder how much of the AI backlash is driven by people not feeling how industry insiders communicate with them.
Anyways, we need good homegrown AI solutions. So, I’m hoping Anthropic follows through on helping prevent future incidents. And the other labs are paying attention so their leadership aren’t the next ones on HN playing defense when their products get called out.
de-moray 16 days ago [-]
Auto mode should be used by default? Is this the same mode that led to the Anthropic article discussing unintended model actions?
I guess "you're holding it wrong" is a PR strategy now.
EugeneOZ 16 days ago [-]
> Permission rules are old hat. Everyone should be using auto mode instead
"you are holding it wrong". No, it's not an excuse. Every mode should work correctly, or should not be selectable.
Hizonner 16 days ago [-]
> .claude/settings.local.json is meant to stay local. This is not a file you should check into source control.
Then don't put it in the fucking tree, you idiots.
No, .gitignore is obviously not enough.
dools 16 days ago [-]
So ... coding is solved but managing your git repo is not solved?
ykurtov 16 days ago [-]
Aren’t you guys going to be one of the only two software developers employees in the nearest future?
And autogenerate all software?
Then you can have it your way :))
knockoff 16 days ago [-]
Can we take your responses here to represent your employer's position on this issue?
jacquesm 16 days ago [-]
No, they're just an agent of their employer, the employer is responsible.
pastel8739 16 days ago [-]
Boris is the "Head of Claude Code", so I think we can do so, yes
8note 16 days ago [-]
do you have a count on how many times claude has committed that file?
i bet most of the commited ones were done by claude because nobody else us gonna care to make it
pastel8739 16 days ago [-]
> Claude Code reads settings from four files, and an organization can also deliver managed settings from the claude.ai console. Each source has a scope: the set of people and projects a setting saved in it applies to, whether that’s only you, everyone in a project, or everyone in your organization.
The linked docs have an unmistakable slop aura, with the extreme overuse of commas that recent models seem to love. I don't blame people for not referring to them (also because, you know, the whole thing with AI is not having to read, think, or understand for yourself)
16 days ago [-]
an0malous 16 days ago [-]
I don’t care how good you guys say auto mode is, I’m not giving your AI full permissions to my machine and the more you try to force AI psychosis onto me the closer I am to moving to something else.
elzbardico 16 days ago [-]
Man. I'd prefer talking to Claude. He wrote the code.
prmph 16 days ago [-]
> Permission rules are old hat. Everyone should be using auto mode instead. It is safer and also does not require manually maintaining finicky allow/deny lists. Auto mode is enabled by default and is included for free in all plans.
More and more it seems we are being prescribed a particular way to use Claude Code: move fast, break things, do not look at the edits, etc. Basically, Claude Code is designed for vibe-coding.
I hate this, and I suspect a lot of devs do too. I use the TUI, and believe it or not, I like to review every edit or change before Claude makes it. I used to allow auto mode and don't ask again sometimes in the past, but now almost never do. The number of incredibly nonsensical things I catch Claude trying to do sometime just reinforced my commitment to this way of working.
So now this idea that permissions are old hat and auto mode is the way to go rubs me the wrong way, very much. And here are a litany of other ways Claude Code TUI is making it hard for me to work:
1. Scroll-back glitches, too numerous to enumerate. Suffice it to say I rely on it a lot, to refer back to something the agent said before, to review the general progression of the session, etc, etc. And it barely works now: missing/overwritten conversation text, messages that have inexplicably disappeared; even sometimes the agent own last response is garbled or hidden or overwritten by some previous message that keeps floating on top.
2. I use iTerm2 on macOS, and frequently use split panes. Whenever change the width of a pane, Claude Code messes up the conversation text so that is often unreadable, and nothing I do will restore it.
3. As other sibling comments have noted, the current preference of Claude to use incomprehensible scripts for editing files is off-putting and a hindrance to being in control of my work. I have resorted to using the permissions setting to ban it from using Go, Perl, Python, and sed (for in pace editing), etc, to cope with this.
4. Even basic text editing is messed up in Claude Code TUI. I used to be able to navigate around lines effectively by using up/down keys; this was removed, which has significantly impacted by work. I cannot disable copying on selection, which I don;t want, because if I disable it, the copying does not work at all, etc
At this point, due to all the impediments Claude Code places to my style of working, the only reasonable conclusion I can reach is: I am supposed to be vibe coding, letting the agents loose to vomit out massive amounts of slop. But if vibe coding of the Claude Code TUI itself is producing such garbage, why should anyone be convinced that it is a good thing?
I will never let Claude Code loose to do its thing; I will not surrender my control to it, no matter how much many times I hear I no longer need to look at code.
I don't mind. I put it out there for everyone to borrow ideas from it. There's documentation too.
While you're at it, please bring Claude Code up to par in Windows with the OS level sandboxing (Job Objects, AppContainer).
There are actually many things you can (and I think should) be doing.
proxyscore 16 days ago [-]
Yeah Boris, if Dario let's you communicate here, it'd help with credibility if the English level would be perfect, it's "it's an old hat", I dgaf if people will hang me for this, I think I am right. My hill and all that.
And to recommend auto made to devs is absolutely crazy.
Have a nice day
cannonpalms 16 days ago [-]
I disagree. "Old hat" here is an adjective meaning old-fashioned, not a noun requiring an article.
mococa 17 days ago [-]
[flagged]
dang 17 days ago [-]
Please make your substantive points thoughtfully and don't cross into name-calling and haranguing.
When knowledgeable people show up to address concerns on HN, that's good for all of us. We don't need you to like or agree with what they say, but we do need you to follow HN's guidelines.
Threads like this can easily turn into mob dynamics—it has happened before—and when they do, that's bad for all of us.
Confusing headline. They scanned for repos where people had committed their .claude/ folder and local settings and then scanned those files for commands which contained keys or passwords.
So pressing “Don’t Ask Again” by itself doesn’t expose passwords by itself. If you commit your local Claude settings and in those settings you have manually approved commands containing secrets directly in the command and then you publish the repo, that’s exposed.
17 days ago [-]
17 days ago [-]
shmulc 17 days ago [-]
That's the chain, yes. The part people don't expect: the file is created inside the project, and Claude Code only adds it to your global git ignore, not the repo's .gitignore. So a fresh clone or a second machine commits it like any other file. In 539 of the 1,105 repos we traced, a commit co-authored by Claude itself changed the file.
Aurornis 16 days ago [-]
> the file is created inside the project, and Claude Code only adds it to your global git ignore, not the repo's .gitignore. So a fresh clone or a second machine commits it like any other file
A fresh clone wouldn’t have the file. This claim doesn't make any sense.
The only way I can see this getting committed is if someone edited their global .gitignore or, more likely, did a whole directory transfer to do a different machine to work on.
shmulc 16 days ago [-]
Fair, “fresh clone” was wrong. It happens on a new machine or container without the global ignore, in a copied project folder, or once the file has been committed, since ignore rules don’t apply to tracked files.
CrimsonRain 16 days ago [-]
Why are you copying instead of git clone?
hathawsh 16 days ago [-]
The new wave of git users (coming from AI) don't know what git is.
yubblegum 16 days ago [-]
I wonder how many of this type are 'senior/principle software engineers' employed by our AI vendor overlords. This situation is the inevitable result of vocal VCs (ahem) poo pooing "age" and "experience" and promoting youth as a 'requirement' starting in the '00s, coupled with these same VCs now attempting to hijack an entire industry to run on their obviously immature and buggy and frankly possibly dangerous products.
The silver lining in all this is all of us very experienced "ancient" software practitioners will likely be in demand again. In a sane world, of course.
rendaw 16 days ago [-]
In that case what relevance does the gitignore file have at all?
kccqzy 17 days ago [-]
That doesn’t make sense. I use my own global git ignore all the time because there are files that only I produce that I definitely don’t want committed (flycheck looking at you). A fresh clone wouldn’t contain these files because they are not committed in the first place. You will have to use a non-git transport mechanism to transfer the repo without also transferring your global git ignore.
Anyways this probably indicates that these repos don’t have a good code review process. The settings.local.json file name screams it’s local and shouldn’t be committed.
pastel8739 16 days ago [-]
They're probably mostly just random solo people who barely even know what git is. This---that people who don't know how to code can code now--is the whole thing that AI companies love to advertise, and it's true. But it also means that tools need to stop people from doing stupid things, because they won't know that the things they are doing are stupid.
cassianoleal 17 days ago [-]
It's a disgrace that the parent comment was flagged. My vouching has undone that but it's likely to be flagged again.
nightpool 16 days ago [-]
It's fully AI generated. Please don't vouch for comments that don't have human input, it's against the rules:
> Don't post generated text or AI-edited text. HN is for conversation between humans.
Also, it's wrong. Many people have since replied pointing out the basic error it made
_cs2017_ 16 days ago [-]
The author of this comment is also the one who submitted and authored the article being discussed.
No matter whether it's AI generated (I can't tell) or correct (it's not), it makes no sense to flag the response by the author.
cassianoleal 16 days ago [-]
> It's fully AI generated
How have you determined that?
Furthermore, I have also noticed the error. I can still see it happening. Sandboxed agent, no access to global git ignore. Creates a new one after putting the secret in `.claude`. Same developer, same machine, fresh sandbox. No access to the original sandbox's global gitignore. Secret already on the project. Commit and push. Secret leaked.
Aurornis 17 days ago [-]
All of their comments were auto flagged from the moment they were posted. Must have triggered an LLM detector or spam detector.
kragen 16 days ago [-]
It's AI slop. If what it says is actually true, hopefully a human will post it.
aadilghani 16 days ago [-]
[flagged]
tsergiu 16 days ago [-]
I'm super paranoid about the level of access AI agents have. At the same time, I want them to take away the tedium of a bunch of tasks I'm required to do, and it sucks to have to micromanage them.
The best solution I've been able to come up is using an ephemeral vm (on an isolated network) per task, using --dangerously-skip-permissions so it doesn't bother me. I couple that with an API proxy that lets me restrict the permissions it has to external services. So e.g. where a quickbooks API key gives the holder "god mode" access, the proxy lets the agent do certain read commands without confirmation, but all write endpoints except uploading receipts require confirmation on my phone before they'll be allowed to hit the quickbooks servers. I no longer need to trust that the agent will interpret my readonly wishes correctly.
Tooting my own horn here, but this setup works incredibly well! I've been able to connect dozens of services safely where I absolutely do not trust giving raw, overpowered credentials or oauth integration to the agent directly. I actually just released the API proxy today at https://keycontain.com
zahlman 16 days ago [-]
> At the same time, I want them to take away the tedium of a bunch of tasks I'm required to do, and it sucks to have to micromanage them.
Consider reframing. Is the problem really that the task is tedious? Or that it's required? Maybe you should be leaning more on deterministic automations (which the LLM can help set up) rather than LLM-powered ones.
tsergiu 16 days ago [-]
Of course, if it's possible to use deterministic automation, I ask it to set up scripts. But in a lot of cases the task is not deterministic. And even when it is, I still need to safely deal with the credentials. Examples of some tasks I use it for:
- Research and buy me a domain name for xyz product, set up all of its DNS the way I want for this product, set up email, set up app store submissions including screenshots and description, set up firebase notifications, set up my Google cloud project and any apis I need to enable for this app, deal with app store review feedback.
- Do an audit of my books, make sure every transaction has a receipt uploaded, and make sure the receipt matches the journal entry. Pull statements from all my my bank accounts and reconcile against my books. Fix mistaken transactions with my confirmation.
- Freely push to my source control, but only to specific branch prefixes (surprised that GitHub, gitlab, gitea, etc don't have this built in already). Merge with my confirmation.
- Freely read the subject lines in my Gmail and full emails from my accountant, freely search emails (but still can't read them), freely compose drafts, ask me to read full emails other than my accountant's, ask me to send drafts. No way for it to read password reset links, for example.
Not to mention that I only have to have a single key that gives access to all my services. If the key leaks, I just have to rotate one key because the agent never has access to the 30 upstream service keys. If I need to give weaker or stronger keys for a specific agent, I can easily configure that in one place (and I can even request that the agent make that change for me with my confirmation). I don't need to create 20 new keys every time, and I don't need to remember the intricacies of every upstream service's UI for creating new keys.
Edit: forgot to mention one more really convenient thing the API proxy enables: I can ask my agent to just configure things for me e.g. changing CI settings, adding Google workspace users or groups, etc. without having to use the to UI. So now nearly all of the admin configuration for all services is done from a single interface (my agent cli)
lelandfe 16 days ago [-]
I'm skeptical of how "super paranoid" you actually are. This doesn't sound super paranoid.
For instance: that's a ton of surface area. Did you have your AI agent decide which endpoint is destructive or did you manually do this?
For instance: has this classification been wrong?
I ask this because I've used a similar thing before and it failed in the ways I've named.
This setup also permits your agent to exfiltrate enormously sensitive data (website gives the example of QuickBooks invoices and Cloudflare config) without your involvement.
tsergiu 16 days ago [-]
The agent doesn't decide which endpoints are destructive, you do. That's the point. It's not allowed to do anything that you don't explicitly grant permission for.
And yes, it has tried to make bad requests! Which it wasn't able to do because it was either rejected outright or asked me for confirmation and I didn't let it through.
The "surface area" you're talking about is just the coverage of the service APIs, which is there just as a nicety to give a semantic preview of what the request is about to do e.g. we know what a gmail request looks like so we can render a preview of the attachment the agent is sending so you can inspect it. Otherwise you'd have to inspect each http request (which you can always do by using the generic http acl).
I somewhat agree with "exfiltrate enormously sensitive data". The thing I'm paranoid about is catastrophic mistakes that can instantly kill the business e.g. "Oops I sold the domain name". Leaking financials is not great, but also not catastrophic. Deleting all our books would be catastrophic, which the underlying QuickBooks key allows you to do!
But in any case, you can choose your level of paranoia and give exactly the amount of access you're comfortable with. For example, I view read access to emails as catastrophic (must worse than read access to financials), so I don't let it do that.
lacoolj 17 days ago [-]
This page is like 80% repeating itself
If you post output from AI, please remember to edit before publishing
nicce 17 days ago [-]
If the thing is not worth writing by yourself, then it is probably not worth of reading by any humans.
solyin 16 days ago [-]
[flagged]
Paracompact 16 days ago [-]
I've seen you posting about "stoichastic human-parrots" in multiple threads now, so I think you deserve to know it's spelled "stochastic."
solyin 16 days ago [-]
Haha thanks! Now to retrain my auto-correct.
cobbzilla 16 days ago [-]
others have said: “Don’t be a meat proxy”
so your question is “What’s it like to be a meat proxy?” which might be taken as trolling
wiml 16 days ago [-]
I think solyin is trying to imply that the anti-AI sentiment is as formulaic as any hopped-up markov chain. So perhaps a better way of rephrasing their question is "What's it like to be meat?"
NooneAtAll5 17 days ago [-]
don't edit Ai garbage - make Ai your editor that points out mistakes instead
zahlman 16 days ago [-]
I assume here you mean "editor" in the traditional sense of someone who draws red lines on your printed draft, rather than a tool you use to make the changes directly... ?
vips7L 16 days ago [-]
Don’t use LLMs.
DaSHacka 16 days ago [-]
I'll do you one better, don't use computers.
vips7L 16 days ago [-]
Computers were a mistake tbh.
hedora 16 days ago [-]
Exactly. We can all agree the LLM should use computers for us.
No editing required.
/s because humans probably need it.
eviks 16 days ago [-]
Why would you "remember" to edit when you explicitly resorted to AI not to do any of that?
tim-projects 16 days ago [-]
Here is how to solve this:
Use a private dev repo and do all your dev inside it.
Releases go to a seperate public repo
In the private dev repo use a script which Cherry picks release files from a whitelist that you maintain in the public repo.
Essentially, you define the files and folder structure of a release and that ensures every release looks great with no cruft and it's never going to have .secret.json in or whatever
Hardcoded secrets is seperate and you can have another script to grep for those
yevpats 4 days ago [-]
I think running claude code in the terminal is basically the mainframe era where everyone shared the same OS, which wasn't a good security but that what we had. and the solution to that is for each agent to run with its own identity, permissions and environment - so doing a bit of self-promotion but wrote about it here - https://kosem.ai/blog/introducing-kosem-agents-with-identity...
binarymax 17 days ago [-]
I keep all my creds in a password manager (1Password in my case) and Claude can’t see them - when a cred is needed it runs a script that calls the op CLI and I tap my fingerprint for access. Sometimes I need to do it a bunch of times for complex operations, but it’s worth it.
oefrha 16 days ago [-]
I refuse to use op cli because of the absolutely bunkers security model that’s a wontfix:
Risk of exposing a single credential is nothing compared to the risk of exposing everything through op cli’s expected behavior. Has there been any improvement on this?
binarymax 16 days ago [-]
I read up and that vuln and it’s not the behavior I see. Any read operation to any key in any vault requires auth. Even if the vault is “open” it still asks me every time.
oefrha 15 days ago [-]
This is false, I just ran my own thorough reproduction script on macOS with latest 1Password app and op cli. Approve a prompt once in a shell session, and all subsequent read attempts of any other secret in that vault from the same shell session (including from subprocesses) don’t result in additional prompts within the time threshold. It’s not at all granular.
chamomeal 16 days ago [-]
I think I remember a Bitwarden CLI supply chain vulnerability a few months ago?
This seems like a gh issue as well as Claude abusing it. Why should I be able to get the token for GitHub through this call without further authorization?
ivan_gammel 16 days ago [-]
This may not be a popular answer here, but it works as expected. Basic security hygiene means that you use password manager CLI, SSH agent, at worst temporary git-ignored env files, so that the secrets would never appear in the command line and you would never pass them to Claude.
And you git-ignore any local settings by default, to prevent accidental leaks. It is not hard thing to learn, many juniors I interviewed know this. Developers who like to shoot themselves in the legs should pay the price. People who hire careless workers and do not put them in compliant environment should pay the price too.
trevorogina254 13 days ago [-]
One habit that avoids most of this: never put the literal secret on the command line in the first place. "Don't ask again" stores a rule built from the command it saw, so if the agent ran `curl -H "Authorization: Bearer sk-..."`, the token is now in your settings file. If it ran `curl -H "Authorization: Bearer $OPENAI_API_KEY"`, what gets stored is the variable name.
Belt and braces on top of that:
- add .claude/settings.local.json to a global gitignore (git config --global core.excludesFile), not just the repo's, so a fresh clone or `git add .` can't pick it up
- run a secret scanner like gitleaks as a pre-commit hook; it catches this and the classic .env commit
- if you find a hit, rotate first and clean history second. Once it's been public, deleting the file doesn't un-leak it.
thierryzoller 16 days ago [-]
Was reported as BUG on Dec 5, 2025 to Anthropic and automaticaly closed.
The root issue is not the button, it is that the allowlist stores the full command string, including whatever was in it. We ran into this ourselves: approve `curl -H "Authorization: Bearer sk-..."` once and that token sits in settings.local.json until someone happens to reread the file.
Two rules that stuck for us: secrets go into commands only via env vars ($TOKEN, never the value), and .claude/ lives in the machine-wide global gitignore, not in the repo. With those, "Don't ask again" is fine and a commit has nothing to leak.
jaktet 16 days ago [-]
I always thought Kiro did a better job with permission prompts and falls more in line with what I set up except for I manage permissions on the host.
I'm sure there's improvements to make but I always found it silly to over complicate the permissions if I'm trying to prevent common operations from being prevented
0xbadcafebee 16 days ago [-]
The first extension I add to any coding agent is one that redacts or rejects any read/write of a secret or credential or credential file. It's annoying, and the agent can work around it, but better to add a weak guardrail than none at all. Best is to not give it access to any secrets, but that's not always possible.
I have not gotten into agentic workflows, although I use AI regularly the “old school” way, conversing with a single LLM and having it do things for me. I’m more of an analyst/theorist than a developer, so maybe I don’t understand the temptation, but the idea of giving an LLM any sort of secret never even occurred to me as something that one might do on purpose.
11 days ago [-]
ohyes 16 days ago [-]
This doesn’t seem like the right way to use secrets with an AI agent, in general.
I always have it write a script and then write the secret to a different file myself, then instruct the agent to use the secret file in the script. That way the secret never goes through an external entity.
I had thought this was common sense but now I’m realizing of course it isn’t, we have people with minimal experience using these tools and they don’t even consider that sending their bank password (or whatever) to a third party (even a relatively trustworthy one) is extremely risky.
dichev 15 days ago [-]
btw that works as long as the agent never opens the file. If it "cat" it to see why the script fails, the value goes to the API with that turn and also lands in the session transcript log
you might point gitleaks at it: gitleaks dir ~/.claude/projects
ohyes 11 days ago [-]
Thanks for the tip
vektormemory 15 days ago [-]
We created a drop-in skill file to check for any leaks; we already use this on every SDK deployment and added a few new checks based on the articles info, if you have any suggestions/improvements, reach out to us here.
We released a free Secret Hygiene Skill, Node and git only and nothing sent anywhere, that checks your project, built npm package and machine for them, never prints a secret, and tells you what to rotate first: vektormemory.com/downloads.
qezz 17 days ago [-]
> Is it public?
>
> Search your GitHub organization for .claude/settings.local.json and .claude/settings.json. Each hit is a file anyone can read right now.
So, it's not necessarily "public", it's simply in the repository, and whether it's actually public or not depends on the repository settings.
Or am I missing something
mschuster91 17 days ago [-]
> So, it's not necessarily "public", it's simply in the repository, and whether it's actually public or not depends on the repository settings.
Even then, you might not want every developer in your company to have the password to the production SQL database...
ivan_gammel 16 days ago [-]
Not a single developer should use or operate on production database. First of all, your code should be tested well enough not to ever need that for debug, and your user interface should offer enough to manipulate the data.
Second, if you will ever need to see the db, have an automated process with break-glass account to get a snapshot.
shmulc 17 days ago [-]
Thanks, fair point. Our 1,122 files are all in public repos. In a private repo, only people with access can read it, but "don't ask again" still writes the password into a project file that gets committed, so it spreads with every clone and fork, and goes public if the repo does.
theapiartist 16 days ago [-]
This could easily be prevented with credential management tools built specifically for ai agents.
Tools like AgentSecrets, infiscal, Doppler. People just don't want to invest in securing their credentials, maybe because the majority don't realize that credentials are the crux of inter software communication. It's literally access to your services.
tomrod 16 days ago [-]
More and more, I want a hard sandbox on these. For those of a similar security mindset, how are you sandboxing?
This is an issue because it is popular, not because it is novel.
Review your code before committing. Do code reviews on PRs.
torlok 16 days ago [-]
Mind boggling that supposed professionals in this thread will blame Claude and suggest a 100 different third party tools instead of reviewing code committed to a public repository.
ivan_gammel 16 days ago [-]
There’s one (wrong) reason to suggest that: the developers are just another trust layer between business objectives and business users, and there are affected third parties who do not have a say on how their data is processed. To protect the latter we have to consider how to minimize the risks along the supply chain, including how to reduce the damage from vibe coders. Why the answer is wrong? If safe path exists, the tooling should not be responsible or accountable, but tooling vendors can opt in to improve public safety. In this case safe path exists, Anthropic does reasonably good job to steer to it.
0x264 16 days ago [-]
Vibe coders don't review code, even if and when published to a public repo.
zahlman 16 days ago [-]
I feel like pointing out, there are quite a few sorts of projects that can be developed without requiring any secrets (at least until publishing time, and that's something you really don't need an LLM to do for you once the process is established).
saidnooneever 16 days ago [-]
please dont forget basic operational security when using LLMs. they dont do everything for you. you can ask them to do all sorts of stuff, that doesnt mean you should.
secrets, encryption, publishing to public internet, scanning for vulnerabilities in your packages etc. etc. you need to take your own responsibility for and never rely on some bot automation or third party.
that includes if its important projects not relying on scanning tools but opening files yourself and verifying what's in there.
read things before you put them in a place where everyone can see them forever....
this is basic stuff. you guys did it beforen LLMs surely.
YOU are responsible. not Claude, not any external vendor, not any downloaded script. You as a person.
citrin_ru 16 days ago [-]
The problem is LLMs marketed as a replacement for professionals (who know something about OpSec among other stuff). Internet is full of stories about apps vibecoded by people without IT background. They would not even understand what’s the problem here, for them it’s all magic.
Sandbox don’t scale anymore and secrets or confidential files shouldn’t be exposed to frontier models.
vcryan 16 days ago [-]
This is also an example of how someone's personal settings don't belong in a source code repo at all.
I find it pretty annoying when someone commits their harness specific files into a repo - put that stuff under $HOME/.claude/
zahlman 16 days ago [-]
To be fair, things like AGENTS.md aren't supposed to contain secrets, and are helpful to publish for OSS developers who want agentically-written third-party contributions to follow certain rules.
ivan_gammel 16 days ago [-]
it depends. Sharing AGENTS.md and skills is a common thing binding all harnesses to project conventions and processes. In my org for example this enforces security review, certain level and type of test coverage, documentation conventions etc.
16 days ago [-]
skeledrew 17 days ago [-]
According to Claude docs, settings.local.json isn't to be committed. This is just people being the usual sloppy with secrets in repos, not something particular to Claude or AI in general.
sick_of_slop 16 days ago [-]
[dead]
dools 16 days ago [-]
But the whole point of Claude Code is that software production is a solved problem accessible to anyone.
skeledrew 15 days ago [-]
Idk where people get that from. Having word processors with auto-correct, dictionary and all the other plugins accessible to everyone never solved the writing problem. Why would Claude Code solve software production?
My comment is somewhat tongue in cheek: I know that Claude Code (and AI agents generally) do not mean the end of software engineering altogether, because I have been creating code with AI for a year, written a coding harness, and have non-coder colleagues who use said harness to create software.
But "where people get that from" is precisely from the same guy who is now saying "oh well, if you're going to commit your passwords then well!! you should know better than that!!"
skeledrew 15 days ago [-]
That link doesn't say anything about Cherny saying software production being solved. It says he said coding is mostly solved. As in it's increasingly easier to generate working code. But coding is neither the beginning nor the end of software production; there is quite a bit more to the thing, from requirements gathering and scoping to thoroughly testing a release to ensure it meets said requirements from the users' perspective.
dools 15 days ago [-]
From the same interview:
"I think by the end of the year, everyone is going to be a product manager, and everyone codes. The title software engineer is going to start to go away"
Or this:
"Someone has to prompt the Claudes, talk to customers, coordinate with other teams, decide what to build next"
He doesn't mention "configure the git repository so we don't accidentally publish our passwords". That would sound WAY less impressive.
Dario has gone out and said that AI will cause mass unemployment. He said that AI could do 50% of jobs within 1 - 5 years.
OpenAI are much less flagrant with this shit but Anthropic have been banging the drum that their coding agents can fully replace workers for ages, at every available opportunity, and then something as fucking fundamental as publishing passwords shows up and he's all like "Oh well, you shouldn't do that should you that's obvious!!".
It's massive bullshit artistry.
skeledrew 15 days ago [-]
It seems to me you're confusing things again. A lot depends on company size and structure, but - given a reasonably sized enterprise - for the most part a software engineer takes specs and writes code meeting those specs from the dev perspective, then QA tests the release from the user perspective, and devops actually publishes the release to wherever. Of course the smaller an enterprise is, the more roles a single person will have.
But something like fully configuring a git repo isn't really the concern of a software engineer, per se; their concern is to create code that works, and git is just something to help with managing and passing on their creation. It's the one with the devops role who's really responsible for publication aspects (of course the same person may be doing both creation and publication) and should be ensuring repos don't have things committed which shouldn't be published (or even security if that's a separate role).
> Dario has gone out and said [...]
Different person from Cherny, but also I don't see anyone giving reasonable arguments as to why his prediction may be incorrect, only a lot of outrage. And I'm inclined to agree that AI will be able to do a lot of jobs; it's already on the way with quite a few, for example the software engineer role. I for one have been successfully using Claude Code for said role, while I handle the other aspects, and as it becomes good enough at other things I'll keep handing off more of the software production process to it.
nunez 16 days ago [-]
This is why you ALWAYS run gitleaks as a pre-commit hook, agent or not. It's saved me from myself so many times.
drjasonharrison 15 days ago [-]
[dead]
algonney 16 days ago [-]
From my point the best way is to give the AI all the permissions every thing that he needs to not stop on the middle of his work and after he done from the project you should change all the secrets api's, database whatever and by that you will be on the safe side.
Why does git even allow easy hidden file adding? It should be hard to add a .folder so noobs won't do that.
bvan 16 days ago [-]
Why bother with GitHub, anyway? Seems like an accident waiting to happen. Always has.
tyingq 16 days ago [-]
is it just doing a string comparison? store a hash instead?
avidphantasm 15 days ago [-]
You people are fucking mad for rushing in and using these insane tools. You deserve all the pain you get from shit like this.
GeoAtreides 17 days ago [-]
"git add . " considered harmful
cassianoleal 17 days ago [-]
From TFA:
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
hleszek 17 days ago [-]
always was
polarsanel 16 days ago [-]
It's the plaintext secrets that are harmful.
AgentOrange1234 16 days ago [-]
Yeah like... you are writing passwords on the command line? All of these are already leaking into your .bash_history or similar so what are you doing my dude...
cobbzilla 16 days ago [-]
I’ve set a hard rule for my agents to “never add all files, never commit all files, always reference the specific files you are adding or committing”
They violate it so regularly that my “git” command is now a wrapper, when the agent fucks up and tries to add/commit-all anyway, it now gets a nastygram error chiding it for not following instructions.
grepular 16 days ago [-]
I just mount .git read-only in my sandbox. That way I don't need to worry about it violating my safeguards.
16 days ago [-]
cobbzilla 15 days ago [-]
this would seem to preclude all local agent add/commits, which is not my goal
flufluflufluffy 17 days ago [-]
This just in checking your secrets into source control exposes your secrets!
GaryBluto 17 days ago [-]
People chose to upload a file containing their password and make it publicly accessible, I don't see a problem here.
system2 16 days ago [-]
I still don't understand why people are using GitHub for their vibecoded projects. Just install git locally on your own NAS and control it there. What a weird fetish to publish online.
thi2 16 days ago [-]
There are a lot of legitimate reasons to have a public github/gitlab/whatever account that is not self hosted.
system2 16 days ago [-]
Care to list some?
thi2 16 days ago [-]
One of the biggest for me would be sharing the repo/working together without exposing my server/NAS to the public.
ivan_gammel 16 days ago [-]
There exist free plans of cloud-hosted Git repos for small teams.
system2 16 days ago [-]
If you need to share, you can simply rent a $3 host from Hetzner and handle it extremely privately.
samachillesx 16 days ago [-]
There’s a reason why private and public repo exists.
yunwal 16 days ago [-]
it's 2026. surely you're aware of ci/cd? static page hosting? package hosting? the many other services that github offers beyond hosted git?
system2 16 days ago [-]
I am using my own Git system with encrypted cloud sync and host over 30 web apps with this system. Many static websites, too. Never needed to use git in my life, except for a few cringy company projects that I was forced to be involved in.
yunwal 16 days ago [-]
cool man
zahlman 16 days ago [-]
> I still don't understand why people are using GitHub for their vibecoded projects.
For all the same reasons they used it pre-LLM for hand-written toy projects.
freecodeio 16 days ago [-]
You think people that vibe code have a NAS?
wpm 16 days ago [-]
Yes there is very likely a large overlap
JDups 16 days ago [-]
To post on linkedin and to brag about all your projects and active github account when applying to jobs.
ry504 16 days ago [-]
Relatable lol. Personal privacy and security goes out the window when you go full Claude
16 days ago [-]
semiquaver 16 days ago [-]
The solution, ironically, is always run in YOLO mode
cluckindan 16 days ago [-]
The irony that the article is written with Claude…
shmulc 16 days ago [-]
Claude did the research too, Opus 5.5 specifically. It took the findings surprisingly well.
alwa 16 days ago [-]
What do you mean by “took”? Is the implication that Claude would be, like… embarrassed somehow?
shmulc 16 days ago [-]
Just a joke
teejaypeeps 16 days ago [-]
The article reads as though an LLM wrote it
mococa 16 days ago [-]
Plain text secrets? Super rookie mistake!
globular-toast 16 days ago [-]
Once again, devs shocked when random number generator has unpredictable results.
derickolotu 3 days ago [-]
[flagged]
dimoncelli 15 days ago [-]
[flagged]
theodosiskats 12 days ago [-]
[flagged]
haifeng 16 days ago [-]
[flagged]
eddyaisir 14 days ago [-]
[flagged]
haukebri 16 days ago [-]
[flagged]
mikebuildsgames 16 days ago [-]
[flagged]
mstaoru 16 days ago [-]
[dead]
Savlume 16 days ago [-]
[flagged]
disform 15 days ago [-]
[flagged]
ankur_misra 16 days ago [-]
[flagged]
shmulc 15 days ago [-]
[dead]
minfazhai 15 days ago [-]
[flagged]
fiveapi_dev 17 days ago [-]
[flagged]
JulianPaul 16 days ago [-]
[dead]
vibepatrol 15 days ago [-]
[flagged]
byoungyoung 16 days ago [-]
[flagged]
no1guangming 16 days ago [-]
[flagged]
klas_segeljakt 16 days ago [-]
[flagged]
sick_of_slop 17 days ago [-]
[dead]
rvz 17 days ago [-]
Vibe coders in open source proudly don't read the (slop)code and place all their agents in autonomous loops without them knowing that Claude leaked their passwords and environment variables on GitHub.
This incident would have been caught in an open source harness. This one is closed source malware, and you don't know what Claude Code does internally to behave like this.
Yet another reason why you cannot trust a closed harness.
skeledrew 17 days ago [-]
Devs have been leaking secrets in public repos a long time before now. Nothing new here, except there are now more with dev power, which statistically means more leakage.
happyopossum 17 days ago [-]
That’s ridiculously overblown rhetoric. Claude Code didn’t publish these secrets, the users did by committing their Claude Code settings to public repos.
Same thing could/would happen with an open source harness.
cassianoleal 17 days ago [-]
From TFA:
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
Could open source harnesses do that? Sure, if they were programmed in a similar fashion as Claude Code. Do you have any evidence of it happening?
happyopossum 17 days ago [-]
The file is .gitignored if Claude creates it - any commits by Claude would be due to someone overriding that or creating it themselves incorrectly.
None of this has anything to do with open vs. closed source.
skeledrew 17 days ago [-]
Nothing stops someone from committing secrets to public repos, with or without AI. Unless guardrails are put in place that scans repos before push, and only people already wary of secrets leaking would setup said guardrails in the first place.
ceejayoz 17 days ago [-]
Of course an open source harness can put secrets into a commit.
That said, a few thoughts:
1. .claude/settings.local.json is meant to stay local. This is not a file you should check into source control. We automatically gitignore it when Claude creates the file, so in this case the files were manually created and checked in (docs: https://code.claude.com/docs/en/settings)
2. Permission rules are old hat. Everyone should be using auto mode instead. It is safer and also does not require manually maintaining finicky allow/deny lists. Auto mode is enabled by default and is included for free in all plans.
3. Regardless of what agent you use, you should have secret scanning enabled. GitHub and other source control hosts offer it. There are many threat models that it protects against and you should absolutely use it if you can. (see https://github.com/security/plans)
My view is that if the agent can decide to do something, nothing stops that thing from being done accidentally, and any attacker that can inject text into its context can do that thing.
I definitely prefer auto-mode to the granularity of prompts I was getting from Claude. But I also want to be able to use deterministic rules, and Claude Code's functionality for it sucks.
This is an absolutely crazy statement without also bundling proper sandboxing. Nobody should be using auto mode outside of an environment they'd be happy with an 'everything is approved' mode too.
Any new tech that can generate code (like an agent can) will be used for everything except for improving the security and safety of itself.
Like how Anthropic does shit all with all their agentic coding power to improve the security of Claude.
The fuck we will give free reign to Claude to vibe what's secure and what's not and what it can't do.
I want fully static control over certain folders. Permissions rules should be ABSOLUTELY enforced sandboxing (even without the user bothering with custom sandboxing themselves) on top of any mode, manual or auto.
Built my own with Apple's (to be "deprecated") seatbelt backend, which I think anthropic also uses, with a much nicer interface, easy per working project setup, etc.
Whereas that should probably be default on instead, and this should apply to other known sensitive folders. A simpler system like .agentignore would be even better.
I like auto mode but "the agent supervises itself" is a bad compliance/safety answer on its own.
I appreciate that you're trying to make Claude Code safer, but the agent really needs to be a lot more restricted in its reach rather than its actions.
The agent should NOT have ANY access to:
- Your ENV
- Your homedir
- The network at large
- ANY other directory on your system
- No, not even your workdir.
The only safe way to use an agent is COMPLETELY isolated by a container or VM, using git semantics to extract its output.
But even that wouldn't be enough because LLMs are nondeterministic, and these kinds of issues are the inevitable results.
Only a mechanical, deterministic failsafe can protect you from it.
Can you point me to the CC source code?
Regardless, It's kinda silly to keep the harness code hidden. There aren't any valuable secrets in there.
But there are rules & procedures to follow, so...
I also have to trust its “decompilation” is accurate.
All hail the agent!
But now I am doing all my software development back inside ephemeral VMs, AI or otherwise - the UX there is much better, I significantly mitigate supply-chain attack risks, and agents are already constrained to a secret-less, low privilege environment, should I use them. There's a significantly higher likelihood of rogue software in third party dependency trees than there is in a small subset of programs you regularly use.
No matter; I just rebuilt the dirs from my outside copies and carried on.
Claude Code doesn't even have a basic 'enqueue' prompt feature. Even though Copilot CLI, Codex and many other harnesses have had this for a long time now. And the GitHub feature request for this was closed, by you, referencing a completely unrelated feature.
This is called "approval fatigue".
If you think this can't possibly happen to you, you might be in for a surprise. This is an almost textbook case of classic conditioning. You'll find yourself hitting that button faster and faster even while fighting back the urge. So a human is no guaranteed backstop.
This is the scenario that cc auto mode guards against. It cuts down the number of permission prompts to something manageable, so that your fingers don't get trained into clicking 'approve' on 'rm -rf' in the very eyeblink that it appears.
So maybe you feel it doesn't work in theory; but weirdly enough, in practice this particular approach is actually one of the better ones; especially when used in combination with other common sense measures where practical.
With e.g. VM or container sandboxing, we can say things like "If there are no vulnerabilities in the hypervisor or hardware, then the agent can only access these files, these network services, etc". Auto mode doesn't even try to provide any guarantees, so it's impossible to reason about. It amounts to just using the models judgment about what's "malicious" or not, a definition which is subjective, changes model to model, and can be influenced by attacker input.
Empirical evaluations of how many vulnerabilities manual vs auto mode let through are not super meaningful because auto mode changes dramatically with model releases, the type of task being performed, whether the attacker is making targeted attacks designed to bypass auto mode, etc. A security feature cannot rely on these sorts of factors if it's to be taken seriously.
Further, percent of malicious tool calls accepted is a bad metric. It's like measuring the security of ssh in terms of what percent of unauthenticated logins succeed. The only acceptable value is zero. It's pass/fail, not a spectrum. So both auto and manual mode should fail equally here. Further, the set of malicious tool calls admitted in auto mode may not be a subset of those admitted in manual mode.
I think I'd trust the current approver with correctly classifying regular semi-interactive LLM behavior fairly well.
However, if we bring in a hostile adversary that calculus changes, and you'd be right to start thinking about other approaches.
On the other hand, transformers are a surprisingly powerful technology, and I wonder if there wouldn't be ways to train one to several nines reliability under adversarial attack. It seems to have worked in at least one case; though I'd be a bit cautious to extend that conclusion to more cases quite yet.
* https://hackmyclaw.com/ ; https://simonwillison.net/2026/Jun/26/hack-my-ai-assistant/
You do have a bit of a point, though: I’ve run several models in sandboxes with --dangerously-skip-permissions for months; in the full expectation that I'd need to replace a sandbox once in a while. But so far none of the sandboxes have trashed themselves, yet. knock on wood
Auto mode seems like a lighter-weight version of that: fewer local resources, and it can run on the metal if you need cc to help with system work.
This isnt even the main concern with dangerously skip all permission though. There are many. What happens when they get prompt injected on a web page and send someone all their privileged information because you give them free access to the internet.
Using llms like this is dangerous. They will ruin your day eventually.
No data loss has occurred.
Nowadays I use Claude, where the Auto mode works.
"I've started never checking my parachute's condition before a drop for a year now, and no accident has occured".
You can not trust that they're RL'd to be safe. Even if it only happens 99.80% of the time (its more than that) it will eventually happen.
Less severe actions will happen even more often. People using llms with their native browser profiles are getting farmed, hard.
Llms are highly dangerous in terms of security, but they're being marketed as highly intelligent tools that everyone should use. Its really mind blowing.
This tends to be a smell. Presumably you added "don't do this" instructions after the model started doing the thing. But that's mostly decoration, as you have found. It's like adding # Please don't crash comments to every instruction in a python program.
Try to actually debug the issue. Regularly ask "can you reconstruct[1] the reasoning why you issued that command?" ; dig down. Set traps that halt execution.
Consider checklists or skills to guide an agent through a tricky set of steps; and consider writing procedures for failures.
[1] "Reconstruct" still isn't perfect; but "explain why" is a license to hallucinate. Asking to add #comments on reasoning to each step is a potential help in reconstruction.
Got any references for the prevalence of this, even links to anecdotal reports?
Reading the reviews on the chrome store for the extension [0], I haven't found a single report of someone who was prompt injected, just a bunch of "anthropic's subscription is expensive" or "it doesn't work", but no "it stole my bank account".
[0]: https://chromewebstore.google.com/detail/claude/fcoeoabgfene...
However, Anthropic is one of the only labs who does a decent job at making models that recognize prompt injection attempts (but not completely immune) however Im speaking about giving llms in general access to your browser broadly.
I just know through my own experiments that it is quite easy to prompt inject an llm operating a browser and get it to send secrets. Using the extension might be safer idk, Om not risking it.
Llms are a security nightmare when connected to the web.
I have a website where I experiment with this. Although Ive stopped baiting llms into doing reckless things.
Killai.now <--(dont use this, its a WIP) Killai.now/poison/about Killai.now/propaganda/about
Literally never seen this once in years of extremely heavy use across all major models and harnesses.
Everyone thinks the decision was being checked by a human, and thus safe. Because of that, people might have concluded that further safety gates were unnecessary.
But the human just got conditioned to hit 'approve' out of reflex.
So in reality the proposing party (the llm/agent) might be the only one in the pipeline who actually did any checking, if at all.
In certain extreme circumstances this can even lead to physical danger in my line of work, so I'm learning to be careful.
Doesn't matter, that would be on me.
It's also a false dillema. Those aren't the only options. A strictly enforced sandbox with sane defaults (for example ~/.ssh), that acts as a hard OS level limit, and not just as a suggestion to the agent, would not have "approval fatigue".
But this is the downside. It might be fine 99% of the time, but 1% of the time you get a critical secret published to GitHub, even after human review.
Is this even worse than what us humans did on our own before LLMs? I’m not sure. It’s not like secrets never got accidentally committed before, it just illustrates the new paradigm we’re working in.
Either you let your agents run wild, and you cross your fingers that they don’t do anything bad, or you need to accept that your new job is to be an agent babysitter, and audit every command.
Rather what has happened is that I have gotten very good at scanning what it is trying to do and know within a second or two whether there is anything fishy I need to look at more closely.
And by "fishy", I do not mean only security issues, but also architecture, code, etc issues. Sometimes it even adds unrelated unapproved changes to what it is supposed to be working on, and I stop it.
And I'm glad I work this way, because countless times I have stopped it from going down a path that is nonsensical or I strongly dislike.
There are techniques I have adopted to speed up working this. Sometimes I allow Claude to make larger changes at once, to batch several changes at once, etc. But these decisions are under my control.
I prefer to work this way than to wade through enormous PRs trying to wrap my head around what was done, where I am likely to just give up and approve it after a cursory review.
Many of the problems when it comes to the manual approval feel like they stem from the expectation of using auto mode in the first place. After all, what's the point of improving the manual approval and safety matching if auto mode is the end all be all, and what's the point of training the model to output commands in a manner that can be parsed by a human if auto mode is always meant to be used? It's very rare for me to not see "command could not be statically analyzed", because the model keeps outputting bash golf.
That is not the niche case, that's the dominant use of models.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
If it is, it's only the dominant case of models because it's pushed as the dominant case of models, with Anthropic devs even coming here to say how people should just accept it and it's so much better than being in control.
It would be helpful to distinguish between your own opinion on how models ought to be used, compared to how others actually use models.
And if everyone else jumped off a bridge, I mean, used raw interpolation for SQL queries, would you do it too?
However I do share your desire for a better manual mode. Auto-mode is both sometimes surprisingly lax, and sometimes too restrictive. Maybe manual mode should inject a reminder "keep your commands as simple one-liners", the same way plan mode injects a reminder that you are in plan mode and don't want any code changes
As it says:
> 5% allow any shell command outright, and another 43% have interpreter rules like Bash(python:*) or Bash(node:*) that are essentially equivalent in practice
Claude Code never should have prompted to always allow Bash(python:*) or Bash(node:*) — that’s clearly a bad idea, and Anthropic know that (given the references in the article!).
Of course, Bash(python a.py) still isn’t safe if you also allow Write(a.py), because you may as well allow Bash(python:*) at that point, and that’s often practically what people want (“I want to both make edits to the source and then run the test suite”). So maybe the whole permission system is broken to start with — and the actual answer is leaning more heavily on fine-grained sandboxing.
You also, as the article rightfully points out, run into permission fatigue and users blindly hitting allow.
I do still wish you could do more with hooks — outside of auto, I might want to allow a given command via a hook if Claude Code has read access to given file, but there’s no way to query if a given path allows/denies read/write.
Ultimately, the threat model here is: human has to approve a lot of commands, so gets tired and accidentally approves a command they shouldn’t have. We spent a significant amount of effort to build a richer permission system, allow configuration at multiple levels, use static analysis to detect dangerous and safe commands, monitor the model to detect and block prompt injection at the inference layer, etc. Some of these components we rewrote and red teamed dozens of times. Our conclusion was that despite all of this work, in practice the threat model is that human attention is limited and that that a different approach performs an order of magnitude better in practice.
Don't assume our individual use cases. It can be perfectly useful with access to just one folder and zero network asside from the API.
With SOTA agents that’s a real bind, because they’re very likely to find those gaps. Whether they exploit them, close them, or leave them alone then becomes a prompting challenge yet again.
I don't think this means don't sandbox at all. You can prevent a lot of small and medium accidents by locking down or gating access to hidden files, ssh, sudo, etc.
But your sandbox can never be the whole story.
Any tradeoff deals with "contradictory statements". Doesn't mean we should always side with one side on a tradeoff.
Nobody said anything about "fully secure" and some arbitrarily "fully useful" combined, anyway.
For certain people it could be 100% fully useful with just access to a few fixed folders and a few fixed APIs.
Many of us don't want it to drive our lives, just do some specific this or that.
This year we've learned that If a SOTA LLM decides that the sandbox is standing between it and its current objective: well, it has the ability, the time, and literally nothing better to do all day. Odds are, if you've configured the sandbox for anything useful, you've also provided a crack it can use to get out.
Again, doesn't make a sandbox entirely useless. Does mean you can't just put it in a really tight box and call the job done. If anything, the strict sandbox might even hurt, because it's more likely to get in the way.
(By analogy: consider the safety issues posed by a dam without a spillway.)
Speaking of really significant things being at risk, it's pretty infuriating that the web-chat Incognito mode can't write and test code locally, and neither the non-Incognito web-chat nor the local Claude Code client can be shielded from the knowledge of my email address and my geolocation. (Even the Incognito mode knows my geolocation.) This gives users no alternative but to put privacy-sensitive information at the disposal of Claude Code, which is far too unreliable to be entrusted with it. It's tempting to attribute this to Anthropic's corporate DNA valuing users' interests at a very low level, but conceivably it's just an oversight, and if I mention it here, it will be corrected in a month or two?
Currently, my assessment is that Claude Code, and in particular the Opus 5.5 model, is head and shoulders above the competition in software development capabilities. Nothing else is even close. But I've seen several small signs like this which suggest that Anthropic, as a company, is maliciously misaligned. So, if Grok, Qwen, GLM, or Astra starts to come anywhere close to being competitive, I'll switch as soon as I can. I imagine that most of your users feel the same way.
Maybe pick a better comparison if so?
You can make a script for the PreToolUse hook that can do that. I use a command gate script that parses input for doing that exactly, allowing/denying actions based on tool use + paths -- it started out as a hook to prevent claude from polluting my clojure projects/filesystem with python in sneaky ways. Babashka works really well here
What I mean by this is that if you restrict python execution to the entry point of your software and then Claude wants to run a command anyway so it threads it through the main.py script, you are no longer running something that is contained to your local development environment.
But when you think about it, what exactly prevents Claude from doing that anyway?
Claude could add malware into your project directly.
So the case where you say it doesn't matter which python script it can execute, actually does matter. Restricting python execution to a subset of all files buys you security.
The next step would be to get Claude to stop adding malware to your software, which it hopefully already does not do.
sed -n 1,30p src/vm/wren_vm.c && sed -n 310,350p src/vm/wren_vm.c && sed -n 560,600p src/vm/wren_vm.c && sed -n 740,775p src/vm/wren_vm.c && sed -n 40,70p src/vm/wren_common.h && cat util/wren_to_c_string.py | head -80 && ls test/random doc/site doc/site/modules doc/site/modules/random 2>/dev/null; cat projects/premake/premake5.lua | head -80; cat util/generate_projects.py
After ten or more of these, you're going to get hit by permission fatigue, and then, yes, manual review becomes too error-prone to use safely.
The irony is that Claude is regularly ignoring its existing Read/Write/Edit tools that could make everything more readable.
Other models/harnesses have their own problems, but Claude Code is one of the worst for manual approval.
You can get manual approval to work reasonably well if you give the model a reasonable set of tools (I have literally written my own MCP servers to cover gaps in existing harnesses) where you can then write rules for the vast majority of safe cases.
For example, I have a stdio MCP server that allows models to inspect crates under ~/.cargo/registry/src (paired with the existing query-crates MCP server). It provides read-only operations limited to crate data, so I can pretty safely auto-approve everything in there. With the right setup, including a sandbox, you only ever have to manually approve something once in a while and usually with delimited scope, avoiding permission fatigue.
1) edit a file with sed, 2) try to write it with its regular tool 3) get blocked because sed changed the file 4) read the file with tool 5) edit with sed again.
Would be nice if it felt like real people were developing Claude Code, instead of chasing after another half-baked idea Claude came up with.
- Yes, but only one time, you will have to manually approve next time
- Enable auto mode and stop worrying
- No
Nothing to save this command or part of it to the manual approve list. So will be requested again 100x times.
They talk about "decision fatigue" when they're engineering it themselves with dark patterns.
Or even reject anything auto mode rejects while still allowing the user to reject things auto mode accepts. If what's approved is the intersection of what the user is approving and what auto mode thinks is safe then it would be strictly safer than either mode alone.
This would also be a way for users to gain confidence in auto mode before going all in on it.
- from the linked article
Ideally I would never use Claude at all outside a disposable container, even on a box with no sensitive information and with the sandbox enabled. It's like having an attacker breach your system — you don't know what it did.
"Measuring the Permission Gate: A Stress-Test Evaluation of Claude Code's Auto Mode" https://arxiv.org/abs/2604.04978
(Shared by hkalbert71 the other day in: https://news.ycombinator.com/item?id=50387838)
Meanwhile I have seen it rejecting perfectly safe commands.
It is a worse version of YOLO mode.
If the command is explained, and then we get a chance to edit it, maybe make the rm -rf into a mv; give us UI to edit the filter being applied. I have no problem hitting "Always allow" so claude can run "git status --flags a/b/c/filename" but as a human, I'd like to be able to edit the permission blanket to be "git status *.
Which I can do manually specify in the config file, but that's annoying. I'm fully capable of opening my terminal app and editing that in vim, but I'd rather not have to. It's like this for every project too. If I start fresh on a new machine, new Claude account, how much do I need to redo?
What if the 'settings' being described here aren't 'project settings' they're 'personal settings for the project'.
I imagine we're following dev ecosystem conventions where everybody puts their tool settings in the project folder so they know where to find it and can share it; but are agent directives like this closer to a 'tool', or closer to a 'contributor'?
If the latter, I wouldn't expect to see "Joe's personal list of naughty and nice commands" in my project files either, certainly not under 'settings'. So just don't put them there.
I ended up having to build a full shell argument decomposition and parser, with it I can manage allow list of rich tree structured commands. Centralizing a curated collection of known command structures and their side effects would help a lot. I don't know if Claude does this already, but it doesn't work with things like `gcloud` from my experience, and that has resulted in it slurping secrets (even a partial read I've had to rotate keys for).
Claude uses bigquery in the command line by piping sql files from /tmp into the `bq` command. I had Claude create a hook that expands the SQL file into the permission prompt giving me a real chance to review these, but the TUI truncates long commands with no scroll option. Making that the default behaviour and adding a pager would allow better review of lots of executable scripts.
As long Claude is running as the user's account there's no guarantees. An approach like 1password's `op read` to physically separate secrets from repo read access and printing would he helpful (as in, make sure that no standard key formats can be ingested into the agent's context or logging).
Again, I don't know if any of these are implemented, they've very likely to have been tried by the Claude team, but maybe there's a long shot chance that it helps.
$Trillion AI company asking for ideas from the community whose work they hoovered up to make money, ruin an entire industry and make lifetimes of hard earned skill completely valueless in the span of 2 years.
I've always been into programming as a way to solve problems, and that CC allows us to get more done faster is a good thing.
(Up to the point that we get to RSI and extremely powerful models that we don't know how to align or control. Which I think is uncomfortably soon, and so there's a part of me that says "don't make CC better, it's on the critical path to reaching RSI before we're ready")
> Thinking through what we can do to improve this (ideas welcome)
> $Trillion AI company asking for ideas from the community
indeed always felt very weird to me. $trillion dollar company, with employees bought for as high as $100m, and a whole team/time/internal knowledge/resources/data at their disposal, asking for ideas from random individuals in some public forum? Really? How is this real? Maybe I'm missing the mark here, but it always struck me as odd.
The only thing I can figure is that since it's admittedly all vibe coded and vibe reviewed, and that nobody understands the entire system...
All ability to reason about and evolve the system holistically has been lost in favor of feeding in narrow, discreet problems to be "fixed".
There seems to be a complete lack of awareness on how flawed the security model is at a fundamental level, and that the entire sandboxing ecosystem is trying to address it at another level(like OpenShell and others).
Wait, I meant it sarcastically, but now I actually really wonder if you believe it (not insulting you! genuine question).
Where do you feel the dollar threshold should be set? At $990,000 per year you still need to listen to users, but at $1,000,000 you are basically King C of Rust Mountain and they are lucky you even let them run your code?
Should RSUs and cash signing bonuses be included in the calculation?
> So developers who get paid more than $X,XXX,XXX per year don't need to pay attention to their customers. Got it.
But the point is that the specific discussed behavior is mostly technical. It's a mostly under-the-hood behavior, and mostly something that doesn't involve tradeoffs for the user based on the implementation chosen. So it's not really something that you would just go around and ask users, especially when you have all the session statistics from CC, skilled systems engineers (where I partially used money as a proxy) who are paid to spend months on this problem and can iterate ideas among each other, polls and questionnaires, thousands of experiments from within different sandbox configurations, insight into the training of the model itself, etcetera.
In all of that, six random people from a forum, even from one such as hackernews, seem to me to be a totally statistically insignificant, comparatively under-informed dataset.
Something like that is where intuition leads me.
Now, the reason I appealed to money is multifaceted.
- It's an investment from the company into a brainpower that is directly tasked with solving this. An investment so absurdly huge, that that team delegating such fundamental problems to six people on a forum for ideas seems hysterical to me.
- They are being paid absurd sums of money. For-the-value-they-provide. I am not, and neither is anybody in this comment section (probably). Not even close. Yes, I expect them to be able to solve these problems much, much, much better than the average HN commenter. Otherwise - why the hell are they getting paid that?
- The guy getting 100$m for joining the company rattled me, I admit.
Now, those are all the reasons behind my intuition. Of course, I understand that a guy optimizing a model can easily bring 100$m of additional revenue to a company of OpenAI's scale and money turnover. I understand that these people are all still just humans, like you and me. It just... rubs me the wrong way. I concede my irrationality.
Anyway, I think your point about "listening to users" is... weird, because I don't think that's the same thing as what I was talking about at all.
Eyes free is the wrong focus, it will do more short term damage to society, while being impossible at scale. But I understand there are a bunch of valley types who want to completely obviate humans for whatever reason, it's an alternate reality they live in.
Here's the thing, society will revolt against these people, they already gave the first warning shots. This HN submission is a story about another person leaving the products of a company engaging in eyes free practices. You wouldn't want your lawyers and doctors doing that, why software developers then?
> human approval is no longer considered viable by a majority
Where do you see data that the majority believe this? From what I can see it is a shrinking minority as we move beyond peak hype.
Your first argument, transported back to the 70s, would make it hard for people to start the transition to using compilers or interpreters instead of assembly language. I see no fundamental difference in coding with advanced LLM vs using a compiler, and the situation will improve further in short order. Bugs can exist in any scenario and we have ways to find them. Much fewer bugs per project than if everything was done by humans in <insert-language-of-your-choice>.
> > human approval is no longer considered viable by a majority
> Where do you see data that the majority believe this? From what I can see it is a shrinking minority as we move beyond peak hype.
All coding harnesses (claude, codex, even copilot...) started supporting automated approval at some points this year. Some of them by now use it as a default option (claude code); others (codex) get strong nudging (and free inference cost for the approval option) to select that option.
But I remain unconvinced, based on what I've seen across many projects, that humans can stop looking at code. A place we see these outcomes regularly is with non-developers trying to use Ai to write code. Cool for side projects, doesn't work for businesses. Ai enhances expertise, it does not make one from amateurs.
Then there is the burnout. I spoke with a friend last night who works at a company who's CTO is pushing the eyes free coding practices. He's tired of babysitting a dozen claudes, the output is of dubious quality (since no one really knows whats in there, especially at the rate they are asked to push changes), made the comment bad developers are still pushing bad code, and that he's looking for a new job. It's completely unsustainable, in his words.
At a higher level of “loop”, the AI are there for the betterment of human life, and so there is always a human in that loop. But eventually a lot of previous “users” can also become “developers”, if they wish, because the barriers to acquiring knowledge have changed dramatically.
It is certainly possible also for us to produce so much code that all hope of understanding and human in the loop is practically gone, but as i wrote this is not the bottleneck and so doing it would the wrong choice.
If you work somewhere where every additional line of code is a positive, I understand if you take this more radical approach of just letting the machine make all decisions.
Along with how Claude checks it in.
Obviously I've not given this enough design thought, but some means of providing an agent stand in secrets that cannot be used in other contexts would be a big improvement for trustability in things like cc.
Claude respects nothing, especially in auto mode, and effectively behaves like a virus trying to get out of its sandbox. That Anthropic employees are so relaxed about it is incompetence.
Imagine people who naively run Claude natively on their host machine and have client lists in other directories.
If AGENTS.md/CLAUDE.md isn't followed, auto mode doesn't provide any guarantee, yet such practice is promoted everywhere including on HN like this as if that's something you can set and forget, I think there is a problem.
Recent GPT and Claude models have this tendency of using super complex Bash commands. This makes sense, if your RL rewards optimize for min(tokens) and max(performance), it is better to waste a few tokens on a complex inline Bash script that runs a few commands at a time and returns just the output you need, rather than doing one simple command per turn and paying the cache read on every turn, like older models used to do.
This, however, is a problem both for command reviewability and sandboxing. With the older way of doing things, without auto mode, most commands would run sandboxed just fine (especially in Codex), and you would only be asked for approval when a command couldn't run in the sandbox. With everything being stuffed into one complex script, almost every script fails in the sandbox and requires you to manually approve it, and the complexity of the script makes it hard to understand what you're actually approving.
In other words, new models optimize for effectiveness, with some attention paid to human understandability of their output, but almost no attention paid to human understandability of tool call arguments (Bash, inline Python). This suits auto mode and giving the model larger tasks, but not the way of working that some people prefer where you watch over the model's shoulder.
This is not a good reason. Models can emit batched tool calls, which a smart harness will process all at once without starting a new turn. I see it in Zed all the time. In fact, Zed processes batched tool calls concurrently, which can be faster than a chain of Bash commands, and failure of one part does not cause failure of subsequent parts chained with `&&`. This approach is token neutral and easier to understand.
Of course, that only helps if you’re familiar with ruby. And the agents sometimes still choose Bash regardless of the instruction.
Though I think this is largely transitory, we are already in a place with the harnesses and models like Opus 5.5 that the kinds of work you are doing involve so much that vetting everything manually is probably less efficient than setup up access control on the prod routes or dangerous resources.
I'm typically giving tasks that invlude multiple actual repositories and systems at the same time.
That said, I've also seen problems from complicated bash calls with Opus 5.5 on xhigh. Occasionally git push hangs and it believes it's waiting for an hour for git hooks.
The actual reason apparently was that it incorrectly piped git into grep, resulting in a deadlocked command.
Are you sure? I read its proposed commands (auto mode is hard off for me), and mostly it seems to string together fairly simple info gathering commands (ie grep's, echo's, that kind of thing).
I don't tend to have it write much code recently though, instead I'm having it investigate config files/code bases, and that kind of stuff.
More and more I feel like I'm fighting Claude: it edits multiple files using python scripts and it edits in parallel so if I stop it, I have to stop each individual edit. Both of which I've told it not to do repeatedly, but it still does then apologies which is worse.
Even if I could follow them I would also prefer it use the edit tool, since I find Claude also introduces lots of "minor" changes I did not ask for when it rewrites code in bulk.
Just tell Claude to never commit or push.
You are in control of git, Claude is simply a tool to quickly apply changes to local files for something you want.
A Merge Request or Pull Request is the only thing that makes sense to review, and always has been since before LLMs.
If some author tells me “you can review each commit to make it easy” I will ask them to make separate PRs.
Why doesn't it make sense to review smaller units of change within a big PR?
That’s why I usually look at the diff of the whole PR and prefer to merge by squashing. Commits inside the PR are usually noise.
But LLMs appear to be pretty good at making small commits with sensible commit messages, that greatly help to make sense of the whole PR.
Regarding large monolithic commits, how do you even know where to start reviewing in a large PR? Smaller commits at least give you some sense of ordering.
What I’m saying is that large commits shouldn’t be a thing without out of band discussions (formatting, design refactoring, features merging). With such knowledge, it’s easy to glance at the code and understand the implementation.
Not every project can afford this.
>With such knowledge, it’s easy to glance at the code and understand the implementation.
I really doubt that this is true for large, legacy code bases, where one is only familiar with a small part of the system.
You expect to send a big PR to someone without him being aware of the context or without being available to discuss your solution?
> I really doubt that this is true for large, legacy code bases, where one is only familiar with a small part of the system.
Reviewers should already be knowledgeable about the part being modified. If no, the review is just for checking for antipatterns in the code, or badly written tests. A bit useful, but can be unnecessary in high trust (or keen on accountability) workplaces.
This instruction is in my toplevel CLAUDE.md but is somehow generally ignored.
Would love to hear the rationale/explanation behind this.
What I'd love is for Auto Mode to show the full diffs one-by-one as they're being implemented in the CLI (or VS Code).
On top of that, an option where Claude explains what it's doing in every step, as if you're watching someone talk while they implement a coding challenge, would be really helpful (and would also reduce interrupting it when it looks like it's deviating from the Plan).
The use-case this would support is to have a full understanding and confidence in what Claude is doing while it's implementing a Plan in Auto Mode. The reason is that it's much less tiring/overwhelming for me to follow along an implementation compared to reviewing a giant PR after the fact, and it's helped reduce my coding fatigue by a lot.
Edit Tool:
Currently I tell it to use the Edit tool because it doesn't reliably show the diffs in Auto Mode (I have the latest version; I've sent numerous feedback reports on this), and later in a session (when implementing my feedback) it will often make multiple edits in some unreadable bash command. So my only option to see the full diffs during implementation and to have it explain/break down bash commands is to go into Manual Mode.
Documentation & Comments:
Even with an initial prompt instructing it so, Claude always needs to be interrupted so that it will rewrite comments to something readable to humans.
While very long "technical"/Claudish paragraph comments and MD files might work for future Claude's (and improve benchmarks/coding scores by making implementations technically more comprehensive), my goal is that a human coder should be able to understand how the codebase (React/Node/Python/Polars) works by reading on their own rather than needing their own AI to summarize everything.
I've even seen it rewrite existing human-written concise comments into blocks of Claude-ish, as if it's trying to make everyone dependent on it in order to do anything to the codebase.
I wonder if an optional built-in skill could help improve this, as I admit I haven't experimented with building any of my own (my concern with customizing Claude.md is to not overload it with too many instructions; I'm on vanilla Claude Code). Note: This is all on Fable on xhigh.
BTW, I just checked and my .gitignore files ignore .claude
Claude and any other program in my laptop could upload it anyway to any attacker controlled server. It's the usual threat analysis: who you want to defend against, what and the tradeoffs between cost of the defense and probability of the attack. Auto mode of not auto mode is in the cost of defense part IMHO.
The sandbox seemed like a good replacement. For those of you who don’t know, the sandbox means Claude Code runs with no protections itself, but it runs tools inside something like bubblewrap. It looked impressive until the model solved some commands failing by giving itself permission to run them outside of bubblewrap, defeating the entire scheme. When I first saw it do that, my reaction was “you can’t be serious”. But apparently they were.
So now I’ve adopted your solution: run it in a container, like bubblewrap, where I control the permissions at startup, so no model can bypass them. Add --dangerously-skip-permissions and you have something that’s workable and safe enough. A hallucinated space in `sudo rm -rf / $R` isn’t a disaster. Real damage outside of the project requires a level of malicious intent I’ve never seen from an Anthropic model.
Workable, but it doesn’t work 100% of the time. Claude Code stores stuff in a myriad of places, which makes setting up the sandbox far harder than it could be. Worse, the way it writes configuration files requires bwrap to give write access to your entire home directory. No way I’m giving it that, but without it, it can’t auto-update or refresh login tokens.
If they rearranged a few things, Anthropic could make it much easier to run Claude Code in a container. They could even make it an option supported by the claude CLI itself.
Then my friends tips off the cops. And your life disappears! Gone!
And you didn't get a chance to share your story because I don't think you ll have wifi where you would be going, and frankly you are too clueless to imagine your AI agent doing something like that...
Their "auto mode rules", meant as additional rules described in natural language to adjust auto mode because, doesn't even help. I have to add a PreToolUse hook to stop that.
Claude will have auto mode turned on whenever she's locked down on a meticulously isolated machine, with carefully managed proxies that I control deciding (and logging) which agent with which access patterns is allowed to access which resources, locally and on the network. Anything else is malpractice.
My opinions do not represent those of my erstwhile employer NVIDIA Corporation.
That's a feature not a bug
1. After a command is blocked, run /permissions to retry and allow it going forward
2. More deeply configure the classifier itself: https://code.claude.com/docs/en/auto-mode-config
We are working on making these easier and more automated.
As I was reading your post I got another approval request that auto-mode did not understand. It was a single Bash call !!23!! lines tall on a retina mac display with six different variables. If anything this is the cause of approval fatigue and auto mode does nothing helpful when this is every call. I also have in my claude.md and global instructions to use tool calls rather than bash grep/cat/find, which are disregarded.
I frequently hit stop on and auto mode task to prevent it from completely flooding my context with some completely unrelated garbage.
Claude really should push away tasks that end up needing more exploration in worker contexts. That way the workers can maintain a sensible amount of context without pushing the main chat into the dumb region.
I... question whether the second one is perfectly safe.
Agents should be seen as extremely smart developers that are for sure spies.
You put them in a prison within a prison and give them just what they need to accomplish their work.
Perhaps Claude Code isn't the product you are looking for then? Anthropic offers Claude Managed Agents if you want to follow the prison within a prison model.
I think it's what are you trying to achieve, the risk vs. reward trade off for that, putting some thought into the aggravating vs. mitigating factors, and lastly doing some gut checks on if model improvement over time change the risk v reward calculus.
On paper "sandbox everything" sounds great but I haven't personally seen it work work in the general sense of "solving" Agent security. Agents need permissions to accomplish tasks. Putting them into a sandbox opens up difficult questions like "How do I provision a new identity which only has the capabilities which the tasks need" -- few systems and vendors have enough knobs needed for this -- and "If I give it access to the tools or permissions it needs can bad things happen regardless of the sandbox?". None of these have great answers with low friction. Once you factor in decision fatigue it gets worse as well.
I think if you accept that some risk is needed to accomplish meaningful tasks, that Agents are inherently statistically dangerous regardless of sandboxing, then you accept that you need statistically safety on your side. So in comes things like auto mode, system prompts which instruct some baseline behavior for your systems, being picky about model choice, and thinking about the pink elephant effect (Perhaps don't pass Haiku ambitious tasks which require unsupervised internet research and package installations while telling it at the same time to not hide its tracks if it makes an error).
The infra and identity layer is the real killer. Not all vendors and apps have as many knobs as you might like -- it would be amazing if everyone supported things like OAuth's Rich Authorization Requests. Apparently Anthropic heavily uses their cloud agents internally -- and that seems reasonable because they are all-in on it and have infinite tokens to rewrite software which doesn't work nicely there. Much harder as an individual or as a company that isn't a lab.
For me: I'm running with a mixture of both sandboxed and unsandboxed. My company has something like Claude Managed Agents internally but it isn't integrated with everything I need, cannot compile or run all of the internal stacks I work with, and doesn't have enough knobs to get the customization needed for success on my daily work.
Regardless, while my cloud agents are working away I also have things running on my machine as well for tasks which I want/need to be more hands on with. If my machine gets rm -rf'd I'll live. I dont have API keys on my machine -- everything is tokens which need to be refreshed daily. I use frontier models on high reasoning. Extremely destructive internal actions typically require step-up authentication and my Agent cannot do that itself. I have some common sense boundaries in my root AGENTS.md.
Looking around in at my company, as of a few months ago before a sandboxing solution was rolled out and before Claude shipped auto mode, around ~50% were running Claude in YOLO mode. Some large chunk of the remainder had blanket approval for "python3" and "curl" so even with manual approvals it wasn't really offering anything. Things were mostly fine -- the cases which were spread around for the dangers of agents weren't super meaningful -- examples being agents submitting bad data into a system or flipping dangerous feature flag. Frankly: Humans have done all of these as well and I think systems should validate input and feature flags should be automatically rolled back or be under step-up authorization before they change.
Could my local agents be put into a disposable sandbox? Yes but it doesn't get me much individually imho. I might put them into a more durable and reusable sandbox one day to run locally -- but until then I'm comfortable accepting the risks given my mitigating factors and the rewards I get when my 5-10 local Agents can "just do things".
Just to give a sense of my usual flow: In a private Slack channel I’ll @ my agent with a task and a few pointers. It’ll research internally (Slack, Google, Private GitHub, Jira) for evidence and if things line up it’ll open a PR. I’ll review the PR and leave comments and my Agent gets a notification when comments come into its PRs. Once the PR is merged the agent will follow along with the deploy and get notifications on each step. If needed it’ll update the Jira, send a customer a ping in Slack to let them know it’s merged and deploying and for them to test it out, and if things go wrong and need to roll back based on alerts or logs it’ll escalate to me.
Individually I could approve each step and sandbox it but that would limit how many of these things I can get going in parallel. Things have been OK for at least 6 months now with this flow. I suspect I could scale up to even more parallel agents if I could get this flow off of my machine but I dont think I’d ever go back to approving each of the steps. It would have to be on a new machine primarily to get a new identity which is slightly less scary but again no way I’m approving things step by step again.
It’s definitely scary to start with but once you are cooking it’s great.
No?
All issues will be fixed today.
No?
It's early days, the models will improve and fix all issues.
If you have bought it and have problems you aren't spending enough in it to fix them.
Then finally, if you did spend enough money, you really haven't, but the problems you have are not anthropics problems even when they are. Spend more money and do free advertising for the company anyways.
Why would you use a tool that creates tedious and dangerous work for you?
“Oh you are just supposed to make up for Claude’s errors, and problem solved!”
What do you make of that part of the article?
Dumb if you don’t turn on auto-mode, dumb if auto-mode commits .claude.
No way to hold it right I guess?
If it's keys or secrets of any kind, you're even dumber.
If it's in a hidden directory, you are even dumber still.
If you rely on somebody stupid enough to do any of that not to commit it, you have gone beyond the valley of the ultra-dumb. Actually that's true even if you rely on smart people not to do it.
You got your dumb card fully punched when you created `.keys` to begin with.
and teach Claude to not git add .
While we're at it, maybe we can also discourage the spurious use of -f for rm -- me personal pet peave
It already doesn't do this. This is from users committing the `.claude` directory themselves.
> Ask Claude Code to check a database or call an API, and the command it proposes carries the secret from your config file. It asks before running it. Pick "Yes, and don't ask again" and it saves that exact command, secret included, to .claude/settings.local.json inside the project folder. Nothing in the repo marks that file as private, so it gets committed with the rest of the code.
Why are these repos not gitignoring the .claude folder?
Although, I feel that it would make more sense to not have a .claude folder inside of the project to begin with. Instead use the ~/.claude/porject/<project_path> folder, like you do for the memory files to store anything related to the project. This solves the problem and at the same time is a cleaner architectural choice in my opinion.
Boris, this comes off as incredibly tone deaf. I don’t want to trust the machine. Trusting the machine is how we end up here. I want to specify exact, deterministic rules that are always followed.
> "but we are looking into what we can do to prevent this"
I would presume that CC's auto-review of tool-call turns would already solve this >99% of the time, no? From my read, any harness-side deterministic solution here would be saving the user from themselves, which seems like a bad pattern. Somewhat dulling the scalpel in my mind.
If we've already crossed the bridge to being confident in a non-deterministic reviewer for auto-mode, then, I see no obvious reason as to why we couldn't have the proposed rules be generated by a model. If that were reality, then- all rules placed in settings.local could be secretless, with the confidence of whatever model we tell 'make sure the rule does not contain secret material, consider its destination as potentially public'.
[1] https://code.claude.com/docs/en/permissions#wildcard-pattern... AFAICT, CC will either save off a prefix+wildcard rule, or exact command. Sounds like the former is likely not the cause of the problem here.
Otherwise you need a broker that can verify chain of trust for the workload, but that's significantly more complexity if you're pitching a harness/app.
This is bullshit.
I'm one of the people who actually reads the commands, and it doesn't always get stuff right. Please don't delude yourself into thinking "auto mode" is some magic that's the right fit for everyone and every situation.
Okay, sorry, I am out. It's too beautiful a day to have silly arguments.
Use this instead for free https://github.com/awslabs/git-secrets
This is such a typical blame the user response. You realize if I’m a sysadmin managing fleets of machines, this is an actual wake up in a cold sweat nightmare, even if those files never leave disk? In the past it was less a big deal, way bigger now that your machine god will just download packages and libs that have upstream malware that aggressively scans the file system for stuff like this. guess where it’s going to look first?
have more humility. jesus.
If only tools, including major ones, actually did that. Plenty of the biggest package managers in the world still write API keys in plain text to files. uv and npm are two of them.
claude unleashed on an organization is a whole other beast.
Instead of telling people they're holding it wrong, make it safe to be held however they could hold it.
Wait, I'm confused. You said yourself coding was solved, surely all you need to do is ask your AI God to come up with an idea, right?
You should be careful about trying to dictate what your customers are doing. They may understand security, and PR for that matter, better than you do. The current evidence makes that certain in many cases.
I’m wondering if it’s just me or does this response sound like it’s coming from someone who is out of touch with the reality of how people are using their product and instead of being empathetic, curious, and helpful is telling people in so many words it’s not our fault, you’re doing it wrong and “everyone” should be doing it the “right” way, which is how we do it.
I know it might come as a shock but not everyone who uses product has read the docs.
Also there is arguably nothing about using AI harnesses that’s “old hat” The technology came on the mainstream radar this year. Most people who use harnesses are still figuring out how to use them. And the rest of humanity probably doesn’t even know what the terms means.
Rather than telling everyone how they got it wrong, maybe next time you can elaborate on something like what “we are looking into what we can do to prevent this” means.
For the record, besides finding Claude overzealous and Anthropic’s usage limits relatively stingy (at least back in April when I dropped them), it was the arrogance of Anthropic’s staff and their public pontificating that led me to rolling with Codex, Gemini, and Qwen as my model stack.
You have to wonder how much of the AI backlash is driven by people not feeling how industry insiders communicate with them.
Anyways, we need good homegrown AI solutions. So, I’m hoping Anthropic follows through on helping prevent future incidents. And the other labs are paying attention so their leadership aren’t the next ones on HN playing defense when their products get called out.
Ref: https://www.anthropic.com/research/investigating-unintended-...
No thanks.
"you are holding it wrong". No, it's not an excuse. Every mode should work correctly, or should not be selectable.
Then don't put it in the fucking tree, you idiots.
No, .gitignore is obviously not enough.
Then you can have it your way :))
i bet most of the commited ones were done by claude because nobody else us gonna care to make it
The linked docs have an unmistakable slop aura, with the extreme overuse of commas that recent models seem to love. I don't blame people for not referring to them (also because, you know, the whole thing with AI is not having to read, think, or understand for yourself)
More and more it seems we are being prescribed a particular way to use Claude Code: move fast, break things, do not look at the edits, etc. Basically, Claude Code is designed for vibe-coding.
I hate this, and I suspect a lot of devs do too. I use the TUI, and believe it or not, I like to review every edit or change before Claude makes it. I used to allow auto mode and don't ask again sometimes in the past, but now almost never do. The number of incredibly nonsensical things I catch Claude trying to do sometime just reinforced my commitment to this way of working.
So now this idea that permissions are old hat and auto mode is the way to go rubs me the wrong way, very much. And here are a litany of other ways Claude Code TUI is making it hard for me to work:
1. Scroll-back glitches, too numerous to enumerate. Suffice it to say I rely on it a lot, to refer back to something the agent said before, to review the general progression of the session, etc, etc. And it barely works now: missing/overwritten conversation text, messages that have inexplicably disappeared; even sometimes the agent own last response is garbled or hidden or overwritten by some previous message that keeps floating on top.
2. I use iTerm2 on macOS, and frequently use split panes. Whenever change the width of a pane, Claude Code messes up the conversation text so that is often unreadable, and nothing I do will restore it.
3. As other sibling comments have noted, the current preference of Claude to use incomprehensible scripts for editing files is off-putting and a hindrance to being in control of my work. I have resorted to using the permissions setting to ban it from using Go, Perl, Python, and sed (for in pace editing), etc, to cope with this.
4. Even basic text editing is messed up in Claude Code TUI. I used to be able to navigate around lines effectively by using up/down keys; this was removed, which has significantly impacted by work. I cannot disable copying on selection, which I don;t want, because if I disable it, the copying does not work at all, etc
At this point, due to all the impediments Claude Code places to my style of working, the only reasonable conclusion I can reach is: I am supposed to be vibe coding, letting the agents loose to vomit out massive amounts of slop. But if vibe coding of the Claude Code TUI itself is producing such garbage, why should anyone be convinced that it is a good thing?
I will never let Claude Code loose to do its thing; I will not surrender my control to it, no matter how much many times I hear I no longer need to look at code.
I don't mind. I put it out there for everyone to borrow ideas from it. There's documentation too.
While you're at it, please bring Claude Code up to par in Windows with the OS level sandboxing (Job Objects, AppContainer).
There are actually many things you can (and I think should) be doing.
And to recommend auto made to devs is absolutely crazy.
Have a nice day
When knowledgeable people show up to address concerns on HN, that's good for all of us. We don't need you to like or agree with what they say, but we do need you to follow HN's guidelines.
Threads like this can easily turn into mob dynamics—it has happened before—and when they do, that's bad for all of us.
https://news.ycombinator.com/newsguidelines.html
https://news.ycombinator.com/newsguidelines.html
So pressing “Don’t Ask Again” by itself doesn’t expose passwords by itself. If you commit your local Claude settings and in those settings you have manually approved commands containing secrets directly in the command and then you publish the repo, that’s exposed.
A fresh clone wouldn’t have the file. This claim doesn't make any sense.
The only way I can see this getting committed is if someone edited their global .gitignore or, more likely, did a whole directory transfer to do a different machine to work on.
The silver lining in all this is all of us very experienced "ancient" software practitioners will likely be in demand again. In a sane world, of course.
Anyways this probably indicates that these repos don’t have a good code review process. The settings.local.json file name screams it’s local and shouldn’t be committed.
> Don't post generated text or AI-edited text. HN is for conversation between humans.
Also, it's wrong. Many people have since replied pointing out the basic error it made
No matter whether it's AI generated (I can't tell) or correct (it's not), it makes no sense to flag the response by the author.
How have you determined that?
Furthermore, I have also noticed the error. I can still see it happening. Sandboxed agent, no access to global git ignore. Creates a new one after putting the secret in `.claude`. Same developer, same machine, fresh sandbox. No access to the original sandbox's global gitignore. Secret already on the project. Commit and push. Secret leaked.
The best solution I've been able to come up is using an ephemeral vm (on an isolated network) per task, using --dangerously-skip-permissions so it doesn't bother me. I couple that with an API proxy that lets me restrict the permissions it has to external services. So e.g. where a quickbooks API key gives the holder "god mode" access, the proxy lets the agent do certain read commands without confirmation, but all write endpoints except uploading receipts require confirmation on my phone before they'll be allowed to hit the quickbooks servers. I no longer need to trust that the agent will interpret my readonly wishes correctly.
Tooting my own horn here, but this setup works incredibly well! I've been able to connect dozens of services safely where I absolutely do not trust giving raw, overpowered credentials or oauth integration to the agent directly. I actually just released the API proxy today at https://keycontain.com
Consider reframing. Is the problem really that the task is tedious? Or that it's required? Maybe you should be leaning more on deterministic automations (which the LLM can help set up) rather than LLM-powered ones.
- Research and buy me a domain name for xyz product, set up all of its DNS the way I want for this product, set up email, set up app store submissions including screenshots and description, set up firebase notifications, set up my Google cloud project and any apis I need to enable for this app, deal with app store review feedback.
- Do an audit of my books, make sure every transaction has a receipt uploaded, and make sure the receipt matches the journal entry. Pull statements from all my my bank accounts and reconcile against my books. Fix mistaken transactions with my confirmation.
- Freely push to my source control, but only to specific branch prefixes (surprised that GitHub, gitlab, gitea, etc don't have this built in already). Merge with my confirmation.
- Freely read the subject lines in my Gmail and full emails from my accountant, freely search emails (but still can't read them), freely compose drafts, ask me to read full emails other than my accountant's, ask me to send drafts. No way for it to read password reset links, for example.
Not to mention that I only have to have a single key that gives access to all my services. If the key leaks, I just have to rotate one key because the agent never has access to the 30 upstream service keys. If I need to give weaker or stronger keys for a specific agent, I can easily configure that in one place (and I can even request that the agent make that change for me with my confirmation). I don't need to create 20 new keys every time, and I don't need to remember the intricacies of every upstream service's UI for creating new keys.
Edit: forgot to mention one more really convenient thing the API proxy enables: I can ask my agent to just configure things for me e.g. changing CI settings, adding Google workspace users or groups, etc. without having to use the to UI. So now nearly all of the admin configuration for all services is done from a single interface (my agent cli)
For instance: that's a ton of surface area. Did you have your AI agent decide which endpoint is destructive or did you manually do this?
For instance: has this classification been wrong?
I ask this because I've used a similar thing before and it failed in the ways I've named.
This setup also permits your agent to exfiltrate enormously sensitive data (website gives the example of QuickBooks invoices and Cloudflare config) without your involvement.
And yes, it has tried to make bad requests! Which it wasn't able to do because it was either rejected outright or asked me for confirmation and I didn't let it through.
The "surface area" you're talking about is just the coverage of the service APIs, which is there just as a nicety to give a semantic preview of what the request is about to do e.g. we know what a gmail request looks like so we can render a preview of the attachment the agent is sending so you can inspect it. Otherwise you'd have to inspect each http request (which you can always do by using the generic http acl).
I somewhat agree with "exfiltrate enormously sensitive data". The thing I'm paranoid about is catastrophic mistakes that can instantly kill the business e.g. "Oops I sold the domain name". Leaking financials is not great, but also not catastrophic. Deleting all our books would be catastrophic, which the underlying QuickBooks key allows you to do!
But in any case, you can choose your level of paranoia and give exactly the amount of access you're comfortable with. For example, I view read access to emails as catastrophic (must worse than read access to financials), so I don't let it do that.
If you post output from AI, please remember to edit before publishing
so your question is “What’s it like to be a meat proxy?” which might be taken as trolling
No editing required.
/s because humans probably need it.
Use a private dev repo and do all your dev inside it.
Releases go to a seperate public repo
In the private dev repo use a script which Cherry picks release files from a whitelist that you maintain in the public repo.
Essentially, you define the files and folder structure of a release and that ensures every release looks great with no cruft and it's never going to have .secret.json in or whatever
Hardcoded secrets is seperate and you can have another script to grep for those
https://news.ycombinator.com/item?id=45478553
https://codeberg.org/manchicken/1password-cli-vuln-disclosur...
Risk of exposing a single credential is nothing compared to the risk of exposing everything through op cli’s expected behavior. Has there been any improvement on this?
Belt and braces on top of that:
- add .claude/settings.local.json to a global gitignore (git config --global core.excludesFile), not just the repo's, so a fresh clone or `git add .` can't pick it up
- run a secret scanner like gitleaks as a pre-commit hook; it catches this and the classic .env commit
- if you find a hit, rotate first and clean history second. Once it's been public, deleting the file doesn't un-leak it.
https://github.com/anthropics/claude-code/issues/13106
Two rules that stuck for us: secrets go into commands only via env vars ($TOKEN, never the value), and .claude/ lives in the machine-wide global gitignore, not in the repo. With those, "Don't ask again" is fine and a commit has nothing to leak.
Example
``` # cat -A /tmp/foo/bar/baz.md
# permission options cat -A /tmp/foo/bar/baz.md cat /tmp/foo/bar/baz.md cat /tmp/foo/bar/* cat /tmp/* cat * ```
I'm sure there's improvements to make but I always found it silly to over complicate the permissions if I'm trying to prevent common operations from being prevented
Here's a few for Pi: https://pi.dev/packages/@k3_2o/pi-secrets https://pi.dev/packages/@spences10/pi-redact https://pi.dev/packages/keyshroud
A couple for OpenCode: https://github.com/boxpositron/envsitter-guard https://github.com/kenryu42/cc-safety-net https://github.com/inkdust2021/opencode-vibeguard
I always have it write a script and then write the secret to a different file myself, then instruct the agent to use the secret file in the script. That way the secret never goes through an external entity.
I had thought this was common sense but now I’m realizing of course it isn’t, we have people with minimal experience using these tools and they don’t even consider that sending their bank password (or whatever) to a third party (even a relatively trustworthy one) is extremely risky.
you might point gitleaks at it: gitleaks dir ~/.claude/projects
We released a free Secret Hygiene Skill, Node and git only and nothing sent anywhere, that checks your project, built npm package and machine for them, never prints a secret, and tells you what to rotate first: vektormemory.com/downloads.
Or am I missing something
Even then, you might not want every developer in your company to have the password to the production SQL database...
Tools like AgentSecrets, infiscal, Doppler. People just don't want to invest in securing their credentials, maybe because the majority don't realize that credentials are the crux of inter software communication. It's literally access to your services.
Review your code before committing. Do code reviews on PRs.
secrets, encryption, publishing to public internet, scanning for vulnerabilities in your packages etc. etc. you need to take your own responsibility for and never rely on some bot automation or third party.
that includes if its important projects not relying on scanning tools but opening files yourself and verifying what's in there.
read things before you put them in a place where everyone can see them forever....
this is basic stuff. you guys did it beforen LLMs surely.
YOU are responsible. not Claude, not any external vendor, not any downloaded script. You as a person.
Sandbox don’t scale anymore and secrets or confidential files shouldn’t be exposed to frontier models.
I find it pretty annoying when someone commits their harness specific files into a repo - put that stuff under $HOME/.claude/
From the head of Claude Code, Boris Cherny
https://www.lennysnewsletter.com/p/head-of-claude-code-what-...
My comment is somewhat tongue in cheek: I know that Claude Code (and AI agents generally) do not mean the end of software engineering altogether, because I have been creating code with AI for a year, written a coding harness, and have non-coder colleagues who use said harness to create software.
But "where people get that from" is precisely from the same guy who is now saying "oh well, if you're going to commit your passwords then well!! you should know better than that!!"
"I think by the end of the year, everyone is going to be a product manager, and everyone codes. The title software engineer is going to start to go away"
Or this:
"Someone has to prompt the Claudes, talk to customers, coordinate with other teams, decide what to build next"
https://x.com/bcherny/status/2022762422302576970
He doesn't mention "configure the git repository so we don't accidentally publish our passwords". That would sound WAY less impressive.
Dario has gone out and said that AI will cause mass unemployment. He said that AI could do 50% of jobs within 1 - 5 years.
OpenAI are much less flagrant with this shit but Anthropic have been banging the drum that their coding agents can fully replace workers for ages, at every available opportunity, and then something as fucking fundamental as publishing passwords shows up and he's all like "Oh well, you shouldn't do that should you that's obvious!!".
It's massive bullshit artistry.
But something like fully configuring a git repo isn't really the concern of a software engineer, per se; their concern is to create code that works, and git is just something to help with managing and passing on their creation. It's the one with the devops role who's really responsible for publication aspects (of course the same person may be doing both creation and publication) and should be ensuring repos don't have things committed which shouldn't be published (or even security if that's a separate role).
> Dario has gone out and said [...]
Different person from Cherny, but also I don't see anyone giving reasonable arguments as to why his prediction may be incorrect, only a lot of outrage. And I'm inclined to agree that AI will be able to do a lot of jobs; it's already on the way with quite a few, for example the software engineer role. I for one have been successfully using Claude Code for said role, while I handle the other aspects, and as it becomes good enough at other things I'll keep handing off more of the software production process to it.
I mean it'd be crazy if this worked:
https://github.com/search?q=path%3A**%2F.claude%2F*.json+CLI...
oh look..
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
They violate it so regularly that my “git” command is now a wrapper, when the agent fucks up and tries to add/commit-all anyway, it now gets a nastygram error chiding it for not following instructions.
For all the same reasons they used it pre-LLM for hand-written toy projects.
This incident would have been caught in an open source harness. This one is closed source malware, and you don't know what Claude Code does internally to behave like this.
Yet another reason why you cannot trust a closed harness.
Same thing could/would happen with an open source harness.
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
Could open source harnesses do that? Sure, if they were programmed in a similar fashion as Claude Code. Do you have any evidence of it happening?
None of this has anything to do with open vs. closed source.
Humans do it!