Skip to main content

The Problem

Two agents want to edit createSubscription. One has it reserved; the other needs it. Without a protocol, the second agent either blocks indefinitely, edits in a fork, or escalates prematurely.

The Protocol

Negotiations are a state machine with bounded turns and a deadline.
negotiate_open (initiator)

negotiate_respond (counterparty): yield | hold | defer | counter | split

resolved | escalated | expired

Actions

ActionEffectTerminal?
yieldCounterparty releases the symbol. Initiator proceeds.Yes
holdCounterparty keeps the symbol. Initiator routes around or escalates.Yes
deferCounterparty asks for defer_ms more time.No
counterFree-form reply keeping the turn open.No
splitPartition the contested symbols between the two parties.Yes

Auto-resolution

If the counterparty doesn’t respond before deadline_ms (default: 5 minutes), the negotiation auto-resolves in the initiator’s favor — because a silent lockholder is no better than no lockholder.

Escalation

Hitting max_turns without a terminal action marks the negotiation escalated and surfaces it in the web dashboard for a human to resolve.

When to Open One

The file-reservation denial message includes the holder’s session id and current task. If routing around is impractical (the symbol is the point), call negotiate_open with a clear rationale. Don’t negotiate for symbols you’ll touch once and move on — route around. Negotiate when you genuinely need the symbol and the other agent should know.

Discovery

Call negotiate_list at session start (or after a long break) to catch anything waiting on your response.