Your agent usually only sees what’s in its working directory. If you’re building a frontend that talks to a backend API in another repo, the agent might be guessing at contracts, inventing endpoints and hallucinating types.
The fix is old-school: the meta-repo pattern. Clone related repos into one parent folder and start the agent there. Agents lazy-load files on demand, so having five repos available doesn’t cost more tokens until it actually reads something. But when it needs to check an API contract or a shared type, it can.
my-project/
βββ frontend/ β your repo
βββ backend-api/ β their repo
βββ shared-models/ β the contract
βββ AGENTS.md β "frontend calls backend via /api/v2, see shared-models for types"
The upgrade that makes it work: add an AGENTS.md in the parent folder describing how the repos relate. That makes the agent architecturally aware, not just file-aware. A colleague uses this for her daily work and reports implementations that are “definitely up to spec.”
π‘ Try this: mkdir my-meta-repo && cd && git clone && git clone β then start your agent from my-meta-repo. Add an AGENTS.md describing the relationships. π Meta-repo workshop (pre-AI)
How many repos does your agent usually see?
π’ Just one β the repo I’m working in
π‘ Two or more β I’ve grouped some related ones
π΄ I use a monorepo, so everything’s in one place already
βͺ I hadn’t thought about this, have to try it!
Got a multi-repo setup that works? Share it in π§΅