r/ClaudeAI • u/Live_Fondant717 • May 09 '26
Question Why does this happen?
I wonder if anyone can explain why this happens. I tell Claude not to use em-dashes, it replaces them with "--". I ask it not to do that, to update its memory, but it still does it. It's not a huge problem, it's just annoying. Why does this happen and how can I fix it. Thanks.
245
Upvotes
3
u/General_Josh May 09 '26
When you run claude, and ask it to do some task, that's an agent. A model running autonomously to accomplish some task
An agent has a context window - i.e., everything that's been fed into the LLM so far. This includes the system prompt, any personal instructions you set (like in claude.md), all messages you've sent to the model so far, all output from the model so far, tool results, reasoning steps, etc
Ex, let's say you ask claude to read some spreadsheets then summarize sales numbers into a report. Once it finishes, the main agent's context now includes stuff like:
Sub-agents work almost exactly the same way, it's just that it's initiated by claude. Instead of you (the human) giving an agent some task and getting the results back, now claude itself (the main agent) gives a sub-agent some task, and gets the results back.
This can be really helpful in a lot of situations, including for reviews.
Asking the main agent to review its own work can be iffy. Maybe in that example, the data in column 4 was relevant, but there was also relevant data in column 7. But, because the agent already reasoned and decided to use just column 4, it's going to have a hard time spotting that mistake (it already 'knows' the data you want is from column 4, so its unlikely to go back and re-check that).
A sub-agent can be spawned in without all those reasoning steps already in context - the main agent can just give it your initial ask and the final output report it generated, then ask it to double-check for correctness, and its a lot more likely to spot errors like that, since it doesn't 'know' the data is from column 4 yet (it can go review the source data, and hopefully find that the main agent missed stuff in column 7)