Host attestation treats omp's CLAUDECODE=1 as Claude serving family; can falsely verify cross-model independence
Summary
oh-my-pi (omp) sets CLAUDECODE=1 in its standard shell environment regardless of which model is serving the session. CE's host-attestation snippet treats that marker as evidence of both the harness (claude) and the serving family (claude). In an omp session served by a non-Claude model (for example after a /model switch to a GPT model, or a configured fallback to one), the snippet reports the wrong host family. If that family is passed to the cross-model workers, a same-family peer can be recorded as independence_verified: true.
This is traced from source. I have not run a full review that produced a false receipt; the end-to-end consequences below are the predicted result.
Environment
- compound-engineering v3.30.3; same code on
mainat9af474a70e - oh-my-pi 18.4.12 (CE publishes an omp plugin under
.omp-plugin/)
The marker
omp's standard shell configuration sets OMPCODE=1 and CLAUDECODE=1 without inspecting the serving model (@oh-my-pi/pi-utils/src/procmgr.ts, buildSpawnEnv; added in omp commit f3a36eb). omp sessions can be served by Claude, GPT, Grok and other model families, and can switch mid-session. So under omp, CLAUDECODE=1 is not serving-family evidence.
Where CE reads it
Three cross-model references contain the same host-attestation snippet, with the CLAUDECODE branch first and no OMPCODE check:
skills/ce-code-review/references/cross-model-review.md:21skills/ce-doc-review/references/cross-model-review.md:20skills/ce-pov/references/cross-model-panel.md:45
if [ "${CLAUDECODE:-}" = "1" ]; then XHOST_HARNESS=claude; XHOST_FAMILY=claude;
Separately, skills/ce-code-review/scripts/run-log.py:47 (host_from_env) classifies omp as claude too, so metadata.cost.host is mislabeled. That is a logging issue only; it does not affect peer selection or independence.
Captured output in an omp shell
Evaluating the ce-code-review snippet verbatim in an omp bash tool call:
$ env | grep -E '^(CLAUDECODE|OMPCODE)='
CLAUDECODE=1
OMPCODE=1
$ <snippet>; echo "XHOST_HARNESS=$XHOST_HARNESS XHOST_FAMILY=$XHOST_FAMILY"
XHOST_HARNESS=claude XHOST_FAMILY=claude
Consequences when the session is not Claude-served (source-traced)
The snippet is guidance the orchestrator runs; the workers take the host family as their first argument. If the orchestrator forwards the snippet's claude during a GPT-served session:
- Same-family peer certified independent.
cross-model-adversarial-review.sh:1201sets_independent=truewhen host and target families are both known and differ. Hostclaudevs targetcodexpasses, although both are GPT. The same comparison exists ince-doc-review/scripts/cross-model-doc-review.sh:1182andce-pov/scripts/cross-model-pov.sh:923. - Agreement credit and validator skip.
findings-mechanics.py:75-79counts a cross-model reviewer as independent only whenindependence_verified is True. For matching findings that pass the existing evidence and agreement gates, the false flag grants the cross-model confidence increase, andfinish-review.md:61lets such findings skip the Stage 5b validator. - A genuinely different peer is excluded. Candidate filtering drops targets of the host family (
cross-model-adversarial-review.sh:450,cross-model-doc-review.sh:497), so a Claude peer is skipped on a GPT-served omp host. If that is the only installed peer CLI, no cross-model pass runs.
When omp is served by a Claude-family model, the guessed family happens to match, but the harness is still mislabeled as Claude Code.
Source-traced failure scenario (not an executed reproduction)
- Start an omp session served by a GPT model, before host attestation runs.
- Run ce-code-review at a depth where the adversarial cross-model pass runs, on a local tree, with the
codexroute permitted and installed. - The orchestrator runs the snippet, gets
XHOST_FAMILY=claude, and passes it tocross-model-adversarial-review.sh. - Predicted: the codex peer completes and its artifact records
independence_verified: true.
Expected behavior
- A Claude Code compatibility marker set by another harness is not taken as serving-family evidence.
- Under omp, the host family is either attested from trustworthy runtime serving evidence or left
unknown; withunknown, same-family exclusion and independence stay conservative, as they already do.
Possible fixes
- Minimal, fail-closed: check
OMPCODEbeforeCLAUDECODEand set both tokens tounknownfor omp.unknownis already accepted by every worker. The cost:cross-model-adversarial-review.sh:387then skips the automatic pass with its existing "host serving family unattested" reason, so omp users lose automatic cross-model coverage. - Keep coverage where the family is knowable: make the instructions say explicitly how trustworthy runtime serving-family evidence sets the family token (
codexfor GPT,claudefor Claude,grokfor Grok), and keepunknownotherwise. The existing "attest what you know" sentence incross-model-panel.mdpoints this way but does not define what counts as evidence; a requested model or a model's self-report should not. - Optional: add an
ompharness token. This needs the accepted host-harness vocabulary in all three workers (and their tests) to be extended; without that, workers refuse the job.
Apply the change consistently to the three snippets and run-log.py. The existing attestation tests are natural places to cover it: tests/review-skill-contract.test.ts (extractHostAttestation) and tests/ce-code-review-run-log.test.ts, with an OMPCODE=1 + CLAUDECODE=1 case.
Triage: leaving open — valid attestation bug on omp.
skills/ce-code-review/references/cross-model-review.md (and the doc-review twin) still map CLAUDECODE=1 to both harness claude and family claude. omp sets that marker for its shell regardless of the serving model, so a non-Claude omp session can be attested as Claude and a same-family peer can be recorded independence_verified: true.
Fix belongs in the shared attestation snippet (and any omp-specific path): treat OMPCODE / omp as its own harness, and do not take serving family from CLAUDECODE alone when omp is the host. No community PR yet.