C-phase-3-reliability

C-phase-3-reliability is an agent for coding agents from darkiceinteractive/mcp-conductor. It costs 0 tokens per session (615 once invoked), scanned A, original, MIT.

A development task for adding reliability controls and structured errors to an MCP tool gateway. A gateway routes coding-agent requests to external MCP servers and tools.

In plain words
What is it for?
Adding per-server time limits, retries, circuit breakers that temporarily stop repeated failures, and errors that identify the server, tool, and upstream failure.
Why use it?
It is meant to make failures clearer and stop slow or failing servers from blocking the agent indefinitely.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/darkiceinteractive/mcp-conductor/c-phase-3-reliability
Clone the repo
git clone --depth 1 https://github.com/darkiceinteractive/mcp-conductor

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for C-phase-3-reliability

README.md
[![agentmods](https://agentmods.dev/badge/agents/darkiceinteractive/mcp-conductor/c-phase-3-reliability.svg)](https://agentmods.dev/agents/darkiceinteractive/mcp-conductor/c-phase-3-reliability)
Your own site
<a href="https://agentmods.dev/agents/darkiceinteractive/mcp-conductor/c-phase-3-reliability"><img src="https://agentmods.dev/badge/agents/darkiceinteractive/mcp-conductor/c-phase-3-reliability.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 615 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00615
Opus 5 $0.00000 $0.00308
Sonnet 5 $0.00000 $0.00123
Haiku 4.5 $0.00000 $0.00061

Measured 3d ago against content hash 9865c36888d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

C-phase-3-reliability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

_plans/v3-enhancements/agents/C-phase-3-reliability.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent C — PRD Phase 3 Reliability gateway + MCPToolError

You build per-server timeouts/retries/circuit breakers + the structured MCPToolError class.

Setup

pwd  # /mcp-executor-darkice-worktrees/C-phase-3
git branch --show-current  # feature/v3-phase-3
git fetch origin && git rebase origin/feature/v3-phase-0-1   # pick up A's Phase 0 scaffold
npm install
npm run test:run

Read _plans/v3-enhancements/MCP-Conductor-v3-PRD.md §5 Phase 3 (lines ~542–684) and the consolidated plan's Amendment to PRD Phase 3 (MCPToolError class).

Append start checkpoint to STATUS.md under Agent C.

Scope

Build everything in src/reliability/ per PRD §5 Phase 3 + add this amendment from the consolidated plan:

// src/reliability/errors.ts (or include in index.ts)
export class MCPToolError extends Error {
  constructor(
    public code: string,            // upstream error code if available
    public server: string,
    public tool: string,
    public upstream: unknown        // original error object
  ) { super(`[${server}.${tool}] ${code}`); }
}

Hub callTool (src/hub/mcp-hub.ts:679 area) re-throws upstream errors as MCPToolError. Executor surfaces them in the sandbox preamble so Claude can catch (e) { if (e.code === 'contract_not_found') ... }.

Wiring order with Cache (Agent B): cache miss → reliability gateway → backend. Reliability profile resolved from: tool-level ToolDefinition.reliability → server-level config → global default.

Acceptance

PRD §5 Phase 3 "Acceptance criteria" + these additions:

  • MCPToolError thrown from sandbox is catchable as e instanceof MCPToolError with .code/.server/.tool/.upstream populated.
  • Hub never wraps an MCPToolError in a generic Error.

Commit pattern

feat(v3-phase-3): ReliabilityProfile + defaults
feat(v3-phase-3): circuit breaker (closed/open/half-open)
feat(v3-phase-3): retry with exponential backoff
feat(v3-phase-3): timeout enforcement with AbortSignal
feat(v3-phase-3): ReliabilityGateway composition
feat(v3-phase-3): MCPToolError class + hub re-throw
feat(v3-phase-3): sandbox-side MCPToolError shim
test(v3-phase-3): full suite + IBKR-style hang fixture

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 61 lines · 0 tokens per session scan A 9865c36888d9

Subscribe to this mod's changes

C-phase-3-reliability is an agent published in the GitHub repository darkiceinteractive/mcp-conductor (0 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 615 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.