logoalt Hacker News

ryankrage77yesterday at 10:16 PM17 repliesview on HN

> Why are you continually ignoring my stop hooks?

Why are you asking the token predictor about the tokens it predicted? There's no internal thought process to dissect, an LLM has no more idea why it did or did not 'do' something, than the apple knows why it falls towards the earth.


Replies

jstummbilligyesterday at 11:02 PM

Simple: You can ask a LLM and can get a good explanation for why it did something, that will help you avoid bad behavior next time.

Is that reasoning? Does it know? I might care about those questions in another context but here I don't have to. It simply works (not all the time, but increasingly so with better models in my experience.)

show 1 reply
bcrosby95yesterday at 10:52 PM

The hilarious thing is LLMs tend not to say "I don't know", so it might find a reason, but if it doesn't, it will just make shit up.

gwerbinyesterday at 10:55 PM

This is just goofy prompting.

I have good success when I ask the agent to help me debug the harness. "Help me debug why Claude Code is ignoring my hook".

JoshuaDavidtoday at 1:35 AM

You can treat the LLM's answers ass hypotheses about why it did what it did, and test those hypotheses. The hypotheses the LLM comes up with might be better than the ones you come up with, because the LLM has seen a lot more text than you have, and particularly has seen a lot more of its own outputs than you have (e.g. from training to use other instances of itself as subagents).

k1w1yesterday at 11:23 PM

> Why are you asking the token predictor about the tokens it predicted?

I am surprised with this response because it implies this is not an extremely valuable technique. I ask LLMs all the time why they did or output something and they will usually provide extremely useful information. They will help me find where in the prompting I had conflicting or underspecified requirements. The more complex the agent scenario, the more valuable the agent becomes in debugging itself.

Perhaps in this case the problem with hooks is part of the deterministic Claude Code source code, and not under the control of the LLM anyway. So it may not have been able to help.

raframyesterday at 10:57 PM

Its context includes reasoning that you can’t see, so this is actually a reasonable thing to ask.

vanviegenyesterday at 10:59 PM

The behavior may well be due to a bug/ambiguity in the context presented to the LLM. Because we, as mere users, don't easily get to see the full context (and if we did, we might feel a little overwhelmed) asking the LLM about why it did what it did seems like a reasonable approach to surface such a bug. Or it might even turn out to be a hook configuration error on the user's part.

skybriantoday at 12:59 AM

That’s a bit strong. A coding agent doesn’t know, but they’re pretty good at debugging problems. It can speculate about possible fixes based on its context.

KaseKunyesterday at 11:24 PM

I can picture this comment at the 50th percentile on the midwit meme

On either side it says "I just ask the model why it did that"

supern0vayesterday at 11:40 PM

>Why are you asking the token predictor about the tokens it predicted?

In fairness, humans are quite bad at this as well. You can do years of therapy and discover that while you thought/told people that you did X because of Y, that you actually did X because of Z.

Most people don't actually understand why they do the things they do. I'm not entirely unconvinced that therapy isn't just something akin to filling your running context window in an attempt to understand why your neurons are weighted the way they are.

show 2 replies
sweezyjeezyyesterday at 10:55 PM

The model should show some facsimile of understanding that it should not ignore the stop hook, otherwise that is a regression. Does that wording make you happier?

show 1 reply
j45yesterday at 11:10 PM

This is odd.

When things like this surface, I try to see how I focused on the gap leading up to it, and trying to fix it, and hope I am not focusing on the gap and questioning can draw attention to it and reinforcing it. This means more attention is drawn to what is not wanted by questioning it, instead of being clear that the intention is to ensure in all cases, shapes and forms it no longer happens.

Instead, mention what you require, repeatedly, and also mention what you do not want ever to happen and it might be different.

whalesaladyesterday at 10:31 PM

the model doesnt, but claude code does.

randallyesterday at 10:23 PM

this isn't strictly true. not that it thinks, but it can reason about the tokens that led to the outcome.

show 1 reply
dnnddidiejyesterday at 11:32 PM

Incorrect. LLMs are good at solving problems. Even ones where they need to pull fluff from their own navel.