Every weekday at 2:00
Some mornings the tests on main are red, and my first hour goes to finding out why and fixing it.
How it goes now
Open CI.Red.Scroll the log.Which test?Run it locally.Find the commit that broke it.Fix.Run everything again.Push. Open the PR.
Every red morning, before the real work.
Tell Kitewell once
Every weekday at 2:00, pull main and run the tests. If they fail, have my Claude Code agent fix the cause on a branch named fix/nightly-tests and commit, with Codex taking over if Claude Code fails. Wait for my approval, then push the branch and open a PR.
That's the whole setup. Kitewell lays out every step for you to check, and nothing is saved until you apply it.
Then it runs on its own
Nightly test fixRunning on this computer
- Run the testsPulls main and runs the suite. On a green night the run ends here, and nothing waits for you.Done
- Fix what failedClaude Code finds the cause, fixes it on a branch, runs the tests until they pass, and commits. If it hits its usage limit or fails, Codex starts the task over in its place.Done
- Wait for your OKNothing is pushed until you approve. Send it back with a note, and the agent works on it again with your note.Waits for you
- Push and open the PRgit push --force-with-lease, then gh pr create.Done
What you get instead
Nightly test fix7:30
Waiting for you: push fix/nightly-tests and open a pull request?
Fix what failed
- 2 tests failed on main after #512 was merged.
- Cause: totals were rounded before tax instead of after.
- Fixed the rounding in totals.ts. No test was changed.
- All 318 tests pass.
Push fix/nightly-tests and open a pull request?
Good to know
- To change code and run your tests with nobody watching, each agent needs those permissions: allow them in the tool's own settings for the repository, or turn on Bypass permission prompts on its entry in Agents & models. Either way, nothing is pushed until you approve.
- Each agent works with the sign-in it already has. When Codex takes over, it starts the task from the beginning, so that work is paid for again.
- Your computer needs to be on and awake when it runs. A run missed while it slept starts when it wakes, within 24 hours by default.
What it needs
- A command-line agent such as Codex or Claude Code, installed and signed in
- A Git repository and the gh command
More chores
- Every MondayEvery Monday I update our dependencies, run the tests, and lose the morning fixing whatever broke.
- Every new pull requestEvery pull request waits for my first pass, and most of what I flag, a careful second reader would have caught.
- Every morningEvery morning I open each pull request just to work out which one could break something.