Skip to main content

LAN_AGENT_NAMES_MAX_RESPONSE_BYTES

Constant LAN_AGENT_NAMES_MAX_RESPONSE_BYTES 

Source
pub(crate) const LAN_AGENT_NAMES_MAX_RESPONSE_BYTES: usize = _; // 65_536usize
Expand description

Hard cap on a single peer’s /agentmux/reactive/agent-names response body (Codex P1 on PR #3102): the lan_key a peer advertised authenticates THIS client TO that peer, not the peer to us — anything that can fake an mDNS advertisement for _agentmux._tcp.local makes it into self.instances and gets polled by this loop. Enforced while reading, not via Content-Length (a malicious peer can omit or lie about that while still streaming an unbounded chunked body). 64 KiB is generous for a plain name list — real fleets are agents-per-machine, not per-thousand.