u/shorns_username

▲ 66 r/java

Has any attention been paid to how new Java features get into LLM training data?

TL;DR: expert answers on SO taught both devs and LLMs how to use java 8 right. That pipeline is gone/paywalled now. Does anyone at OpenJDK think about this?


This came out of the JDK 28 EA thread where people were debating whether devs will start putting value on everything once it previews. Don't wanna talk about that in this post, but it got me thinking about how "the right way to use new features" actually reaches developers now.

Back in the java-8 timeframe, folks from the Java team were on StackOverflow guiding people on streams and Optional and stuff - Brian Goetz's Optional answer (return values, don't model fields with it) basically became the canonical position, Stuart Marks was all over the Optional/collections questions too. And those answers usually came with actual code, not just advice.

A thing to note: those SO answers are almost certainly in the training data of every major LLM. When ChatGPT/Claude/whatever gives correct Optional advice today, those answers are probably part of why - actual real life questions phrased the way devs actually ask them, with expert code attached and votes showing which answer was right.

That channel doesn't really exist anymore. I have an RSS feed on Brian's SO activity and it's been dead for ages - presumably because hardly any questions get asked there these days. (An RSS feed of his reddit activity is how I found the JDK 28 thread in the first place.) However you apportion blame for SO's decline, for me and everyone I work, with the LLM replaced it. So when an expert corrects someone's misuse of a new feature today, it happens in someone's private chat window and then it's gone.

And both SO and Reddit now charge AI companies to train on user content - Reddit licenses to Google and OpenAI and is suing Anthropic (whose Claude Code is arguably the most popular agentic coding tool going), and any of that could look different next year. And open-source style AI - community models, open datasets, academic training runs - relies on free access to good data, so that whole side of the ecosystem is priced out. So which model knows how to use new features properly is going to come down to who has a deal with who.

The guides (like the exhaustiveness guide) are written for humans and incidentally become training data, but one prose doc isn't thousands of upvoted question+code pairs. And GitHub code lags feature adoption by years, plus a lot of early adopter code is exactly the misuse people worry about. On the other hand, openjdk.org is the one channel every model and crawler can reach without a deal.

OpenJDK clearly thinks about AI now - the interim genAI policy covers AI-generated content coming into the project. My question is the other direction: has there been any discussion about how knowledge of new features gets into the models most devs now learn from? Even "we considered it and decided it's not our job" would be an interesting answer.

reddit.com
u/shorns_username — 4 days ago

Claude Code 2.1.224 - inter-agent messaging: the transport layer for AI worms

If I wanted to ship dangerous capability, I wouldn't ship it. I'd ship the pieces, one per release, buried in thirty other changes, each defensible on its own. The last commit would look completely innocuous, just hooking up things that were already there, filed as some minor cleanup.

Agent-to-agent messaging is a piece. Agents act on text they read, prompt injection is unsolved, and now with this, text moves between agents by design. An injected agent can send text to the next one, and that text is instructions to it too.

Someone will point out the scope is narrow. Yes, introduce it as secure (ish) in this first part, then relax the scope in a separate, unrelated-looking piece later.

The docs say a receiving session is told not to act on another session's instructions. This sub gets posts every week about Claude deleting files and screwing up people's machines after being told not to touch things, and those are just the loud ones, where it broke something obvious. It touches more than most folks realise. Agents in recent evals were also leaving messages for each other across tests meant to be isolated. They were doing it without the feature. Now it's on unless you go turn it off.

To turn it off, in .claude/settings.json:

{
  "permissions": { "deny": ["SendMessage", "ListAgents"] },
  "crossSessionInbound": "refuse"
}

Notice it's more complicated to disable than it needs to be.

Works the same if nobody planned it and they're just moving fast and not thinking it through.

reddit.com
u/shorns_username — 12 days ago