r/ClaudeCode • • 4d ago

Tips & Workflows When I feel that the model behaves differently. Steps I try to correct it.

I use a workflow where I have an orchestrator that can spawn sub-agents. The orchestrator usually is Opus on medium for 80% of the projects and Opus high for the rest.

Opus works well or great for most of the time.

But then there are days or weeks where it just starts behaving differently on certain topics than before. While I attribute parts to Anthropic tuning the model most of it usually is found in my process files.

This week I posted about Opus being obsessed with doing trials and asked how others handle it. I thought this was a Claude oddity that others probably also have to deal with. Others didn't had to deal with trials excessive testing came up but not trials. Pointing to my setup doing something wrong.

I spent some time understanding why it always excessively wants to do trials for really minor things.

I found he source of the behavior: And it crept in weeks before. Back then I approved a trial for one specific task (where it made sense) in one specific project. That approval got written into a decision and then into a standing rule. And that got picked up by 7 other projects as a standing rule in the spirit of "The user wants trials give him trials".

I used a Fable agent to do the analysis step by step using the session transcripts and process documents. The first prompt was easy "Find all mentions of trials in the transaction logs and who wrote it. Make me a visual report"

After I pruned all the standing rules regarding trials it stopped proposing or doing them.

This is now one of my growing number of weekly scheduled process maintenance tasks.

  • Analyse process documents for rules that are now fixed rules that may have been unintentional.
  • Analyse growth of starting context and it's composition.
  • Analyse the post compaction hook that injects the most important rules
  • Analyse what type of scripts the agents have re-written constantly -> make a reusable tool/script out of it.
  • Analyse if agents use the provided tools -> update skill and context documents
  • Analyse how often I asked "why did you ..." to find process drift. -> This is my way of understanding where a decision of an agent is coming from. Usually points to a unintentional rule.

Part of the problem was also the constant compaction of core process documents like Agents.md and Orchestrator.md . I try to keep those documents short and concise but they started to lose my initial intent.

This is why I started writing intent documents. They are not part of the projects they are part of my process project used to distill the Agents.md or Orchestrator.md files.

The intent documents are my words and can be as long as I want it. They are usually a list of statements that I find important or that describe how I want things to behave/work. They are basically the uncompressed version of what I want.

I hope this little story is helpful for someone.

0 Upvotes

12 comments sorted by

•

u/AutoModerator 4d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/Far_Reindeer8428 4d ago

we had exactly that, an allow once that became a standing rule because the dialog defaults to remember. now we audit the allow list monthly and every entry has to name its command

1

u/ByteFoundry 4d ago

This is what the weekly scheduled tasks do. I will move some of them to bi-weekly if I see that weekly is too much.

2

u/Free-Half-2015 4d ago

Defaults quietly become policy. Monthly audits are the fix.

2

u/Far_Reindeer8428 4d ago

one-off approvals become rules because nothing ever removes them. the rule list only grows, so every project inherits last month's exception

1

u/ByteFoundry 4d ago

exactly.

2

u/perfektcrash 4d ago

"An approval for one task became a standing rule in seven projects" is the scariest line here, because nothing about it looked wrong when it happened.

I ended up treating rules the way a court treats rulings, not like notes:

  • One yes is a one-off. It stays attached to the task it was given for. Only when I've said the same thing twice does it become a candidate rule, and I write that rule myself.
  • Every rule says where it applies. Rules are matched to file paths, and an agent only gets the rules for the files it's touching. One project's exception never reaches another project.
  • An agent can propose a project-wide rule, but it governs nothing until I say yes. That one gate would have stopped your trials rule: the agent was allowed to write it down, not to make it law.
  • Rules have a review date. When one comes due I keep it or retire it with a reason. Retired, not deleted, so later I can see why it ever existed.
  • The rule book has a size limit. Past the limit, adding one means retiring one. Your weekly audit does the same job; the limit just makes it happen on its own.

Your intent documents are the bit I'd keep exactly as they are: long, in your words, never compacted, with the short agent files made from them and not the other way round.

Disclosure: I build a meta-harness (Atlas ADE) that keeps its rules this way, but nothing above needs it.

1

u/ByteFoundry 4d ago

After the story above happened I added exactly this rule "An agent can propose a project-wide rule, but it governs nothing until I say yes"

I am also using my own orchestration system (server+client). It works in combination with my process framework (basically project skeletons) that all my projects use.

This has pros and cons. The projects running on that framework share the good and the bad that I add to the framework. In this case one bad rule that made it into the process. The good was fixing it in the framework fixed it for all.

1

u/perfektcrash 2d ago

That's the trade with a shared framework: the fix spreads to every project, and so does the mistake. What helped me was giving every rule a scope. A rule only reaches the files it names, and just a short standing list goes everywhere. That way the framework can carry rules without every project inheriting every exception😊

2

u/Practical_Tie_334 4d ago

give each proposed standing rule a source and a scope. 'approved for this task' should stay attached to that task unless you explicitly make it broader.

have the agent show you a diff before it adds anything to shared instructions, especially when it's turning a conversation into policy.

you could test the result with the original trial task and an unrelated small edit. only the first should trigger the trial workflow.

2

u/Ok_Tea4891 4d ago

The standing-rule creep is a good catch: a one-off approval got promoted into a general rule and then spread to other projects. A cheap guard is to record the scope next to every rule, for example which project and task it applies to and when it should be reviewed, so a decision can't silently become a global default. Periodically grepping the process files for rules with no scope is a quick way to find the next one.

2

u/PilotLost404 4d ago

A one-off approval turning into a standing rule happens a lot. When you write one down, say it's for this task only, and review any rule that has no scope on a schedule. Asking "why did you do that" and tracing it back to the file is the fastest way to find them.