amend_contract
Amend a contract with an RFC 7396 merge patch to create the next version, applying consent rules and returning affected tasks and contract markdown.
Instructions
Amend a contract with an RFC 7396 merge patch (objects merge, arrays replace, null deletes) to produce v(N+1). Only its orchestrator may. A draft gets a new proposal; a frozen contract is amended in force: removed tasks are cancelled and the agents of affected tasks get a directive to re-read it. from_session (an archived replan or ultraplan) first replaces the structure with that session's roundtable-tasks block (pass patch: {}). id, version, status, consent, frozen, the scope's orchestrator, repository, base commit and parent, and the goal's original_prompt cannot change. Consent counts only for the version it was given on. A draft amendment needs every participant's consent again before a freeze: consent: true asks them all, and an objector who now agrees has the objection resolved by the amendment. On a frozen contract, a run-wide change (budget, scope, sandbox, authority, validation, workers, connectors, goal, dissents) needs consent: true (everyone is asked about it first, and it applies only if all agree) or override_consent: true (audited); other changes apply at once, and consent: true then asks the personas of affected tasks. patch: {} with consent: true just asks everyone without an agreement on the current version. Returns the affected tasks, the consent outcome and the contract markdown.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contract_id": "<contract_id>",
"patch": "<patch>",
"reason": "<reason>",
"orchestrator": "<orchestrator>"
},
"name": "amend_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model id. Defaults: claude-sonnet-5-5 (anthropic), gpt-5.6-luna (openai), zai-org/GLM-5.3 (together), qwen/qwen3-235b-a22b-instruct-2507 (replicate), qwen3:14b (ollama), default (openai_compatible). Model aliases: "opus" (claude-opus-5-5), "sonnet" (claude-sonnet-5-5), "haiku" (claude-haiku-5-5). Replicate accepts owner/name, owner/name:version, or a https://replicate.com/owner/name URL. | |
| patch | Yes | RFC 7396 merge patch over the latest version, e.g. {"budget": {"usd": 40}} or {"tasks": [...the full new task list...]}. | |
| reason | Yes | Why the contract changes; recorded and sent to affected agents. | |
| consent | No | Default false. True: ask participants about the new version: everyone for a draft or a run-wide change, the personas of affected tasks otherwise. | |
| base_url | No | Only with provider "openai_compatible": base URL of an OpenAI-compatible /v1 endpoint (e.g. http://localhost:1234/v1). Overrides OPENAI_COMPATIBLE_BASE_URL. OPENAI_COMPATIBLE_API_KEY, if set, is sent only to the OPENAI_COMPATIBLE_BASE_URL origin or one listed in ROUNDTABLE_OPENAI_COMPATIBLE_TRUSTED_ORIGINS; any other base URL gets no Authorization header and must be https (http only to loopback, or to private addresses with ROUNDTABLE_ALLOW_PRIVATE_BASE_URLS=1), never a cloud metadata or (without that setting) private address. | |
| provider | No | LLM provider. Default: anthropic. Options: anthropic, openai, together, replicate, ollama (local, when reachable), openai_compatible (set OPENAI_COMPATIBLE_BASE_URL or pass base_url). | |
| contract_id | Yes | The contract id (ctr-<6 characters>-<n>) from propose_contract. | |
| from_session | No | Id of an archived replan or ultraplan whose roundtable-tasks block replaces the tasks, commands and interfaces, or of an archived duel (duel-<id>): its winning decision and dissents are added to the contract (tasks untouched, repeats skipped; dissents are run-wide on a frozen contract). | |
| orchestrator | Yes | Your name as this contract's orchestrator (e.g. main). Only the orchestrator that proposed a contract can amend or freeze it. | |
| override_consent | No | Frozen contracts only, default false: apply a run-wide change (budget, scope, sandbox, authority, validation, workers, connectors, goal) without everyone's consent. Audited. |