Some tips and tricks from the mux developers on getting the most out of your agents.
Persist lessons
When you notice agents make the same class of mistake repeatedly, ask them to modify theirAGENTS.md
to prevent the mistake from happening again. We have found this pattern is most effective when:
- You specify the size of the change
- LLMs love fluff — always specify a size constraint like “change at most two sentences”
- Ask the agent to focus on the general lesson, not the specific mistake
AGENTS.md.
Define the loop
Agents thrive on TDD. Try to define their task in terms of what checks need to pass before they can claim success. For mux development, we have await_pr_checks.sh script
that polls GitHub and ensures that:
- There are no dirty changes
- All checks pass
- All review comments are resolved
- There are no merge conflicts
Aggressively prune context
Even though Sonnet 4.5 has up to 1M in potential context, we experience a noticeable improvement in quality when kept under 100k tokens. We suggest running/compact with a continue message
often to keep context small. For example:
Keeping code clean
Some prompts that help you keep the codebase clean: Elevate the fix to design level:- We keep seeing this class of bug in component X, fix this at a design level
- There’s bug X, provide a fix that solves the whole class of bugs
- How can the code/architecture be improved to make similar changes easier?
- What notes in AGENTS.md would make this change easier for future Assistants?
- DRY your work
- Strive for net LoC reduction
- Review in depth, simplify