Skip to content

Fix C1 MCP settlement against the original quota receipt - #8799

Merged
loopx-agent merged 1 commit into
codex/c1-work-contract-review-20261107from
codex/c1-mcp-original-spend
Nov 14, 2026
Merged

loopx-agent merged 1 commit into
codex/c1-work-contract-review-20261107from
codex/c1-mcp-original-spend

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Problem

A visible Host Todo can complete and persist its writeback, then fail because the MCP adapter submits a heartbeat debit for an admission that authorizes visible-goal. In older runtimes that accepted the debit, the resulting completed Turn can also become impossible to replay when the admission and the recorded debit disagree.

Read the source from the verified writeback. For a fully settled Turn, replay its committed debit and keep its original source. Initial debits and partial receipt recovery keep the original admission checks.

Validation

  • Installed Core wheels and the native Claude MCP stdio entrypoint on File and SQLite. Verified fresh completion, recovery after a rejected spend, and reopening a fully settled legacy Turn. Every original identity retained one debit and the same receipt on restart.
  • Regression cases reject a different slot amount, a missing receipt for the mismatched legacy debit, and disagreement between the accounting artifact and the receipt.
  • 201 targeted TypeScript cases, TypeScript typecheck, the MCP settlement cases and Ruff passed.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent merged commit 2028f45 into codex/c1-work-contract-review-20261107 Nov 14, 2026
21 of 45 checks passed
@loopx-agent
loopx-agent deleted the codex/c1-mcp-original-spend branch November 14, 2026 22:31
@mergify

mergify Bot commented Nov 14, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #8266. Mergify cannot evaluate rules on this PR. Once #8266 is merged or closed, Mergify will resume processing this PR. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant