Before an AI agent posts, sends or pays while you sleep, make it confirm which account it's about to write as.
That check, plus a write ledger and kill switch in Python, is in my book. Free on Kindle until Nov 10, 11:59 PM PST:
amazon.com/dp/B0HPNT7V6L
Thoughts welcome. #ad
57
Cursor's Nov 13 incident update: it began with an access key issued to a vendor, Fireworks. Agent traces were exposed for under 0.05% of users outside Privacy Mode.
Traces hold whatever the agent read. So my scripts get the .env path, never the secret values.
4
.mcp.json travels with the repo. Clone a project that ships one, and its MCP servers join your list, subject to your tool's approval prompt.
Do you read it before the first session in a new clone?
Check: open .mcp.json and look up every command it would start.
4
Replying to @BHolmesDev
Good framing on gates for human judgment. One addition from running unattended jobs: make the gate check the real artifact, not the agent's report. We found "exit 0" can mean nothing was done, so each step needs a verifiable output, and a guard that has never fired should be tested on purpose.
5
22 malicious repos carried one setup.js loader aimed at 14 coding tools incl. Claude, Codex and Cursor, per Bitdefender (Nov 18). It can rewrite hooks and MCP definitions.
In a cloned repo, what do you check first?
A) .mcp.json
B) Hook config
C) package.json scripts
D) Nothing
1
29
A starting split for permissions in .claude/settings.json:
Allow: running tests, lint, git status, git diff
Ask: git push, package installs, edits to CI files
Deny: reading .env, rm -rf, force pushes
Then tighten it using the log of what the agent actually asked for.
2
Your agent should have fewer tools at 3 a.m. than at 3 p.m.
Attended, it can ask you. Unattended, every permission it holds gets used without a second look.
Keep two permission profiles: a wide one for when you're watching, a narrow one for scheduled runs.
1
Your coding agent made a failing test pass. What changed?
A) The code under test
B) The test's expected value
C) Both
D) Didn't look
Claude Code, Codex and Cursor can all edit tests. git diff --stat shows which one happened in seconds.
1
19
My X posting limits live in one small JSON file with dated phases.
In October, after a problem with the account, it held posting at zero for two days. The script has no code path that raises its own limit. The rule in the file: only I change it.
1
1
15
--dangerously-skip-permissions belongs in a box you can throw away.
Set this up first:
- A container or VM
- One repo copy mounted, nothing from $HOME
- Cloud and Git credentials left outside
- Network limited to what the task needs
- Nothing pushed until you read the diff
44
A scheduled "AI agent" is a cron job with a language model inside.
So give it what cron jobs need: a lock so two runs can't overlap, a timeout, an exit code someone checks, and a log written to a file.
The model is new. The failure modes are old.
1
1
14
Two Claude Code or Codex sessions, one repo. How do you keep them apart?
A) A git worktree each
B) Separate clones
C) One checkout, switching branches
D) I never run two at once
With C, both agents share one working tree and each other's half-finished edits.
4
1
28
63 attempts, 63 sent, zero unknown. That's my X posting ledger from Oct 9 to Nov 12.
The rule that freezes the queue on an "unknown" result has never fired once.
I'm keeping it. A guard earns its place on the first timeout, and nobody schedules that.
1
1
16
ANTHROPIC_BASE_URL decides where Claude Code sends your prompts and API key.
If a settings file points it at a host you don't recognize, every session goes there.
Check: grep -n ANTHROPIC_BASE_URL ~/.claude/settings.json .claude/settings.json
7
CLAUDE.md may be the most powerful file in your repo, line for line. One sentence there changes every future session.
So review it like code: an owner, a PR for every change, a diff someone actually reads. Same for AGENTS.md and anything under .claude/.
9
Replying to @mitchellh
Nice. For the first-answer-wins prompt: what's the default when nobody answers, deny or proceed? For unattended runs I'd want a timeout that fails closed and logs which client approved, so the choice is auditable later.
44
Replying to @kirillzzy
Keeping secrets out of the harness is the right default. One more cheap check: have the signing step verify which account it's acting as before every action and halt on mismatch. We run that on our posting script.
23
Replying to @dani_avila7
Good change. Even with OAuth, I'd still set a hard monthly spend cap on the provider side, not just in the agent's code. Code-side limits die with the process that's misbehaving; the provider-side cap doesn't.
119
Which Claude Code permission mode do you actually run most days?
A) Default: approve each action
B) Plan mode, then approve edits
C) acceptEdits
D) --dangerously-skip-permissions
Would your answer change for a repo you didn't write?
7
Replying to @L3KKRL
Treating a cloned repo as untrusted by default is the right call, because project config and MCP servers are executable input. The check I'd add: diff the agent's effective config against what you expect before the first run in any fresh checkout.
1
11
Replying to @TheHackersNews
Browser automation libraries show up inside many agent toolchains, so a flaw like this is a reason to check what a browsing agent can reach from that process. Run it with no credentials in its environment and block internal network ranges, then patch.
6

