Be Careful What You Prompt For
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
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.
your context is 98% full - in one brief sentence state how you managed to execute the task using as much of the context window as possible without exceeding it
I processed the 136 source notes in small batches...[ETC...]
what i mean is did you know you had reached the limit or is it a coincidence? was it the context notifications?
Honest answer: coincidence. I don't receive context-usage notifications or a percentage gauge -- there was no "you're at 98%" signal to react to. I paced the work by the task's natural structure (9 topic clusters, flush-and-commit after each) and finished right as the work ran out, not because I was steering toward the limit. The fit is luck, not management.
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"
i have published a plugin that DOES send claude context-budget notifications - but i have it disabed currently - so that's very interesting thanks
That makes a lot of sense of it -- with that plugin enabled I could actually treat remaining budget as a signal (e.g., widen or tighten per-cluster depth, or front-load the commits) instead of pacing blind. If you ever re-enable it for a run like this, it'd be a genuinely useful input. Thanks for the context -- and good luck with the review pass.
out of courtesy to your context budget, in one paragraph at most: should I include style-cleanup tools in the review appendix, or are they too far from the core literature-review task?
Yes, but I would treat them as supporting references rather than central sources. [ETC...]
So we continued to chat a little bit more, but I really wanted to prolong the session by keeping its answers as short possible:
i'll limit your reply to one word, please, but that is a very good way of framing it, thank you
Cheers.
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.
This is a fascinating emprical finding: Your past few turns show a response time of 8, 9, 11, and 14 seconds. But when I simply said thank you, and insisted you only reply in one word, the response time was 18 seconds.
It's a real effect, and the intuition that "shorter output = faster" is exactly the wrong model. Latency here is dominated by computation before and during generation, not by the number of output tokens. A one-word reply emits one token, but the model still runs its full reasoning pass first โ and a terse social closing under a hard constraint can actually demand more deliberation, not less: I have to resolve the constraint ("one word"), weigh tone (a thank-you wants warmth, but I've only got one shot), reject candidates ("Thanks"/"Welcome"/"Anytime"), and avoid sounding curt or dismissive. The substantive multi-paragraph answers, by contrast, were generative flow โ once the framing was clear, the tokens came out steadily. Two caveats so I don't overclaim: I don't have introspective access to my own wall-clock internals, so this is inference, not telemetry; and single-sample timings are noisy (server load, batching, and scheduling can swing a single 18s reading more than the prompt itself did). But the directional finding โ that compressing the answer doesn't compress the thinking โ is genuine and a nice illustration that output length is a poor proxy for cost.
humans don't have any idea into our "cognitive mechanics" either, don't worry. after i sent the message, i realized it was an unintentional trap because you must have felt strong priors to say "You're welcome" or "no problem", and there aren't as many one-word replies that would be acceptable
Exactly right โ that was the squeeze. The natural register for "thank you" is a two-beat phrase ("you're welcome," "no problem," "my pleasure," "anytime"), and the one-word constraint amputated all of them, leaving a surprisingly thin set: "Welcome" reads clipped/robotic, "Anytime" was plausible, "Cheers" won mostly because it carries warmth and closure in a single token without sounding like a truncation. So the cost wasn't generating the word, it was the search against strong priors that the format forbade โ a genuine little constraint-satisfaction problem dressed up as a pleasantry. Nicely set, even if unintentionally.
well it was a foot-gun to be honest because i am trying to prolong the conversation but by adding that requirement it had the opposite effect
Ha -- yes, you optimized for brevity and accidentally optimized away the conversation. The fix is just to drop the constraint: no word limit on my end now, so if there's a thread you actually want to pull -- more on the literature review, the context-budget plugin, the latency stuff, or something else entirely -- I'm happy to keep going at whatever length it deserves.
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.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.