Category: spec-conformance Severity: minor
Location: crates/arcp-runtime/src/runtime/server.rs:859-871
Spec: ARCP v1.1 §12 (AGENT_NOT_AVAILABLE — "Requested agent is not registered.")
What
When the requested tool/agent is not registered the runtime emits job.failed with ErrorCode::NotFound. §12 defines a dedicated AGENT_NOT_AVAILABLE code for exactly this case (the version-mismatch sibling AGENT_VERSION_NOT_AVAILABLE is already implemented). Clients distinguishing "agent unknown" from generic not-found cannot.
Evidence
let Some(handler) = self.inner.tools.get(&agent_ref.name) else {
let mut err = Envelope::new(MessageType::JobFailed(JobFailedPayload {
code: ErrorCode::NotFound,
retryable: Some(false),
message: format!("tool not registered: {}", agent_ref.name),
details: None,
}));
Proposed fix
Add AgentNotAvailable to ErrorCode (rename "AGENT_NOT_AVAILABLE") and use it here.
Acceptance criteria
Category: spec-conformance Severity: minor
Location:
crates/arcp-runtime/src/runtime/server.rs:859-871Spec: ARCP v1.1 §12 (
AGENT_NOT_AVAILABLE— "Requestedagentis not registered.")What
When the requested tool/agent is not registered the runtime emits
job.failedwithErrorCode::NotFound. §12 defines a dedicatedAGENT_NOT_AVAILABLEcode for exactly this case (the version-mismatch siblingAGENT_VERSION_NOT_AVAILABLEis already implemented). Clients distinguishing "agent unknown" from generic not-found cannot.Evidence
Proposed fix
Add
AgentNotAvailabletoErrorCode(rename"AGENT_NOT_AVAILABLE") and use it here.Acceptance criteria
AGENT_NOT_AVAILABLE.