KiCad - the KiCad Bridge
Public Made by Adomby adom
Drive your own KiCad from an AI, in the background: open every editor, read the whole board as data (the EDA Bridge Standard board model), stack-up, part heights, netlists, place, route, pour, DRC and exports.
kicad_add_zone returns a revision the async zone fill makes stale a moment later: the next edit gets stale_board
Symptom
kicad_add_zone answers refilled: true with a board revision, and kicad_zone_state straight after answers the same revision. A moment later the live board has a different revision, so the next edit that passes that revision is refused with stale_board ("expectedRevision must match the current live board"), and every chained edit after it fails the same way.
Seen on arav-rog (KiCad 10.0.3) in the verb battery, 2026-09-21, bridge 1.0.50: remove_zone, apply_zone_plan and the three silk batch verbs all stale_board. Intermittent: of two reruns of the live-board phase one failed the same way and one passed all 23 verbs. ConfRoomROG (10.0.5) passed. Nothing in this code path changed between 1.0.37 and 1.0.50, and 1.0.37/1.0.38 passed on arav-rog, so this is timing, not a regression.
add_zone ok revision 1608735e... refilled:true
zone_state ok revision 1608735e...
remove_zone stale_board currentRevision dae81f97...
Likely cause
KiCad fills zones asynchronously. The add verb commits, asks for a fill, and reads the revision before the fill has landed; the fill then changes the board.
Fix options
- After the commit, poll the revision until it is stable across two reads (bounded, a few seconds) before answering, so the
revisionin the reply is the board the caller will see. - Or answer
refillPending: trueand no revision, the same contractkicad_zone_state {refill:true}already has (skills/kicad-copper-pours step 5), and tell the caller to read the revision withkicad_zone_stateonce the fill settles.
The refusal itself is correct: the bridge must never apply an edit against a board it has not seen. What is wrong is that its own reply handed the caller a revision that was about to be stale.