paperclipai/paperclip · error
Probe found no matching Anthropic Agent
Error message
Probe found no matching Anthropic Agent
What it means
resolveAgent finds a Paperclip-managed Anthropic Agent (by explicit agentId or by profile metadata). In probe mode it is forbidden to create resources, so when no matching agent exists it throws instead of POSTing /v1/agents. It signals that the remote managed agent has not been provisioned for this profile.
Source
Thrown at cli/src/commands/managed-agent.ts:294
"GET",
`/v1/agents/${encodeURIComponent(options.agentId)}`,
);
assertSafeManagedAgent(agent);
assertManagedAgentModel(agent, options.model);
return agent;
}
const existing = resourceByProfile(
await listAll(key, "/v1/agents"),
options.profileKey,
"Agent",
);
if (existing) {
assertSafeManagedAgent(existing);
assertManagedAgentModel(existing, options.model);
return existing;
}
if (options.probe) throw new Error("Probe found no matching Anthropic Agent");
const agent = await anthropicRequest(key, "POST", "/v1/agents", {
name: `Paperclip · ${options.displayName}`,
description: "Versioned Paperclip remote agent; runnerd supplies session tools.",
model: options.model,
system: CLAUDE_MANAGED_SYSTEM_PROMPT,
tools: [],
mcp_servers: [],
skills: [],
metadata: { paperclip_profile: options.profileKey },
});
assertSafeManagedAgent(agent);
assertManagedAgentModel(agent, options.model);
return agent;
}
function assertManagedAgentModel(agent: Record<string, unknown>, expectedModel: string): void {
const model = typeof agent.model === "string" ? agent.model : record(agent.model).id;View on GitHub (pinned to 5716fe907e)
Solutions
- Run setup without --probe once to create the managed Agent.
- Pass the existing agent's ID explicitly via the agentId option.
- Verify the API key/workspace contains the agent (GET /v1/agents) and its metadata.paperclip_profile matches.
- If the agent was mutated externally, fix or recreate it in a non-probe run.
Example fix
// before (probe on unprovisioned profile) cli managed-agent agent --probe // after cli managed-agent agent # creates Agent + Environment cli managed-agent agent --probe # probe now succeeds
Defensive patterns
Strategy: validation
Validate before calling
// pre-check agent existence before a probe run
const agents = await listAll(key, "/v1/agents");
if (!resourceByProfile(agents, profileKey, "Agent")) {
console.warn("No managed agent for profile; run setup without --probe first.");
} Type guard
function isManagedAgent(a: unknown): a is { id: string; model: unknown; metadata?: { paperclip_profile?: string } } {
return typeof a === "object" && a !== null && typeof (a as any).id === "string";
} Try / catch
try {
await resolveAgent(key, { ...opts, probe: true });
} catch (e) {
if (e instanceof Error && e.message === "Probe found no matching Anthropic Agent") {
// fall back to provisioning
await setupManagedAgent({ ...opts, probe: false });
} else throw e;
} Prevention
- Run non-probe setup once per profile before scripting probe checks.
- Persist agentId after creation and pass it explicitly thereafter.
- Avoid switching API keys between setup and verification.
- Watch for externally archived/deleted agents in the Anthropic console.
When it happens
Trigger: Calling the `agent` (or `environment`) command with options.probe=true when no agentId is given and listAll(key, "/v1/agents") contains no entry whose paperclip_profile metadata equals options.profileKey.
Common situations: First-time setup with --probe; switched to a new Anthropic API key/workspace; agent renamed, archived, or its metadata.paperclip_profile edited outside Paperclip; agent deleted in the Anthropic console.
Related errors
- Probe found no matching Anthropic Environment
- Anthropic did not return a usable pinned Agent version
- Existing Anthropic Agent model does not match the requested
- Anthropic pinned Agent version identity does not match the s
- agent_not_found
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-09-02).
Data as JSON: /api/errors/33a09277b2ca76a6.
Report an issue: GitHub.