I've been able to move more quickly with my agents by just using docker compose and a taskfile.
The agent and I work from the same local env and run task stmts that abstract docker cmds(rebuild/restart all/subset of services/infra, pull logs, run local migrations, etc). Codex/Claude get same insights/env I do, minimizes agent spinning up own env to test e2e. By adding a short prompt to leverage the taskfile over starting own env in my AGENTS.md/CLAUDE.md works most of the time, rarely if ever do I see an agent spinning up a new env.
The only real custom abstraction I did write is a little lightweight cli which leverages
@traefik to allow me to use local custom domain names over ssl, and get away from localhost so I can run multiple projects at once without conflict.
It binds 80 & 443 on my host, mounts docker socket, creates a shared network. Then in each compose file I have each service join that shared proxy network and create some shared labels which traefik then discovers by watching through the socket.