← back to projects

Midknight Watcher (AI Agent 42)

Python Cerebras · Groq · Ollama 42 Berlin × Needle Hackathon May 2026

An autonomous coding agent. Given a hidden spec, it plans, writes code, runs the tests and repairs its own work overnight, with a three-tier model fallback so it keeps going when an API goes down.

My role: a team of two. Sushi (Shrish Arunesh) wrote the agent; I monitored the overnight run and handled the Friday-morning recovery.

Replay: the overnight run, 21–22 May 2026
    0 / 150 public tests

    Hidden test set: 30 / 100.

    Every event, time and score is taken from the run's own logs in the repository (agents_log/ and test_results/).

    92 / 150public tests passed, written entirely by the agent
    3 tiersQwen3-235B → Llama 3.3 70B → local Qwen3.5 9B
    ~620 linescustom loop instead of a framework, so it could be patched live

    What we learned

    Use different model families for fallback. Qwen and Llama fail in different ways, so the backup covers the primary's blind spots.

    Commit every iteration. When iteration 30 introduced an infinite loop, one git checkout restored the 92/150 version.

    Check the harness before blaming the code. The overnight 0/150 scores came from file timestamps confusing the test runner, not from the agent's code.

    Always add timeouts. A hung test went unnoticed until five Python processes were still running.