
· Issue #2 · 5 tricks
Issue #2: 5 AI-agent tricks for Claude Code, Codex and safer vibe coding
5 new agent tricks worth trying this week. For vibe coders and anyone running AI agents. Five minutes to read, each trick checked against its source.
1. Let Claude Code write the plan as a script, then run it in the background
What it does: Claude Code's dynamic workflows turn a big task into a JavaScript script that runs many subagents at once. The script holds the loop and the in-between results, so your session only gets the final answer, and you can save the script and rerun it.
Who it's for: anyone with a large, repetitive job, like a codebase-wide bug sweep, a 500-file migration or research that needs sources cross-checked. Available on paid plans; on Pro, turn it on from the Dynamic workflows row in /config.
How:
- Try the bundled one first:
/deep-research <your question>, then open/workflowsto watch the phases run. - For your own task, start the prompt with the keyword, for example
ultracode: audit every API endpoint under src/routes/ for missing auth checks. Pick "View raw script" at the approval prompt to read the plan before it runs. - If the run did what you wanted, press
sin the run view to save it as a command. Leave ultracode off for routine work: it uses more tokens and hits your usage limits sooner.
Source: Claude Code docs, "Orchestrate subagents at scale with dynamic workflows" https://code.claude.com/docs/en/workflows · spotted via @thedelost on X https://x.com/thedelost/status/2110472847084650726
2. Keep your coding agent out of your .env file
What it does: by default Claude Code can read your .env, and a .claudeignore file has no effect. Read deny rules block its file tools and commands like cat, head, tail and sed on those paths. The sandbox adds an OS-level block for everything else a command starts.
Who it's for: anyone running Claude Code in a repo that holds real keys.
How:
- Add deny rules to
.claude/settings.json(or~/.claude/settings.json):"permissions": { "deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"] }. Run/statusto confirm the file loaded. - Deny rules don't stop
grep -rrun from that folder, or a Python or Node script that opens the file itself. So turn on the sandbox with/sandbox(off by default; macOS, Linux and WSL2) and list the same paths undersandbox.filesystem.denyRead. - Set
"allowUnsandboxedCommands": falseso a command that fails in the sandbox can't fall back to running outside it. Then give the agent a dev key you can revoke.
Source: Claude Code permissions docs https://code.claude.com/docs/en/permissions · sandboxing docs https://code.claude.com/docs/en/sandboxing · tip from MODEL magazine https://readmodelmag.com/stories/your-coding-agent-can-read-your-env
3. Have a second agent review your change before you push
What it does: OpenQodex runs scanners such as gitleaks and semgrep on the files you changed, then starts a separate Claude Code or Codex process, on your own login, to review the change. By default the agent that wrote the code doesn't review it. A push gate can stop git push until there's a passing review.
Who it's for: Claude Code and Codex users on macOS or Linux with Node 22+. Cursor and Cline can start a review, but need Claude Code or Codex installed as the reviewer.
How:
- In your repo, run
npx openqodex init. It lists the files it will write and asks you once. - Tell your agent "review my change with openqodex", or run
~/.openqodex/bin/openqodex review. You get a receipt with one line per finding, and you choose which ones get fixed. - The gate only warns by default. To block pushes on serious findings, set
review.block_on_severity(for examplemajor) in.openqodex/config.yaml.
Why bother: Anthropic says merged pull requests to Claude Code more than doubled from June to September while the share reverted fell by more than 40%, after moving most code reading to machines. On a Team or Enterprise plan, Code Review for Claude Code is now generally available, and /code-review runs a lighter version locally.
Source: https://github.com/openqodex/openqodex · Anthropic, "How the Claude Code team does code review" https://claude.dev/blog/solving-code-review-at-anthropic/
4. Keep one instructions file for every coding agent
What it does: Claude Code v2.1.277 and later reads AGENTS.md as your project instructions when there's no CLAUDE.md, so a repo already set up for other coding agents works as-is. If you also keep a CLAUDE.md, one import line pulls AGENTS.md in, and you stop keeping two rule files in sync.
Who it's for: anyone who switches between Claude Code and other agents in the same repo.
How:
- Put the shared rules (build commands, style, do-nots) in
AGENTS.mdat the repo root. - If you need Claude-only notes, create a
CLAUDE.mdwhose first line is@AGENTS.mdand add those notes below it. - Start a new session. With no
CLAUDE.md, Claude Code prints a line likeno CLAUDE.md found; AGENTS.md loaded. Watch out: a personalCLAUDE.local.mdalso counts as aCLAUDE.mdand stopsAGENTS.mdloading, unless you set Project instructions toclaude-md-and-agents-mdin/config.
Source: Claude Code docs, "AGENTS.md" https://code.claude.com/docs/en/memory#agents-md
5. Let Codex check Claude Code's work every hour, with a stop rule
What it does: claude-codex-loop is a Codex skill. Claude Code runs a step, Codex checks in hourly, reviews the evidence against your original goal, sends one next prompt, and repeats until the goal is verified or a limit is hit. Its author, Ash Jogalekar, says it ran his autonomous science workflow for three days straight with no human intervention.
Who it's for: long jobs you would otherwise babysit, like research runs, calculations or big refactors.
How:
- Clone the repo and link it as a skill:
mkdir -p "$HOME/.agents/skills" && ln -s "$PWD" "$HOME/.agents/skills/claude-codex-loop"(some clients use~/.codex/skillsinstead). - In Codex, name the project folder and your Claude Code conversation and session, and spell out the goal and what counts as success, for example: "Use $claude-codex-loop for /work/my-project and my Claude Code conversation 'My project', session SESSION_ID. Review every hour and send follow-up prompts."
- Always set limits, for example: stop after 20 follow-up prompts, 48 hours, or 3 reviews in a row without verified progress. Reaching a limit doesn't count as success.
Source: https://github.com/ajogalekar/claude-codex-loop · Ash Jogalekar on X https://x.com/curiouswavefn/status/2111665926156292297
⚠️ One thing to watch
If you linked your own provider keys to OpenCode Console, check your email. OpenCode said on 17 Oct that a breach tied to a large-scale distillation attack hit 1.4% of Console users, a subset who had external providers linked, and that it emailed everyone affected. Even if you got no email, rotating those keys and checking your provider bills is cheap insurance. Statement: https://x.com/opencode/status/2111519637049319818
Sources credited above. All summaries are ours. Got a trick that worked for you? Reply and tell us.
Get next week's five, free · All issues
Latest Daily Frontier Digest: 29 Oct 2026: An unreleased Claude model built working exploit chains for Chrome, Safari and Linux