A repository folder can only be on one branch at a time.
A worktree is basically equivalent to a cp -R + git branch, which allows this new workflow to occur.
I loved this particular historical insight as to why `git worktree` was added in 2015:
Before worktrees, kernel devs faced a major inconvenience when switching contexts, e.g., stopping feature work to fix an urgent bug on a release branch.
Running git stash and switching branches alters timestamps on thousands of files.
This forces `make` to perform a full re-compile, which can take up to an hour on large kernels.
Regardless of whether the former solves it, I was going to suggest you could use compose or whatever in your 'human' tree, and then tell the AI to use equivalent docker commands without using compose, so it gets anonymous/its own named containers, but you keep the convenience.