A Simple Lesson in Prompting
I asked Claude Code to undertake a task that I knew would take quite a while. It involved lots of reading and I disallowed the use of subagents.
So naturally I set up a /goal and I walked away and when I got back, it had finished the goal that I had set - and its context window was 98% full. So I thought: that's pretty lucky, I wonder if it knew that it was about to run out of context.
Well I knew that normally Claude doesn't get any feedback about its context level. In fact, I thought that was important enough for Claude to know that I built a plug-in specifically for that purpose: "Context Awareness"
So we continued to chat a little bit more, but I really wanted to prolong the session by keeping its answers as short possible:
Now, what I noticed when I said this to Claude - it took a pretty long time to respond. In fact, compared to everything else that we had talked about, I looked at the terminal, where I can see the turn durations, and I noticed that the turn that took the longest - was me saying "Thank you," etc., and Claude responding "Cheers."
And then it was obvious. In fact as soon as I gave that prompt I realized I had put Claude in a trap. Usually it's not that hard to predict what Claude will say in some mundane exchange - but I couldn't figure out how it was going to acknowledge my expression of gratitude (which I'm sure it must do) and also comply with my direct order to use one word.
So this was an interesting lesson for me. I mean of course it's not "always easier to say something briefly" - like explaining a complicated topic in one paragraph. But I understood that already. It never occurred to me that creating a ridiculous puzzle for Claude by asking for just one word - it's something I like to do a lot if Claude is being too chatty and I need "yes"/"no" information - but in this case, it was actively fighting against the priors, for the simple reason that, unlike a lot of languages, English doesn't have a one-word expression for saying thanks that's appropriate for the harness in that context.
The world is just full of footguns, I guess.
Top comments (0)