I used to think a "better model" would fix my agent loop.
Then I gave the same model a GitLab CLI, read-only access to dev/test logs, and a browser that can open a preview URL. The model didnt get smarter. The harness did.
Yes, the title is rude on purpose. I'm sticking with it.
The loop
Stop imagining agents as autocomplete with confidence issues. Treat them like a junior engineer on a good day:
build → observe → test → correct → verify
Without tools, the agent only gets build and a hopeful correct. You become the observability layer by pasting stack traces like a medieval scribe. With tools, it closes its own loop.
Three gates I actually use
These are deliberately boring. That's why they work.
1) gcloud on dev/test logs (never production)
When a Cloud Run service misbehaves in a preview environment, the fix is usually in the logs. Copy paste culture means you play telephone. Tool culture means:
gcloud logging read \
'resource.type="cloud_run_revision" AND severity>=ERROR' \
--project=my-app-dev \
--limit=50 \
--format=jsonWire that behind a scoped MCP tool or an allowlisted shell skill and the agent reads the failure, patches, redeploys the preview, reads again.
Hard rule
Production logs stay human. Dev and test are fair game. If your security team cant tell the difference in the credential, you've already lost.
2) GitLab CLI querying CI
Agents love declaring victory after a green unit test on their laptop. Cute. Ask the pipeline.
glab ci status
glab ci view
glab api projects/:id/pipelines/:pipeline_id/jobsNow the loop includes "did CI actually succeed on the branch I just pushed?" That single question kills a shocking amount of false confidence.
Same pattern works with gh on GitHub. Pick the forge you already live in. Dont invent a custom CI MCP until the CLI is too awkward.
TIP
GitLab MCP is garbage. The glab CLI is great. The MCP seems to exhaust TPS limits instantly.
3) Agent Browser on preview links
UI bugs dont live in tsc --noEmit. They live in the running preview.
Point a browser tool at the Vercel / Netlify / Cloud Run preview URL. Click the path. Screenshot the failure. Read the console. Come back with a patch for what a user would see, not what the compiler shrugged at.
That's the difference between "tests pass" and "the button still does nothing". I've been on both sides of that sentence. Prefer the first.
Context surfaces beat clever system prompts
Beyond those three gates, the useful tool list looks like the rest of your day job:
Jira / Linear: ticket acceptance criteria, not vibes
Figma: the actual component, not your memory of it
Miro: the workshop decision you swore someone wrote down
GitHub / GitLab CLI: PRs, reviews, CI, release state
GCP CLI (scoped): config and non-prod runtime truth
Each one removes a place where you'd otherwise paste context by hand and introduce transcription errors.
Credentials: be adult about this
"Give the agent more tools" is not "paste the org owner token into .env".
Stuff I'll defend in a design review:
Separate service accounts per environment. Dev/test only for autonomous loops.
Read-mostly by default. Write scopes for forge + preview deploys, not billing or IAM admin.
Short-lived tokens where the platform allows it.
Tool allowlists in the agent harness, not "bash is fine, lol".
Audit logs on. If you cant answer "what did it touch?", you dont have an agent. You have an incident waiting for a calendar invite.
Mischief is welcome in titles. It isnt welcome in IAM.
What "10x" means here
Not ten times the commits. Ten times fewer human round-trips between "I think it's fixed" and "I can see it is fixed".
Same model. Tighter loop. Better tools. Honest scopes.
Thoughts
If your agent cant observe the system it just changed, you dont have an engineer. You have a very articulate guesser.
&w=3840&q=75)


