CLAUDE LABJP
DEFAULT — Sonnet 5 is now the default model for Pro, Team Standard, and Enterprise seats, with a native 1M-token context window and adaptive thinking on by defaultREWIND — The /rewind command can now restore a conversation after /clear. At a checkpoint you choose whether to roll back the code, the conversation, or bothORGDEFAULT — Organization default models are supported. When you have not picked a model yourself, /model shows it as Org default or Role defaultATTACH — File attachments in chat are now clickable. Cmd or Ctrl-click reveals the file in Finder or ExplorerBASH — Bash mode gained live file path autocomplete, and auto mode now spells out the reason when it declines an actionEXPIRE — The claim window for the $100 promotional credit closed on August 2. Credits already claimed expire September 17, so any evaluation run needs to sit inside that windowDEFAULT — Sonnet 5 is now the default model for Pro, Team Standard, and Enterprise seats, with a native 1M-token context window and adaptive thinking on by defaultREWIND — The /rewind command can now restore a conversation after /clear. At a checkpoint you choose whether to roll back the code, the conversation, or bothORGDEFAULT — Organization default models are supported. When you have not picked a model yourself, /model shows it as Org default or Role defaultATTACH — File attachments in chat are now clickable. Cmd or Ctrl-click reveals the file in Finder or ExplorerBASH — Bash mode gained live file path autocomplete, and auto mode now spells out the reason when it declines an actionEXPIRE — The claim window for the $100 promotional credit closed on August 2. Credits already claimed expire September 17, so any evaluation run needs to sit inside that window
Articles/Claude Code
Claude Code/2026-06-19Advanced

An Article My Gate Rejected Got Published — The Cost of Chaining the Quality Gate and git push in One Call

In an unattended publishing pipeline, an article my quality gate had rejected went live anyway. The cause was chaining the gate and git push into a single shell call. Here is how the exit code gets swallowed, and a two-phase publish-marker design that refuses to push until every gate has demonstrably passed.

Claude Code208Automation42Operations15Shell2Indie Dev22

Premium Article

One morning I went cold reading back the logs. An article my quality gate had stopped the night before — flagged with 🛑 violation detected — was sitting live on the site. The gate log clearly said it had failed. And yet, in the same run, git push had fired and the article was published.

The gate itself wasn't the problem. The problem was that I had written verification and publishing as a single shell call. As an indie developer running unattended publishing across several sites, I've learned that how the shell interprets exit codes turns directly into incidents. So I want to record what was actually happening and how I rebuilt it.

What happened the moment I chained them

The task body looked roughly like this:

python3 article_gate.py "$JA" "$EN"; git push origin main

It reads top to bottom as "gate, then push," which looks safe. But ; ignores the success or failure of what came before it entirely. Even if the gate exits with code 1, the shell runs the next git push as if nothing happened. That one line always meant "push regardless of what the gate decided."

In unattended runs there's no moment where a human reads the log and stops it. The instant I joined them with ;, verification became decoration that protected nothing.

The difference between ; and &&, and the single surviving exit code

Swapping ; for && prevents most of this incident on its own.

# Dangerous: pushes even if the gate fails
python3 article_gate.py "$JA" "$EN"; git push origin main
 
# Better: pushes only if the gate succeeded
python3 article_gate.py "$JA" "$EN" && git push origin main

&& runs the right side only when the left side exits 0. Most people know this much.

The trap is that an agent or scheduler treats this one line as a single command, and only the final exit code survives in its hands. With a && b, if a fails the whole thing is a failure — but you cannot tell apart "stopped at a" from "a passed and b (push) failed" without reading the log. When your execution layer only observes one success/failure value, the verification verdict never reaches the outside before the run barrels through to the irreversible step. That's exactly why I no longer consider && alone to be enough.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why connecting a verification command and an irreversible action in one call swallows failures — the semicolon, pipes, command substitution, and set -e gaps — shown with reproducible code
A two-phase design using set -euo pipefail and a publish marker so push only runs after every gate has passed
Splitting verification and publishing into separate calls as a structural safeguard that forces evidence-before-action in unattended agent runs
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Claude Code2026-06-17
When an Announced Billing Change Is Withdrawn at the Last Minute, Change No Code
A billing change that was supposed to take effect was withdrawn on the day. To survive announce, apply, and revert without touching code, I keep platform behavior behind a single flag and project the monthly delta from real logs.
Claude Code2026-08-03
Existence Checks Pass, Writes Fail — Probing Capabilities Before an Unattended Run
A directory existing and a directory being writable are two different facts. Measured results from five broken-environment cases, and a capability-probe preflight for unattended Claude Code runs.
Claude Code2026-06-27
Will It Stay Light When You Run It Unattended? Observing and Capping Claude Code's Long-Session Memory
How to keep long, unattended Claude Code sessions from slowly getting heavier — with a tiny ps-based RSS sampler, a rolling-baseline watchdog, and session segmentation, shown with working scripts and a before/after comparison.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →