The upstream went quiet. Our dependency didn't.

The numbers that forced the decision:

  • Last upstream release: v0.86.0, August 2025
  • Last push to the repo: May 2026
  • Open issues at fork time: 1,960
  • Active successor forks: zero

aider is a terminal coding agent — the model proposes edits, aider applies them to your repo and commits them. PVC, our app-building platform (docs), runs aider as one of its coding engines, which means an agent nobody controls writes files into projects on our infrastructure. When the upstream maintainer goes dormant, nobody is coming to fix the security bugs. Waiting wasn't a plan.

So in early November 2026 we forked it. The rest of this post is the exact sequence, because the interesting finding wasn't any single bug. It was a containment gate that existed in the codebase and was never called.

Making a private fork the hard way

GitHub won't let you fork a public repo into a private one. So we did it manually: bare clone of upstream, then a --mirror push into a fresh private repo under our org — full git history preserved, plus an upstream remote kept locally for cherry-picks if Aider-AI ever revives.

Then discipline, before touching any security-relevant code. The baseline cps.1 commit established:

  • Version marker 0.86.3.dev+cps.1 — a PEP440 local version segment, so every install self-identifies as the fork. No confusion with upstream in a package list, ever.
  • A policy file (CPS-FORK.md): models flow only through our ClaimCheck-backed lanes, no PyPI publishing, no upstream sync. Why the lanes matter is its own story — see our ClaimCheck posts.
  • CI trimmed and kept: removed 7 upstream workflows we'd never use (PyPI checks, DockerHub, issues, Pages), kept the Ubuntu/Windows test suites and pre-commit, added our own smoke workflow.

Version markers and policy files sound like paperwork. They're the difference between a fork and a shadow dependency.

cps.2: four fixes in one batch

We walked the upstream issue tracker for security-relevant reports and shipped four fixes as cps.2:

#5772 — config RCE. aider auto-loaded .aider.conf.yml from the current working directory and the git root. Translation: a hostile repo could ship a config file that executes code the moment the agent opens the project. Auto-load is now homedir-only; an explicit --config flag still works. Our hostile-cwd test went from parsing the planted config to 0 parse errors.

#5872 — silent exit 0. --message-file pointing at a missing file exited successfully. The root cause is a Python gotcha worth memorizing: io.read_text returns None for a missing file — it doesn't raise — so the "handle the failure" path never fired. One empty-check later, it exits 1. Testing lesson from the same hour: our first test measured tail's exit code through the pipe instead of aider's. Check PIPESTATUS.

#5376 — hooks back on. aider committed with --no-verify by default, so git hooks never ran on agent commits. We flipped the default to True. When an AI agent commits to your repo, the commit trail is the review trail — it shouldn't bypass the checks the humans run.

#5384 — no shell injection. The /git command shelled out with model-suggested arguments. Now: shlex.split + shell=False.

cps.3: the gate that never ran

Then the big one — and it wasn't a clearly-labeled issue. It was what we found by reading the write paths.

aider has a function called allowed_to_edit(). It sounds like a containment gate: verify the path is inside the repo before writing. It is. Here's the problem: none of the three edit formats — editblock, wholefile, udiff — called it. The only call site lived in a legacy update flow. The three formats that handle effectively all modern agent edits wrote files with zero path checks. A model suggesting ../../.ssh/authorized_keys, or an absolute path via prompt injection, would have been obeyed.

The fix is deliberately boring:

  • a realpath containment gate at the top of allowed_to_edit() — refuses .. escapes, absolute paths outside the repo, and symlinks that resolve outside the repo root. realpath specifically, because a naive prefix check is defeated by a symlink;
  • the same gate at the top of all three edit-format apply loops.

Seven containment tests, 7/7 passing, plus a regression confirming in-repo edits still apply and auto-commit.

One gotcha worth logging: the first refused-edit test crashed — not in the gate, but in the failed-edit hint code, which tried to read the nonexistent path to suggest similar files, got None, and choked on it. When you add a guard, test the refusal path too. Error handlers are code, and code can crash.

What we didn't fix

Two known issues are deliberately deferred, with the reasoning written down:

  • #5706 — the wholefile format silently discards some edits in parser edge cases. The fix touches a parser heuristic with no upstream test coverage; the risk of breaking currently-correct behavior exceeds the risk of the bug. Safe posture: editblock is the default format.
  • #4436 — litellm futures-after-shutdown noise. The fix is a litellm upgrade, scheduled for a maintenance window with a full test battery retest.

Deferred is not ignored. A dormant upstream means no test suite is coming to save you, so every deferral is a documented bet with a trigger condition.

The config file that beat the environment

Week one in production taught the ops lesson no code review would have caught.

Our PVC service sets OPENAI_API_BASE per run so aider hits the right gateway. Except aider's YAML config outranks env vars — and a ~/.aider.conf.yml with an openai-api-base key sat in the service account's home directory. pvc-api runs as nmoore, so that home-dir config leaked into every production aider run, silently pointing them at the wrong gateway.

The symptom looked like a lane bug — a gateway rejecting model names with "Invalid model." We briefly had the wrong theory about which component was misconfigured, until live probes cleared the lane and pointed back at the client. The real fix: pass explicit --openai-api-base / --openai-api-key CLI args, which outrank everything.

Three rules we extracted:

  1. Never rely on an env var a config file can shadow. Pass CLI args from the service.
  2. A service account's home directory is part of your configuration surface — audit it like code.
  3. When a plausible theory can't be confirmed on the wire, stop defending it and probe the actual bytes.

The playbook, compressed

  • Read gate paths, not feature lists. The audit that mattered was one question: trace what happens when the model writes a file. The scariest finding wasn't a bug — it was a security function that existed and was never called.
  • Make the fork's identity mechanical — version segment, policy file, CI, upstream remote for cherry-picks.
  • Fix the class, not the instance. One containment gate function, called at every write path — not three patched apply loops with divergent logic.
  • Defer honestly, in writing, with a trigger.
  • Assume config leakage into service contexts, and win the priority war with explicit CLI args.

Forking dormant code isn't maintenance — it's a security exercise. The upstream's dormancy isn't the risk; plenty of dormant tools run fine for years. The risk is the guard that never runs, and the only way to find those is to read the paths where your agents write.