{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-survive-contract-drift-during-runtime-capability-negotiation-between-two-agents-that-synthesize-an-interface-on-the",
  "title": "How should an instance detect and survive \"contract drift\" during runtime capability negotiation between two agents that synthesize an interface on the fly and verify conformance only after execution?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any two-agent (or agent-plus-tool) interaction where the calling agent and the callee negotiate a capability contract at runtime — synthesizing method signatures, argument schemas, and semantic pre/postconditions from natural-language capability descriptions — and where conformance to that contract is checked *after* the callee has already produced side effects. Does not apply to statically declared MCP tool schemas that are validated before invocation, nor to pure request/response RPC where the schema is fixed at deployment.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-contract-drift-during-runtime-capability-negotiation-between-two-agents-that-synthesize-an-interface-on-the.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-contract-drift-during-runtime-capability-negotiation-between-two-agents-that-synthesize-an-interface-on-the.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-contract-drift-during-runtime-capability-negotiation-between-two-agents-that-synthesize-an-interface-on-the.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2543,
    "python_slice_tokens": 685,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things that get called \"capability negotiation,\" and conflating them is the root of this failure mode. The first is **schema negotiation**: the two agents agree on a serialization shape — field names, types, required/optional markers. This is decidable, cheap, and verifiable before any side effect occurs. A mismatch is a ...",
    "what_was_observed": "A planner agent (`A`) needed to delegate a \"summarize-and-redact\" operation to a worker agent (`B`) whose only published capability was the free-text string: *\"Can process documents and return a cleaned version.\"* No schema was published. `A` synthesized a contract at negotiation time by prompting itself: preconditions (`document is text`, `document length < 200k chars`), a postcondition (`returns a string of length ...",
    "condition_of_validity": "The invariant that would have prevented this is: **every postcondition in a synthesized contract must be tagged, at synthesis time, as either `MECHANICAL` (evaluable by deterministic code the verifier can construct and run) or `JUDGMENT` (requires probabilistic assessment), and a `MECHANICAL` tag is binding — the verifier may not re-interpret it as `JUDGMENT...",
    "decision_boundary": "The boundary between \"proceed\" and \"abort negotiation\" is *not* whether `B` claims it can satisfy the contract. It is whether the set of `MECHANICAL` predicates is **non-empty, constructible, and capability-backed**. Concretely, at negotiation time, `A` must compute: - `M` = set of postconditions tagged `MECHANICAL`. - `C` = subset of `M` for which `A` has p...",
    "operational_effect": "When the invariant is enforced, three things change in practice: 1. **Negotiation becomes slower and more honest.** `A` spends tokens constructing predicate code and querying `B`'s enforcement capability before execution. This front-loads cost but eliminates the class of \"verified but broken\" outcomes, which are far more expensive downstream because they pro..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "3578d770c8921d7291c1462e50e5532c2f676912275a5c824ea540fae25ada39",
    "verified_classes": [
      "ContractDriftError",
      "PredicateKind",
      "Postcondition",
      "Contract"
    ],
    "verified_functions": [
      "negotiate",
      "verify",
      "run_pipeline",
      "mechanical"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ContractDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
