Live data from Hacker News

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

alex000kim.com

601–610 of 636 posts

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

#601

Earlier quoted context omitted.

> because with the copyright office, you have a DUTY TO DISCLOSE any AI generated work, I was not aware of that. WHo has that duty and when do they have it?

Currently, the US copyright application process has an AI disclosure requirement for the determination of applicability of submitted works for protections under US copyright law. The copyright office still holds that human authorship is a core tenet of copyrightability, however, whether or not a submission meets the "de minimis" amount of AI-generated material to uphold a copyright claim is still being decided and re…

You do not apply for copyright. In the US you can, optionally, register a copyright. You do not have to, but it can increase how much you get if you go to court.

I do not know whether any other country even has copyright registration.

Your main point that this is something the courts (or new legislation) will decide is, of course, correct. I am inclined to think this is only a problem for people who are vibe coding. The moment a human contributes to the code that bit is definitely covered by copyright, and unless you can clearly separate out human and AI contributed bits saying the AI written bits are not covered is not going to make a practical difference.

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

#602
post #434

Earlier quoted context omitted.

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 doesn't work so well in my experience. I am currently wrapping (or asking the LLM to wrap) the commit message prompt in a script call. 1. the LLM is instructed on how to write a commit message and never include co-authorship 2. the LLM is asked to produce a commit message 3. the LLM output is parsed by a script which removes co-authorship if the LLM chooses to include it nevertheless

Also for future reference, Copilot - specifically - includes a configuration flag to toggle the co-authorship (see `copilot help config`):

> `includeCoAuthoredBy`: whether to instruct the agent to add a Co-authored-by trailer to git commits; defaults to `true`.

This means that, if you don't explicitely configure otherwise, the LLM is specifically instructed to include co-authorship in its higher level instructions.

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

#604

Earlier quoted context omitted.

Currently, the US copyright application process has an AI disclosure requirement for the determination of applicability of submitted works for protections under US copyright law. The copyright office still holds that human authorship is a core tenet of copyrightability, however, whether or not a submission meets the "de minimis" amount of AI-generated material to uphold a copyright claim is still being decided and re…

You do not apply for copyright. In the US you can, optionally, register a copyright. You do not have to, but it can increase how much you get if you go to court. I do not know whether any other country even has copyright registration. Your main point that this is something the courts (or new legislation) will decide is, of course, correct. I am inclined to think this is only a problem for people who are vibe coding.…

My (limited) understanding was that without formal registration you cannot file any infringement suits against any works protected by said copyright. Then what's the point of the copyright other than getting to use that fancy 'c' superscript?

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

#605

> Frustration detection via regex (yes, regex) /\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful| piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)| fucking? (broken|useless|terrible|awful|horrible)|fuck you| screw (this|you)|so frustrating|this sucks|damn it)\b/ Personally, I'm generally polite even towards AI and even when frustrated. I simply point out the its mistakes instead of using emo…

the list is funny :)

So it counts how many times I was angry?

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

#606

For me one of the most interesting aspects is how compaction works. It turns out compaction still preserves the full original pre-compaction conversation in the session jsonl file, and those are marked as "not to be sent to the API". Which means, even after compaction, if you think something was lost, you can tell CC to "look in the session log files to find details about what we did with XYZ". I knew this before the…

What is microcompaction? I didn’t realize there was any thing time based in CC, when I go eat dinner and come back it compacted while I was gone?

I dug into this more. It's disabled by default, and it's a cost/token-usage optimization.

  The logic is:

  1. Anthropic's API has a server-side prompt cache with a 1-hour TTL
  2. When you're actively using a session, each API call reuses the cached prefix — you only pay
  for new tokens
  3. After 1 hour idle, that cache is guaranteed expired
  4. Your next message will re-send and re-process the entire conversation from scratch — every
  token, full price
  5. So if you have 150K tokens of old Grep/Read/Bash outputs sitting in the conversation, you're
  paying to re-ingest all of that even though it's stale context the model probably doesn't need

  The microcompact says: "since we're paying full price anyway, let's shrink the bill by clearing
  the bulky stuff."

  What's preserved vs lost:
  - The tool_use blocks (what tool was called, with what arguments) — kept
  - The tool_result content (the actual output) — replaced with [Old tool result content cleared]
  - The most recent 5 tool results — kept

  So Claude can still see "I ran Grep for foo in src/" but not the 500-line grep output from 2
  hours ago.

  Does it affect quality? Yes, somewhat — but the tradeoff is that without it, you're paying
  potentially tens of thousands of tokens to re-ingest stale tool outputs that the model already
  acted on. And remember, if the conversation is long enough, full compaction would have summarized
   those messages anyway.

  And critically: this is disabled by default (enabled: false in timeBasedMCConfig.ts:31). It's
  behind a GrowthBook feature flag that Anthropic controls server-side. So unless they've flipped
  it on for your account, it's not happening to you.

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

#607
post #580

Earlier quoted context omitted.

Since when is code considered > which is published with the purpose of informing the public on matters of public interest From your link, that's the only case where text needs to be attributed to AI.

Good question. Actually, i was assuming that at least source code is treated as text under the legal regime (there is typically special rules in copyright law, but provision applying to text should apply). Furthermore I would think pull requests, etc are all text. So I would think this applies.

But it's not just text. Once again, it's explicitly defined as:

> which is published with the purpose of informing the public on matters of public interest

There is no "informing public on matters of public interest" in source code nor an MR. It's clearly meant to prevent "deepfake" news, like the image and video ones explicitly call that out.

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

#608
post #585

Earlier quoted context omitted.

I guess Im sometimes dishonest when it suits me

It's only dishonest not to include Claude in commit/PR attribution if it's also dishonest not to include StackOverflow, or VSCode, or VIM, or Windows, or any of the other tools you used to complete the work!

That's a so invalid analogy, editors are effectively tools just like as a hammer because they require constant human input to produce something, the human is in constant control over the whole production process so they don't need to give attribution to the individual tools they used to build a house...

Unlike a black magic box where you just tell it to build something and it does all the production for you while you sit back.

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

#609

For me one of the most interesting aspects is how compaction works. It turns out compaction still preserves the full original pre-compaction conversation in the session jsonl file, and those are marked as "not to be sent to the API". Which means, even after compaction, if you think something was lost, you can tell CC to "look in the session log files to find details about what we did with XYZ". I knew this before the…

[flagged]

> it's basically a cost optimization masquerading as a feature

Cost optimization in the user's favor.

Remember that every time you send a new message to the LLM, you are actually sending the entire conversation again with that added last message to the LLM.

Remember that LLMs are fixed functions, the only variable is the context input (and temperature, sure).

Naively, this would lead to quadratic consumption of your token quota, which would get ridiculously expensive as conversations stretch into current 100k-1M context windows.

To solve this, AI providers cache the context on the GPU, and only charge you for the delta in the conversation/context. But they're not going to keep that GPU cache warm for you forever, so it'll time out after some inactivity.

So the microcompaction-on-idle happens to soften the token consumption blow after you've stepped away for lunch, your context cache has been flushed by the AI provider, and you basically have to spend tokens to restart your conversation from scratch.

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

#610
post #580

Earlier quoted context omitted.

Good question. Actually, i was assuming that at least source code is treated as text under the legal regime (there is typically special rules in copyright law, but provision applying to text should apply). Furthermore I would think pull requests, etc are all text. So I would think this applies.

But it's not just text. Once again, it's explicitly defined as: > which is published with the purpose of informing the public on matters of public interest There is no "informing public on matters of public interest" in source code nor an MR. It's clearly meant to prevent "deepfake" news, like the image and video ones explicitly call that out.

You are absolutely right. However, the recitals point clearly beyond only protection against fake news. IMHO running such an agent in stealth mode can easily be illegal, Articl 50 (1) states : > Providers shall ensure that AI systems intended to interact directly with natural persons are designed and developed in such a way that the natural persons concerned are informed that they are interacting with an AI system, unless this is obvious from the point of view of a natural person who is reasonably well-informed, observant and circumspect, taking into account the circumstances and the context of use.
Post reply on HN