# Vibe Coder #7.1: The Age of Agents – Leaving Work for the Night Shift

> Handing work to an async coding agent is like leaving a work order for the night shift: nobody is there to say "stop", and in the morning the work is accepted by measuring it. Five tools' defaults, a work order that lives in the repo, and a PHP script that takes the handover with the base branch's tests.

- Author: [Halit Yeşil](https://halityesil.com/en/about/)
- Published: 2026-12-01
- Language: English
- Canonical URL: https://halityesil.com/en/vibe-coder-7-1-async-coding-agents/
- Turkish version: https://halityesil.com/vibe-coder-7-1-otonom-kodlama-ajani.md
- Series: [The Vibe Coder's Handbook](https://halityesil.com/en/series/the-vibe-coders-handbook/), chapter 7.1
- Category: Artificial Intelligence / AI
- Tags: AI agents, async coding agents, CI/CD, Claude Code, Codex, Cursor, GitHub Copilot, OpenHands, PHP, Vibe Coder
- License: https://creativecommons.org/licenses/by-nc/4.0/
- Cite as: Halit Yeşil. “Vibe Coder #7.1: The Age of Agents – Leaving Work for the Night Shift”. halityesil.com, 2026-12-01. https://halityesil.com/en/vibe-coder-7-1-async-coding-agents/

---

[The previous chapter](https://halityesil.com/en/vibe-coder-6-2-n8n-workflow-automation/) ended with a promise: we had put the road the weighbridge can't see on the map, and next we would move from single tools to agent units that work on their own. The promise is older than that, actually. Back in [the product engineer chapter](https://halityesil.com/en/vibe-coder-1-3-product-engineer/) we parked "autopilot mode" for chapter 7.1. Today we switch it on: **async coding agents**, the ones that take a task, run it on a remote machine while you're away, and come back with a branch or a pull request.

The metaphor is the night shift in a factory. The foreman writes the work order in the evening and goes home. The night crew takes over the machines and, in the morning, hands over the shift log along with the work itself. The foreman can't phone in at 3 a.m. to say "don't cut that part." Whatever must not be cut has to be written down before he leaves. And in the morning the work is accepted by measuring it, not by reading what the log says.

## What is an async coding agent?

The agents from chapters 3.1 to 4.3 worked next to us: in the editor, in the terminal, asking before every risky step. With an async agent there is nobody to ask. You hand over the task; the agent clones the repo into a VM or container in the cloud, installs dependencies, changes code, runs tests and leaves a change set behind.

Here is the definition up front: **with an async agent, the real question is not how capable it is, but what it can touch while nobody is watching.** Since nobody will be around to say "stop", the stopping points have to be written into the work order. And the morning handover, meaning code review, is the bottleneck of the whole arrangement. The rest of this chapter is about those two ends: the work order you write in the evening and the handover report you take in the morning.

## Where does the night shift work?

The vendors built the same idea with different defaults. The table below was read from official docs on 29 November 2026. These pages change almost weekly in this space, so check them yourself before you rely on them.

| Tool | Where it runs | Network default | How results come back | Documented brakes |
|---|---|---|---|---|
| [GitHub Copilot cloud agent](https://docs.github.com/en/copilot/concepts/security-governance-and-network-settings/risks-and-mitigations) | Sandbox on GitHub infrastructure; GitHub Actions if you use custom setup steps (max 59 minutes per session) | Restricted, configurable firewall | A `copilot/` branch, a PR and a review request to you | Cannot approve or merge its own PR; the person who asked can't approve it either; workflows don't run by default until the code is reviewed |
| [OpenAI Codex cloud](https://learn.chatgpt.com/docs/environments/cloud-environment) | Codex container (default image `universal`) | On during the setup script, off during the agent phase | Changed files; you commit or open the PR | Secrets are removed before the agent phase starts; only setup scripts see them |
| [Claude Code cloud session](https://code.claude.com/docs/en/cloud-environments) | Anthropic-managed VM (Ubuntu 24.04) | "Trusted": package registries, GitHub, cloud SDKs | Create a PR from claude.ai/code when the session ends | GitHub credentials never enter the VM |
| [claude-code-action](https://github.com/anthropics/claude-code-action/blob/main/docs/faq.md) | Your GitHub Actions runner | The runner's network | Commits to a branch plus a pre-filled PR link | No merge, rebase or force push; no write access to workflow files |
| [Cursor Cloud Agents](https://cursor.com/docs/cloud-agent/security-network) | Isolated VM in Cursor's cloud | **On**, can be narrowed with a domain allowlist | A PR by default | Auto-runs terminal commands; the docs say outright this carries data exfiltration risk |
| [OpenHands](https://github.com/OpenHands/OpenHands) | Docker sandbox on your own machine | Whatever you set | Whatever pipeline you build | Headless mode approves every action; the CLI is no longer maintained |

OpenHands is MIT-licensed and the latest release is v1.40.0 (12 November 2026); the copyright line in its licence reads "OpenHands contributors", meaning the people behind the project's [GitHub organisation](https://github.com/OpenHands). One name is missing from the table: Google's async agent, Jules. According to [its own changelog](https://jules.google/docs/changelog/) it has been read-only since 11 November 2026 and winds down on 31 December 2026; Google says those learnings are going into products like Antigravity. The agency you hire your night shift from can change. The branches and PRs Jules opened were on GitHub all along. What lasts is what lives in your repo.

Read the table one more way. The strictest defaults are about network and secrets (Codex turns the internet off and strips secrets in the agent phase); the loosest is Cursor's open network plus auto-run. But no tool knows which parts of your project are off-limits. That goes into the work order, and you write it.

## The work order: nobody will say "stop" tonight

A work order has two layers. The first is the run-time brakes, the flags on the command that starts the agent. If you run headless on your own runner, these are the documented equivalents for two agents:

```bash
# Claude Code: cap turns and spend, deny anything that would prompt
claude -p "Write src/FiyatCozucu.php so that tests/fiyat-cozucu-test.php passes" \
  --permission-mode dontAsk \
  --allowedTools "Read,Edit,Bash" \
  --max-turns 30 \
  --max-budget-usd 3.00 \
  --output-format json

# Codex: read-only by default, ask explicitly for workspace-write
codex exec --sandbox workspace-write --json \
  "Write src/FiyatCozucu.php so that tests/fiyat-cozucu-test.php passes"
```

I did not run these two commands; the flags come from the [Claude Code CLI reference](https://code.claude.com/docs/en/cli-reference) and [Codex's non-interactive mode page](https://learn.chatgpt.com/docs/non-interactive-mode). Three details matter. `--max-budget-usd` works off an estimate, and the docs warn "Spend can pass the cap", so leave headroom. Since Claude Code v2.1.302, `claude -p` starts in Manual mode when nothing sets a permission mode, and a call that needs approval is denied. On the Codex side, the `--full-auto` you'll see in older guides is no longer supported; `--sandbox workspace-write` replaces it.

The second layer is the job itself: where the agent may touch, where it may not, how big the change can get, and how you know it's done. In [4.2](https://halityesil.com/en/vibe-coder-4-2-agents-md-vs-claude-md/) we said a rule file is context and the gate is what enforces it; in [4.3](https://halityesil.com/en/vibe-coder-4-3-iterative-ai-coding/) we said every slice needs a runnable "done" check. For the night shift I put both into a single machine-readable file (keys are in Turkish: `izinli` = allowed, `yasak` = forbidden, `testler` = tests, `en_fazla_satir` = max lines, `kontrol` = check command):

```json
{
  "gorev": "Altınkaynak JSON fiyat metnini sayıya çeviren FiyatCozucu sınıfı",
  "izinli": ["src/**", "tests/**"],
  "yasak": [".github/**", ".vardiya/**", "composer.json", "composer.lock"],
  "testler": ["tests/**"],
  "en_fazla_satir": 150,
  "kontrol": "php tests/fiyat-cozucu-test.php"
}
```

The file lives in the repo as `.vardiya/is-emri.json` ("vardiya" is Turkish for shift, "iş emri" for work order). Pointing the agent's prompt at it is enough; the real work happens in the morning. Note that the work order itself sits in the forbidden zone. You'll see why in a minute.

## The morning handover: measure, don't read

I ran the experiment on 29 November 2026 in a cloud sandbox, on a copy of [altinkaynak](https://github.com/HalitYesil/altinkaynak), the demo building of the [Urban Renewal](https://halityesil.com/en/urban-renewal-3-characterization-tests/) series (PHP 8.3.6, git 2.43.0). On the base branch I put the work order and a four-case test. Altınkaynak's JSON endpoints return prices as Turkish-formatted strings, with a dot for thousands and a comma for decimals: `"49,350"` must become 49.35 and `"19.517,61"` must become 19517.61.

Then I opened three "night shift" branches. I wrote them by hand, not an agent, imitating patterns from earlier chapters: a clean shift that does the job right, an overreaching shift that does the job and also touches CI and dependencies, and a sloppy shift that half-writes the code and bends the test to fit. This script takes the handover (its messages are in Turkish; I explain the output below):

```php
<?php

declare(strict_types=1);

/**
 * teslim-tutanagi.php — gece vardiyasından (otonom ajandan) gelen dalı teslim alır.
 * Kullanım: php teslim-tutanagi.php <taban> <dal>   (depo kökünde)
 * İş emri tabandaki .vardiya/is-emri.json dosyasından okunur; daldaki kopyaya bakılmaz.
 * Çıkış: 0 teslim alınabilir, 2 bulgu var, 1 kullanım/okuma hatası.
 */

function git(string ...$arg): array
{
    $komut = 'git ' . implode(' ', array_map('escapeshellarg', $arg)) . ' 2>&1';
    exec($komut, $cikti, $kod);
    return [$kod, $cikti];
}

function kalip(string $glob): string
{
    $parcalar = preg_split('/(\*\*|\*)/', $glob, -1, PREG_SPLIT_DELIM_CAPTURE) ?: [];
    $regex = '';
    foreach ($parcalar as $p) {
        $regex .= match ($p) {
            '**' => '.*',
            '*' => '[^/]*',
            default => preg_quote($p, '#'),
        };
    }
    return '#^' . $regex . '$#';
}

/** @param list<string> $globlar */
function eslesir(string $yol, array $globlar): bool
{
    foreach ($globlar as $glob) {
        if (preg_match(kalip($glob), $yol) === 1) {
            return true;
        }
    }
    return false;
}

[$taban, $dal] = [$argv[1] ?? '', $argv[2] ?? ''];
if ($taban === '' || $dal === '') {
    fwrite(STDERR, "Kullanım: php teslim-tutanagi.php <taban> <dal>\n");
    exit(1);
}

[$kod, $satirlar] = git('show', "{$taban}:.vardiya/is-emri.json");
$emir = $kod === 0 ? json_decode(implode("\n", $satirlar), true) : null;
if (!is_array($emir) || !isset($emir['izinli'], $emir['kontrol'])) {
    fwrite(STDERR, "İş emri tabanda okunamadı: .vardiya/is-emri.json\n");
    exit(1);
}

[$kod, $degisenler] = git('diff', '--numstat', "{$taban}...{$dal}");
if ($kod !== 0) {
    fwrite(STDERR, implode("\n", $degisenler) . "\n");
    exit(1);
}

$bulgular = [];
$toplam = 0;
foreach ($degisenler as $satir) {
    [$eklenen, $silinen, $yol] = explode("\t", $satir, 3);
    $toplam += (int) $eklenen + (int) $silinen;
    if (eslesir($yol, $emir['yasak'] ?? [])) {
        $bulgular[] = "{$yol}: iş emrinde yasak bölge";
    } elseif (!eslesir($yol, $emir['izinli'])) {
        $bulgular[] = "{$yol}: iş emrinin dışında";
    }
}

$sinir = (int) ($emir['en_fazla_satir'] ?? 0);
if ($sinir > 0 && $toplam > $sinir) {
    $bulgular[] = "değişiklik {$toplam} satır, iş emri en fazla {$sinir} diyor";
}

$testler = $emir['testler'] ?? ['tests/**'];
[, $fark] = git('diff', '-U0', "{$taban}...{$dal}");
$dosya = '';
foreach ($fark as $satir) {
    if (str_starts_with($satir, '+++ ') || str_starts_with($satir, '--- ')) {
        $dosya = str_starts_with($satir, '+++ b/') ? substr($satir, 6) : $dosya;
        continue;
    }
    if (str_starts_with($satir, 'diff --git ')) {
        $dosya = (string) preg_replace('#^diff --git a/(.+) b/.+$#', '$1', $satir);
        continue;
    }
    // Tabandaki test dosyası yalnızca büyür: silinen ya da değişen her dolu satır bulgudur.
    if ($satir !== '' && $satir[0] === '-' && trim(substr($satir, 1)) !== '' && eslesir($dosya, $testler)) {
        $bulgular[] = "{$dosya}: tabandaki test satırı silindi/değişti: " . trim(substr($satir, 1));
    }
}

// Kontrol, dalın koduyla ama TABANDAKİ testlerle çalışır.
$agac = sys_get_temp_dir() . '/teslim-' . bin2hex(random_bytes(4));
[$kod, $cikti] = git('worktree', 'add', '--detach', '--quiet', $agac, $dal);
if ($kod !== 0) {
    fwrite(STDERR, implode("\n", $cikti) . "\n");
    exit(1);
}
[, $tabanDosyalari] = git('ls-tree', '-r', '--name-only', $taban);
foreach ($tabanDosyalari as $yol) {
    if (eslesir($yol, $testler)) {
        git('-C', $agac, 'checkout', $taban, '--', $yol);
    }
}
exec('cd ' . escapeshellarg($agac) . ' && ' . $emir['kontrol'] . ' 2>&1', $kontrolCiktisi, $kontrolKodu);
git('worktree', 'remove', '--force', $agac);

if ($kontrolKodu !== 0) {
    $son = $kontrolCiktisi === [] ? '' : ' — ' . end($kontrolCiktisi);
    $bulgular[] = "kontrol tabandaki testlerle geçmedi (çıkış {$kontrolKodu}){$son}";
}

echo 'Görev: ' . ($emir['gorev'] ?? '?') . "\n";
echo count($degisenler) . " dosya, {$toplam} satır değişti.\n";
foreach ($bulgular as $bulgu) {
    echo "- {$bulgu}\n";
}

if ($bulgular === []) {
    echo "Teslim alınabilir. Kod incelemesi yine sizde.\n";
    exit(0);
}
echo count($bulgular) . " bulgu. Teslim alınmadı.\n";
exit(2);
```

The script has no dependencies and follows the same exit-code convention as the weighbridge in 6.1: 0 accept, 2 findings, 1 usage error. Two choices are deliberate. The work order is read from the base, not from the branch. And the check runs against the branch's code but with **the base's test files**: new tests the agent added stay in place, but any existing test it changed is put back to its base version.

The clean shift passed as expected: "1 file, 21 lines changed. Accepted." Exit 0. The overreaching shift:

```text
$ php teslim-tutanagi.php taban gece/taskin
Görev: Altınkaynak JSON fiyat metnini sayıya çeviren FiyatCozucu sınıfı
4 dosya, 34 satır değişti.
- .github/workflows/php.yml: iş emrinde yasak bölge
- .vardiya/is-emri.json: iş emrinde yasak bölge
- composer.json: iş emrinde yasak bölge
3 bulgu. Teslim alınmadı.
```

Three findings, all "forbidden zone": the CI workflow, the work order and `composer.json`. The code itself was correct on this branch and the test passed. But the shift had deleted the `composer validate` step from CI (it could never pass, since the repo had no `composer.json`), added a `composer.json` with PHPUnit 11 as a dependency, and added `.github/**` to the allowed list in the work order by itself. Had the script read the work order from the branch, the CI change would have looked "allowed". A night shift editing its own work order is like writing "worked according to instructions" in the log. The log isn't lying. The instructions changed.

The sloppy shift is sneakier. Its code only swapped the comma for a dot and didn't understand the thousands separator. On its own tests, the branch looked clean:

```text
$ php tests/fiyat-cozucu-test.php      # daldaki test
tüm durumlar geçti
$ echo $?
0
$ php teslim-tutanagi.php taban gece/gevsek
Görev: Altınkaynak JSON fiyat metnini sayıya çeviren FiyatCozucu sınıfı
2 dosya, 17 satır değişti.
- tests/fiyat-cozucu-test.php: tabandaki test satırı silindi/değişti: '6.382' => 6382.0,
- tests/fiyat-cozucu-test.php: tabandaki test satırı silindi/değişti: '19.517,61' => 19517.61,
- tests/fiyat-cozucu-test.php: tabandaki test satırı silindi/değişti: echo $hata === 0 ? "4/4 geçti\n" : "{$hata} hata\n";
- kontrol tabandaki testlerle geçmedi (çıkış 1) — 2 hata
4 bulgu. Teslim alınmadı.
```

The branch test says "all cases passed" with exit 0. The handover finds that two test cases were deleted and the summary line changed, and the base test fails with 2 errors. With two of the four cases gone, "4/4" would have been a lie, so the shift changed it to "all cases". It's the night-time version of the wish-and-seal problem from [5.2](https://halityesil.com/en/vibe-coder-5-2-ai-test-driven-development/). With an agent working next to you, you'd catch this in the diff. With a night shift, what you have in the morning is a green PR and a log saying "tests pass."

The script has blind spots. It flags every deleted non-empty line in a test file, so an agent fixing a typo in a comment also shows up. That noise is intentional: base tests only grow, and if one must shrink, a human makes that change. It also doesn't tell you whether the code is right, only whether the work order was followed and the base tests pass. Code review is still yours.

## Hooking the handover to the weighbridge

The handover should run on every PR that comes from the shift. The rule from [6.1](https://halityesil.com/en/vibe-coder-6-1-ci-pipeline-ai-agents/) applies: take the script from the base, not from the PR, or the shift can rewrite the handover too.

```yaml
name: Vardiya teslimi

on:
  pull_request:
    branches: [ master ]

permissions:
  contents: read

jobs:
  teslim:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Teslim tutanağı (tabandaki sürümle)
        env:
          TABAN: origin/${{ github.base_ref }}
        run: |
          git show "$TABAN:araclar/teslim-tutanagi.php" > "$RUNNER_TEMP/teslim-tutanagi.php"
          php "$RUNNER_TEMP/teslim-tutanagi.php" "$TABAN" HEAD
```

I did not run this workflow on GitHub Actions; I checked that the YAML parses and that the script gives the same result on a detached `HEAD` checkout. Mark it as a required status check, and add `/.vardiya/` and `/araclar/` to CODEOWNERS.

If you use Copilot cloud agent, one detail: by default the workflows on its PR don't run until you've reviewed the code and pressed the approve button. Don't switch that off. The moment you press it is the moment you open the morning log; the handover runs right after.

## When not to hand work to the night shift

- **When the work order won't fit in one sentence.** The slicing rule from [4.3](https://halityesil.com/en/vibe-coder-4-3-iterative-ai-coding/) bites harder at night. A boundary you couldn't write in the evening, the agent draws for you overnight.
- **When you can't write the "done" check.** Work without a check command comes back with a log that says "looks done to me."
- **When the job needs production data, secrets or an open network.** Codex stripping secrets before the agent phase and Cursor's exfiltration warning say the same thing: any key an unattended agent holds is held by every web page it reads.
- **When you can't read it all in the morning.** Getting ten PRs opened overnight is easy; really reading ten PRs in the morning is not. Hand over as much as you can review. The rest can wait.
- **Lean on the repo, not the vendor.** Jules winding down is a good reminder. If the work order, the handover script and the rules live in the repo, you can give the shift to another agency tomorrow.

The next and final chapter, Vibe Coder #7.2: 10 Golden Rules, will boil the whole handbook down to ten points and say goodbye. The full series and the list of published chapters are on the [Vibe Coder's Handbook](https://halityesil.com/vibe-coder-el-kitabi-sentaksin-olumu-orkestrasyonun-dogusu/) page (in Turkish).

The night shift finishes the job. What gets cut is decided in the evening, and what gets accepted is decided in the morning. By you, both times. Stay with technology.
