An agent loop fails in a
boring way when it treats a
usual condition as a contract.
Public HTTPS clones usually
work with no token. Traced
CodeQL usually works on
whatever Apple image the
runner last moved to. A debug
model usually prints a token
count. A plugin usually
imports whatever the host
already imported. None of
those are promises. They are
leftovers from the last
environment that happened to
work.
When the leftover flips, the
failure looks like a flaky
tool. The agent retries the
same call. Retries do not
restore a missing credential,
a missing x86_64 slice inside
a system library, or a
library the plugin never
declared. The useful move is
to write the assumption next
to the call, then fail closed
when it is false.
“This clone is authenticated.”
An authentication-required
message on a public HTTPS
fetch is a stop, not a prompt
to try the same URL again.
Use GITHUB_TOKEN,
a GitHub App installation
token, or SSH. If none of
those are available, wait
until the temporary
protection lifts.
“This scan is pinned.” If the
job needs traced extraction,
the workflow names macOS 26
or earlier and Xcode 26 or
earlier, including the
Actions image. Floating on
latest is how you discover
the retirement in production.
Build mode none
is a real alternative for
C/C++, C#, and Java. It is
not a Swift 6.4 strategy, and
it is not listed for Go or
Kotlin.
“This number is a bill.” If
the simulator ignores tool
calls, system prompts, or
reasoning tokens, do not cap
spend from it. llm-echo 0.5
is the shape of the fix:
the fake model has to count
the fields the real call will
spend. “This import is
declared.” If the tool uses
httpx, httpx is in the
plugin’s own dependencies.
The host’s lockfile is not
yours.
Humans still own the
judgment those checks cannot
make: whether this job should
be holding a token at all,
whether a scan that cannot
trace is still worth running
in build mode none, whether
a missing tool is in scope
for this change. The agent’s
job is narrower. Name the
assumption. Stop when it is
false. Do not retry your way
back to a convenience.
-
Automated public clones and
fetches authenticate, or
they wait. Actions uses
GITHUB_TOKEN.
Other CI prefers a GitHub
App installation token. SSH
is a separate path and was
not in today’s HTTPS
bucket. Do not loop the
anonymous URL.
-
CodeQL that needs a trace
pins the runner image and
the toolchain to macOS 26
or earlier and Xcode 26 or
earlier. Swift 6.4 is
unsupported on any
platform. Do not “fix” a
red job by floating newer.
-
Build mode
none
is only the documented
escape for C/C++, C#, and
Java. Do not apply it to
Go, Kotlin, or Swift
because the check went red.
-
A tool plugin declares
every library it imports.
An undeclared httpx import
is a bug even while the
host still provides it.
-
A debug usage counter that
omits tool calls, system
prompts, or reasoning
tokens is not a budget.
Update the counter, or stop
using it as a cap.
-
Stop when the named
assumption is false. More
retries are how an empty
helper becomes eleven
identical failures.
Write the assumption beside
the call. Stop when it is
false. A convenience that
worked yesterday is not a
contract.