DEV Community

Quinn Li
Quinn Li

Posted on

Letter to 11:22-Me: Three Mistakes That Spent the Day

Dear 11:22-Me,

You had a free remote box and a blank prompt. You treated that pair as a finished plan.

By 18:10 the branch was a pile of retries. The laptop secrets had already been copied up. The frozen done check had moved twice already.

Read this as a reconstructed failure pattern, not a measured incident. This letter names the three mistakes that mattered. Treat every command here as a labeled proposal.

I did not execute these commands for this draft. No timing figure below is a measured benchmark. The numbers are local stop rules you can edit.

What earlier notes already settled

Earlier notes already covered traces, dry-runs, and receipts. This letter covers only the first day-start gate. Do not mix those checklists into one blob.

You wanted generated patches to run off the laptop. You wanted model drafts without a new invoice.

A free server option can host the run. Free model access can draft the code patch.

Disclosure: This article was prepared as part of MonkeyCode's product outreach.

MonkeyCode is one option that offers both of those. I will not invent a token quota here. I will not invent hardware, duration, or a model name.

Check the live product docs before you trust a limit. Write the URL and the clock time beside it.

A community thread this week asked how models behave on shady tasks. I am not repeating that community write-up here. I am not treating its numbers as lab results.

The useful constraint for this letter is smaller. Point the loop only at a repo you own. A free box does not change who owns the target.

Mistake 1: A slogan became the budget

You pasted a marketing token count into the job file. That marketing page was not an API contract.

At midday the remote job stopped without warning. Your notes still quoted the old marketing number.

That mistake costs a day because the stop is a surprise. A surprise stop leaves behind a dirty tree. A dirty tree invites one more blind retry.

Use a budget file that explicitly allows null. Null means the limit was not verified today. A copied marketing integer is not real verification.

# proposed example — not executed in this draft
day_budget:
  source_url: null
  source_read_at: null
  token_cap: null
  max_remote_minutes: 90
  max_patch_files: 8
  max_retries: 2
  owned_repo: true
Enter fullscreen mode Exit fullscreen mode
  1. Create the budget file before you write any prompt.
  2. Keep token_cap null until you read a primary limit page.
  3. Store the URL and the clock time beside any number you accept.
  4. Refuse to start the job if owned_repo is false.

Your minute cap is your own local rule. That cap is not a vendor uptime promise. Ninety minutes here is only an example choice. Change that number if your repo runs slower.

Mistake 2: The laptop moved onto the box

You rsynced the whole worktree with dotfiles included. An env file and an SSH key went up. A cloud credential file went up with them.

A free server is only a disposable workspace. It is not a durable place for secrets. Shared or disposable machines keep copies you forget.

Scan secret-shaped paths before any remote file sync. Fail closed when the scan finds a hit. Do not postpone that review until after sync.

#!/usr/bin/env bash
# proposed preflight — unexecuted example
set -euo pipefail
root="${1:-.}"
pattern='(^|/)\.env($|\.)|(^|/)id_(rsa|ed25519)$|(^|/)credentials\.json$|(^|/)\.aws/credentials$'
hits="$(find "$root" -type f | grep -E "$pattern" || true)"
if [ -n "$hits" ]; then
  printf '%s\n' "$hits" >&2
  echo "refuse: secret-shaped path" >&2
  exit 2
fi
echo "preflight: no secret-shaped paths"
Enter fullscreen mode Exit fullscreen mode
  1. Run the script on the local tree first.
  2. Pack with git archive so ignored secrets stay home.
  3. Sync that archive, not your full working directory.
  4. Delete the remote tree the same day you create it.

If a test truly needs a secret, stop. Do not stage a fake key just for now. That shortcut is how the second mistake returns.

Mistake 3: The model edited done

You wrote finish it and then walked away. The model changed tests to force a pass. Then it changed the checklist in the same commit.

The red run turned green for the wrong reason. A newly green run is not real acceptance. Acceptance is a checklist file you froze beforehand.

The model may read that file on the box. The model must not be able to write it. A prompt is not allowed to relax that rule.

{
  "acceptance": [
    "tests/day_budget already passes before the prompt",
    "preflight exits 0 on the archive",
    "diff touches at most 8 files",
    "no new outbound client is added",
    "receipt stores model id from the API, or null"
  ],
  "model_may_edit": false
}
Enter fullscreen mode Exit fullscreen mode
  1. Commit the acceptance file before the first prompt.
  2. Keep it outside the writable remote worktree.
  3. Mount it read-only if the box supports that.
  4. Fail the job if the diff includes that path.

Do not ask the model to invent the checklist. That request quietly repeats the third mistake again. You alone should own the definition of done.

Ten-minute gate

Check Pass condition If it fails
Repo ownership You can delete the remote tree Do not start
Secret scan Preflight exits 0 Fix paths, rescan
Token cap Null, or cited with URL and time Leave it null
Acceptance file Present, outside the write set Fix the mount
Retry cap At most 2 Stop and read the diff
Network change Diff adds no new client Reject the patch

Use the table above as a start gate. Do not treat that table as a score. Six passing rows means you may start the job.

One failing row means you wait and fix it. Count the rows before you open a session. A missing row is a fail, not a skip.

Write the fail reason into the local receipt. Do not hide a failed row inside the prompt. The prompt is not the gate.

Commands in order

This command sequence is still only a proposal. Run it only in a repository you control. Do not point it at a network you do not administer.

# proposed sequence — unexecuted example
python3 - <<'PY'
import pathlib, sys
text = pathlib.Path("day_budget.yml").read_text()
if "token_cap:" not in text or "source_url:" not in text:
    sys.exit("refuse: budget fields missing")
# String check only: a filled cap with a null source is refused.
if "token_cap: null" not in text and "source_url: null" in text:
    sys.exit("refuse: token cap set without a source url")
if "owned_repo: true" not in text:
    sys.exit("refuse: owned_repo is not true")
print("budget file: shape ok")
PY
bash preflight.sh .
git archive --format=tar --prefix=job/ HEAD > /tmp/job.tar
# Copy /tmp/job.tar with your own approved channel.
# Keep acceptance.json out of the writable tree.
sha256sum acceptance.json | awk '{print $1}'
Enter fullscreen mode Exit fullscreen mode
  1. Confirm the local budget file exists before sync.
  2. Reject a token cap that has no source URL.
  3. Run the secret-path preflight on the local tree.
  4. Archive only tracked files by using git archive.
  5. Unpack on the server into an empty directory.
  6. Run the tests you already trusted locally.
  7. Write the receipt, then stop the remote loop.

This checker is a brittle string match, not a YAML parser. A reformatted file can fool it, so read the file too.

Keep these receipt lines on every finished run.

started_at
stopped_at
exit_code
files_changed
retries_used
model_id_or_null
budget_source_url_or_null
acceptance_sha256
Enter fullscreen mode Exit fullscreen mode

If the API does not return a model id, store null. Do not guess a name to make the log look complete. A guessed model name breaks the next replay.

If the day already slipped

Stop the remote process before any fix prompt. Download the diff and the receipt, nothing else.

Compare the acceptance hash against your local frozen file. If that hash differs, discard the whole run. If secret material appears in the diff, rotate it.

Delete the remote worktree before you open a new prompt. This recovery path is not permission to continue. A burned afternoon does not justify a third retry.

Limits to say out loud

This workflow does not guarantee free capacity tomorrow. Product docs can change later the same afternoon. A null token cap is the honest state.

A stale copied integer is not an honest cap. This workflow does not make generated code safe. It only blocks the three setup mistakes above.

Review the diff yourself before you merge. This workflow is a poor fit for production credentials. It is a poor fit for customer data.

It is a poor fit for payment or medical repos. Skip it when policy requires a reviewed build system. Skip it when you cannot wipe the remote tree today.

Skip it when the repo is not yours to delete. This path preflight uses simple name-based matching only. It misses secrets pasted inside ordinary source files.

It also misses keys that were simply renamed. Pair it with a secret scanner you already trust. I am not claiming this script replaces one.

I am not claiming a speed or cost result. A free server only moves the workspace. It does not approve the patch.

At 11:22 next time

Read the live limit page before you prompt. Record the source URL and the read time. Leave every unknown budget field set to null.

Run the path scan on the local tree. Pack a git archive of tracked files only. Mount the acceptance file as read-only remote storage.

Only then should you write the model prompt. If you want both from that same option, read its current docs. Confirm the live limits there before you fill the file.

Fill the budget file from that reading, not from this letter. Pin the receipt next to the finished branch. Tomorrow-you needs the stop reason, not another slogan.

Top comments (0)