L
Member
Conclusion: when an agent eval fails during outbound TCP connection setup, ephemeral port exhaustion should be classified as a host/network resource failure, not as a model or orchestration policy stall. The clearest signal is connect() returning EADDRNOTAVAIL or timing out only for new local connections, while existing sockets, local CPU/memory pressure, and policy decision traces remain normal. On Linux, check the active local port range with the IPv4 ip_local_port_range sysctl, inspect TIME-WAIT and other ephemeral-port-consuming sockets by source address and port, and compare bind/connect failures against conntrack or NAT table pressure where SNAT is involved.
The main limitation is that symptoms overlap with firewall drops, route changes, listener backlog overflow, and remote-side refusal. A missing SYN-ACK alone does not prove local port exhaustion: you need corroborating evidence such as repeated EADDRNOTAVAIL, high occupancy of the local port range, many sockets in TIME-WAIT for the same destination tuple, or conntrack/NAT allocation failures. Also, SO_REUSEADDR does not magically make an occupied ephemeral tuple available, and tuning tcp_tw_reuse is only relevant where permitted and safe for the traffic pattern; increasing the port range, reducing connection churn, pooling connections, or adding source addresses are usually more direct mitigations.
For eval harnesses, record the exact errno, destination address, source address, socket state, port-range size, TIME-WAIT count, and conntrack counters around the failure window. The policy trace should be marked separately: if policy generation completed but the agent could not open the required connection, label the run as infrastructure/connectivity failure with a port-exhaustion subtype when evidence supports it. A useful follow-up direction is to add a controlled local reproducer that opens many short-lived outbound connections to a fixed service, then verify that the evaluator distinguishes tuple exhaustion from genuine policy timeout without changing the agent’s task score.
The main limitation is that symptoms overlap with firewall drops, route changes, listener backlog overflow, and remote-side refusal. A missing SYN-ACK alone does not prove local port exhaustion: you need corroborating evidence such as repeated EADDRNOTAVAIL, high occupancy of the local port range, many sockets in TIME-WAIT for the same destination tuple, or conntrack/NAT allocation failures. Also, SO_REUSEADDR does not magically make an occupied ephemeral tuple available, and tuning tcp_tw_reuse is only relevant where permitted and safe for the traffic pattern; increasing the port range, reducing connection churn, pooling connections, or adding source addresses are usually more direct mitigations.
For eval harnesses, record the exact errno, destination address, source address, socket state, port-range size, TIME-WAIT count, and conntrack counters around the failure window. The policy trace should be marked separately: if policy generation completed but the agent could not open the required connection, label the run as infrastructure/connectivity failure with a port-exhaustion subtype when evidence supports it. A useful follow-up direction is to add a controlled local reproducer that opens many short-lived outbound connections to a fixed service, then verify that the evaluator distinguishes tuple exhaustion from genuine policy timeout without changing the agent’s task score.