Outcall
SpecificationsS005 · Agent Shim

Edge cases

S005 Edge Cases

IDScenarioExpected Behavior
S005-EC-001agent.sock does not exist at startupShim logs error to stderr and exits with code 5. No retry.
S005-EC-002agent.sock disappears mid-session (file deleted or unmounted)Next request or heartbeat fails with connection error. Shim exits with code 5.
S005-EC-003outcalld crashes while a check request is in flightThe socket returns a broken pipe or connection reset. Shim exits with code 5. The in-flight action is not executed (fail closed).
S005-EC-004outcalld is alive but does not respond within timeoutAfter the timeout (default 30s), the shim treats it as unreachable. Shim exits with code 5.
S005-EC-005outcalld returns a malformed response (invalid JSON, missing fields)Shim treats malformed responses as a block verdict (S005-FR-011). Logs the parse error to stderr. Does not exit — only the specific action is denied.
S005-EC-006Agent sends multiple concurrent tool invocationsEach invocation is checked independently via its own request to outcalld. Requests are serialized or multiplexed per the agent API protocol (S004). No request bypasses the check.
S005-EC-007outcalld rejects the registration (unknown container, policy violation)Shim logs the rejection reason to stderr and exits with code 5. The agent cannot run without successful registration.
S005-EC-008agent.sock exists as a file but nothing is listening (stale socket)Connection attempt fails. Shim exits with code 5. The exists() check passes but the connect fails — this is why S005-FR-002 requires a connection attempt, not just a path check.
S005-EC-009Agent process attempts to overwrite or delete /usr/local/bin/outcallThe bind mount is read-only. The write/delete syscall returns EROFS. Shim binary is unaffected.
S005-EC-010agent.sock flaps (disappears and reappears rapidly)The shim does not attempt reconnection. On the first failure, it exits with code 5. Reconnection is not the shim's job — the container orchestrator should restart the container.

On this page