You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose agent planning over MCP with out-of-band approval and remainder replan (Decision 136) #1896
reference-apps#288 needs an AI agent, connected over MCP, to submit a structured goal target, read candidate plans, and have a human approve one out of band (Decision 136). Today traverse-mcp's stdio server exposes only search/describe/validate/execute entrypoint commands. The tested planning and proposal functions (crates/traverse-mcp/src/tools/workflow_plan.rs, tools/proposals.rs) are not wired in, and no spec defines a host-minted out-of-band approval token or a trace-bound remainder replan.
Scope
Spec 109 amendment: approval is minted by a host-run out-of-band surface (local page or CLI prompt) as a single-use token bound to the proposal digest; no MCP command approves.
Spec 113 amendment: a remainder replan takes completed steps' outputs, bound to their trace digests, as starting facts, and excludes the failed capability version.
traverse-mcp stdio: expose target submission, planning, proposal read, and token-gated execution; no approve command.
Host approval surface: a minimal local approval page or CLI prompt that shows the proposal and mints the token.
Definition of Done
Spec 109 and Spec 113 amended and approved per Decision 136 (rules 3 and 4).
traverse-mcp stdio commands for target submission, planning, proposal read, and execution with an approval token; an MCP client has no way to obtain or mint a token.
Out-of-band approval surface mints a single-use token bound to the proposal digest; reuse, a digest mismatch, and a missing token each fail closed with a stable error.
Remainder replan: completed outputs enter as trace-bound starting facts; a tampered or unbound fact is rejected; the failed capability version is excluded.
Tests for each fail-closed path; 100% coverage gate holds for traverse-mcp.
Docs: MCP command reference and the approval flow.
Blocked from implementation by its recorded needs-spec prerequisite: the required amendments to Specs 109 and 113 and the approval-token/remainder-replan contract have not been approved. Per the operating model, no implementation ticket is claimed until those governing artifacts are complete.
Decision: The first out-of-band approval surface is a host-owned local CLI prompt. A local page is deferred as a later adapter and must use the same host-minted token contract.
Rationale: A CLI prompt is portable across supported hosts, keeps approval outside the MCP client and agent, and avoids introducing a browser/UI dependency into a governed runtime capability.
Options considered:
CLI prompt: chosen.
Local page: deferred; useful UX but adds a host/UI surface before the core contract is proven.
Both now: rejected; duplicates sensitive approval behavior.
Consequences: MCP exposes no approval command. The host renders the proposal and mints the token only after a human confirms it; future UI adapters consume the same contract.
Decision: Approval uses a signed, single-use token plus a host-side replay ledger. The token is bound to the proposal and snapshot digests, issuer/key identity, approver principal/role, workspace scope, permitted effects/connectors, expiry, and one-use nonce.
Rationale: Signed claims support portable verification and audit; host-side consumption before execution prevents replay. The authority remains outside MCP and cannot be minted by an agent or MCP client.
Options considered:
Signed token plus replay ledger: chosen.
Opaque in-memory nonce: rejected because it is not independently verifiable and fails across restarts.
MCP-issued token: rejected because it would grant the agent/client approval authority.
Consequences: Missing, expired, scope-mismatched, digest-mismatched, revoked, or consumed tokens fail closed with a stable error before side effects. Key custody follows host-owned trust rules.
Decision: A remainder replan receives only bounded, schema-validated output references bound to completed-step trace digests. The host resolves authorized values locally; raw secrets, credentials, and unrestricted prior outputs do not enter MCP or the planner.
Rationale: This preserves the Decision 136 remainder-only behavior while maintaining least disclosure, bounded evidence, and deterministic validation.
Options considered:
Trace-bound host-resolved references: chosen.
Raw completed outputs to the planner: rejected because it weakens data boundaries and makes limits/evidence harder to enforce.
Replan from the original goal: rejected because it can repeat completed side effects.
Consequences: A missing, tampered, expired, unbound, or schema-invalid reference fails closed. The failed capability version is excluded and every replan needs new out-of-band approval.
Activity
enricopiovesan commentedon Nov 19, 2026
Blocked from implementation by its recorded
needs-specprerequisite: the required amendments to Specs 109 and 113 and the approval-token/remainder-replan contract have not been approved. Per the operating model, no implementation ticket is claimed until those governing artifacts are complete.enricopiovesan commentedon Nov 20, 2026
Decision record
Decision: The first out-of-band approval surface is a host-owned local CLI prompt. A local page is deferred as a later adapter and must use the same host-minted token contract.
Rationale: A CLI prompt is portable across supported hosts, keeps approval outside the MCP client and agent, and avoids introducing a browser/UI dependency into a governed runtime capability.
Options considered:
Consequences: MCP exposes no approval command. The host renders the proposal and mints the token only after a human confirms it; future UI adapters consume the same contract.
enricopiovesan commentedon Nov 20, 2026
Decision record
Decision: Approval uses a signed, single-use token plus a host-side replay ledger. The token is bound to the proposal and snapshot digests, issuer/key identity, approver principal/role, workspace scope, permitted effects/connectors, expiry, and one-use nonce.
Rationale: Signed claims support portable verification and audit; host-side consumption before execution prevents replay. The authority remains outside MCP and cannot be minted by an agent or MCP client.
Options considered:
Consequences: Missing, expired, scope-mismatched, digest-mismatched, revoked, or consumed tokens fail closed with a stable error before side effects. Key custody follows host-owned trust rules.
enricopiovesan commentedon Nov 20, 2026
Decision record
Decision: A remainder replan receives only bounded, schema-validated output references bound to completed-step trace digests. The host resolves authorized values locally; raw secrets, credentials, and unrestricted prior outputs do not enter MCP or the planner.
Rationale: This preserves the Decision 136 remainder-only behavior while maintaining least disclosure, bounded evidence, and deterministic validation.
Options considered:
Consequences: A missing, tampered, expired, unbound, or schema-invalid reference fails closed. The failed capability version is excluded and every replan needs new out-of-band approval.
docs(#1896): approve MCP approval and remainder replan contract (#1930)
enricopiovesan commentedon Nov 23, 2026
Completed by merged PR #1930: approved Spec 109/113 and ADR-0043 amendments for host-only approval and trace-bound remainder replanning.