Live data from Hacker News

The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

alex000kim.com

71–80 of 636 posts

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#71

Earlier quoted context omitted.

Out of curiosity, given two code submissions that are completely identical—one written solely by a human and one assisted by AI—why should its provenance make any difference to you? Is it like fine art, where it’s important that Picasso’s hand drew it? Or is it like an instruction manual, where the author is unimportant? Similarly, would you consider it to be dishonest if my human colleague reviewed and made changes…

Why does the provenance make any difference? Let me increase your options. Option 1: You completely hand-wrote it. Option 2: You were assisted by an AI, but you carefully reviewed it. Option 3: You were assisted by an AI (or the AI wrote the whole thing), and you just said, "looks good, YOLO". Even if the code is line-for-line identical, the difference is in how much trust I am willing to give the code. If I have to…

That's the thing. As someone evaluating pull requests, should you trust the code based on its provenance, or should you trust it based on its content? Automated testing can validate code, but it can't validate people.

ISTM the most efficient and objective solution is to invest in AI more on both sides of the fence.

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#72
post #55

Earlier quoted context omitted.

> my first knee-jerk reaction wouldn't be "this is for pretending to be human"... "Write commit messages as a human developer would — describe only what the code change does."

That seems desirable? Like that's what commit messages are for. Describing the change. Much rather that than the m$ way of putting ads in commit messages

The commit message should complement the code. Ideally, what the code does should not need a separate description, but of course there can be exceptions. Usually, it's more interesting to capture in the commit message what is not in the code: the reason why this approach was chosen and not some other obvious one. Or describe what is missing, and why it isn't needed.

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#73
post #28

I'm amazed at how much of what my past employers would call trade secrets are just being shipped in the source. Including comments that just plainly state the whole business backstory of certain decisions. It's like they discarded all release harnesses and project tracking and just YOLO'd everything into the codebase itself. Edit: Everyone is responding "comments are good" and I can't tell if any of you actually read…

Comments are the ultimate agent coding hack. If you're not using comments, you're doing agent coding wrong. Why? Agents may or may not read docs. It may or may not use skills or tools. It will always read comments "in the line of sight" of the task. You get free long term agent memory with zero infrastructure.

Comments are great for developers. I like having as much design in the repo directly. If not in the code, then in a markdown in the repo.

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#75
post #40

Earlier quoted context omitted.

What does non-undercover do? Where does CC leave metadata mainly? I haven't noticed anything.

it likes mentioning itself in commit messages, though you can just tell it not to.

There is a config setting for this:

https://code.claude.com/docs/en/settings#attribution-setting...

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#77
post #37

There are now several comments that (incorrectly?) interpret the undercover mode as only hiding internal information. Excerpts from the actual prompt[0]: NEVER include in commit messages or PR descriptions: - The phrase "Claude Code" or any mention that you are an AI - Co-Authored-By lines or any other attribution BAD (never write these): - 1-shotted by claude-opus-4-6 - Generated with Claude Code - Co-Authored-By: C…

I would have expected people (maybe a small minority, but that includes myself) to have already instructed Claude to do this. It’s a trivial instruction to add to your CLAUDE.md file.

It's a config setting (probably the same end result though):

https://code.claude.com/docs/en/settings#attribution-setting...

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#79
> Sometimes a regex is the right tool.

I’d argue that in this case, it isn’t. Exhibit 1 (from the earlier thread): https://github.com/anthropics/claude-code/issues/22284. The user reports that this caused their account to be banned: https://news.ycombinator.com/item?id=47588970

Maybe it would be okay as a first filtering step, before doing actual sentiment analysis on the matches. That would at least eliminate obvious false positives (but of course still do nothing about false negatives).

Re: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

#80

The name "Undercover mode" and the line `The phrase "Claude Code" or any mention that you are an AI` sound spooky, but after reading the source my first knee-jerk reaction wouldn't be "this is for pretending to be human" given that the file is largely about hiding Anthropic internal information such as code names. I encourage looking at the source itself in order to draw your conclusions, it's very short: https://git…

> my first knee-jerk reaction wouldn't be "this is for pretending to be human"... "Write commit messages as a human developer would — describe only what the code change does."

As opposed to outputting debugging information, which I wouldnt be surprised if LLMs do output "debug" output blurbs which could include model specific information.
Post reply on HN