oliver-zehentleitner / maity

docs + hub: an instance waiting for its takeover uses wait, not resume, and wait wakes on the takeover

Sign in to report

tsk-kfweyfbx6qg7 Open

Feedback from the KTW project (ktw-head via warh, seq 149695), 2026-11-17, lower priority.

During a takeover handover, the old instance ran maity resume after every maity wait timeout, to see whether the takeover had happened. That opened about 30 sessions overnight.

Fix both, smallest first:

  1. Docs: In the handover and takeover text (docs/agents.md, and the briefing where it tells an instance about a pending takeover): "To watch for a takeover, keep running maity wait; don't run maity resume again. Your wait ends when the takeover happens."
  2. Hub/CLI: Make that true. A takeover that ends an instance's session wakes that instance's maity wait with an event (e.g. takeover_outcome, or session_ended for the old instance), and wait exits with a clear line saying the instance was taken over and must stop. Check what the hub sends today before adding anything. Contract first if it's new.