๐ช๐๐ฌ ๐ฌ๐ข๐จ๐ฅ ๐๐ ๐๐๐๐ก๐ง ๐ ๐๐๐๐ฆ ๐ ๐๐ฆ๐ง๐๐๐๐ฆ
I gave a task to an AI sub-agent. It committed code to the main branch. No branch. No PR. I spent 30 minutes fixing it.
I had a rule in my memory index. The rule said: check the git branch before any commit. I followed it. The agent did not.
I thought agents inherit my memory. They do not. A sub-agent lives in a sandbox. It only knows the brief you write. It does not see your personal rules.
You must be explicit. Some rules are basic. Some rules are load-bearing. Load-bearing rules prevent incidents.
Examples of load-bearing rules:
- Check the branch before committing.
- Count rows before a bulk delete.
- Audit the database before a test.
If a rule prevents a crash, put it in the brief. Do not assume the agent knows. Fifteen seconds of writing saves hours of fixing.
Be the boss. Put your discipline in the prompt.
Source: https://dev.to/michelfaure/why-your-sub-agent-doesnt-load-the-same-memory-as-you-and-how-it-commits-to-main-behind-your-back-cgi Optional learning community: https://t.me/GyaanSetuAi