finalize_wave_run
[SUPPORT] 2a654cb0 — IDEMPOTENT FINALIZATION: close a wave run opened by start_wave_run. Safe to retry: if the run is already merged this returns the ORIGINAL result with already_finalized=true, writes no row and appends no event (event_count is identical across the retry — that is the observable...
This record as markdown: /tools/io-github-ajc3xc-meridian/finalize-wave-run.md
What finalize_wave_run does on Meridian
AI agents use finalize_wave_run to commit financial operations through Meridian, usually the final step of a payment, billing, or trading workflow. A call moves real money.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor | string | — | Optional session_id or actor name recorded as finalizing the run. |
evidence | object | — | The FULL dict returned by run_verification. Must have status='ok' and exit_code=0. Not required when replaying an already-finalized run. |
wave_run_id | string | Yes | The immutable id returned by start_wave_run. |
expected_revision_hash | string | — | Optional staleness gate: the board revision_hash you believe this run was planned against. A mismatch refuses the finalization instead of merging against unseen |
Parameters from the server's own tool schema.
Why finalize_wave_run is rated Critical
finalize_wave_run moves real money, and an autonomous agent will call it with the same confidence it calls a search tool. A misread instruction or an injected prompt is all it takes to drain an account or blow a budget.
Attacks that exploit this kind of access
The rule that runs finalize_wave_run safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Meridian, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For finalize_wave_run, this is the rule to start with:
Any call to finalize_wave_run is blocked until a human approves it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Meridian, apply this rule, and every finalize_wave_run call is checked against it from then on.
Questions about finalize_wave_run
[SUPPORT] 2a654cb0 — IDEMPOTENT FINALIZATION: close a wave run opened by start_wave_run. Safe to retry: if the run is already merged this returns the ORIGINAL result with already_finalized=true, writes no row and appends no event (event_count is identical across the retry — that is the observable proof). Fails CLOSED in three cases: (1) a failure_mode='stop' child has failed — returns {finalized: false, blocked_by: [...]} naming the items; (2) expected_revision_hash does not match the board the run was planned against — you are holding a stale manifest, re-read the board first; (3) evidence is not a genuine run_verification result (status='ok', exit_code=0) — the SAME evidence contract complete_wave_gate enforces; a self-report is rejected. Returns {finalized, already_finalized, wave_run_id, status, finalized_at, finalizer_evidence, children_summary, event_count}. Persistent-state disclosure: on hosted Meridian, supplied text and project/session metadata -- including task log entries, pinned decisions, sprint items, notes, handoff/goal state, and HITL queue items -- are sent to and stored in Meridian's service, in an isolated per-tenant Postgres database (Neon); self-hosted deployments keep the same categories in the configured local SQLite/Postgres database. This data is visible in the dashboard and API, and may resurface in later project context or handoffs. Notes and pinned decisions can be deleted individually; task log entries and sprint items can be deleted via the dashboard/API (not exposed as an agent-facing tool); HITL queue items and handoff state have no per-record delete. Full removal of any of this data is available via project or account deletion, using the documented controls. Do not include secrets. It is categorised as a Financial tool in the Meridian MCP Server, which means it involves financial transactions. Block by default and require explicit approval.
finalize_wave_run accepts 4 parameters: actor, evidence, wave_run_id, expected_revision_hash. Required: wave_run_id. The full parameter table on this page comes from the server's own tool schema.
Register the Meridian MCP server in PolicyLayer and add a rule for finalize_wave_run: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Meridian. Nothing to install.
finalize_wave_run is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the finalize_wave_run rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for finalize_wave_run. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
finalize_wave_run is provided by the Meridian MCP server (@meridianmcp/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Meridian, and thousands of servers like it.
Across the catalogue