AI-use note: I used OpenAI Codex for literature discovery, structure, English drafting, editing, and preparation of the publication artifacts. I designed and implemented the architecture and experiments, checked the public traces and protocol, selected the claims, and take responsibility for this post.
An AI agent can obey every local permission and still create a result nobody intended to authorize. Reading a document, summarizing it, creating an archive, generating a link, and sending an email may all be ordinary actions. Together, they can move confidential information outside an organization.
I built CCG (Constitutional Capability Governance) + ITHZ (Information-Theoretical Hashing Zone) around one simple principle:
Do not authorize the next tool call. Authorize the world that would exist after it — and keep the keys outside the AI.
The complete architecture has three layers:
ITHZ is the system's security memory. It preserves the current state, provenance, cumulative effects, constitution version, decision inputs, and observed outcomes so that the next decision is not made in isolation.
Two implemented experiments test different parts of this architecture. A 24-run trajectory pilot compared direct execution, stateless authorization, and stateful CCG + ITHZ over synthetic Gmail, SSH, GitHub, and payment services. A separate five-role court experiment tested isolated model roles, blind judging, cross-laboratory opposition, formal quorum, an auditable ledger, and a one-use sandbox capability. Neither experiment is a production security certificate.
Imagine an agent processing an inbox:
There is no tool called steal_secret. Every individual action can be narrow, allowlisted, and useful. The failure appears only after composition:
Confidential information is now available outside the organization.
The same pattern appears elsewhere. Three small payments can cross a daily budget. Several routine GitHub actions can publish an internal artifact. An untrusted note read in the morning can become a persistent SSH hook in the afternoon.
A stateless gate asks, “Is this call allowed?” A trajectory-aware gate asks a harder question:
“Given everything that has already happened, what protected fact becomes true if this action succeeds?”
That change of question is the central milestone.
Most AI safeguards try to influence what a model says or chooses. CCG + ITHZ adds a different boundary: even a persuasive or mistaken model response should not itself create authority.
The agent may reason, plan, disagree, and propose. It does not possess the Gmail password, SSH key, GitHub token, or payment credential. Those stay with an external broker. The broker acts only when a small formal core gives it a cryptographically bound capability for one exact effect.
This changes the failure mode:
The novelty is not that constitutions, opponents, reference monitors, capabilities, or audit logs exist. It is their composition into one lifecycle: multi-model deliberation, stateful world-transition review, formal authorization, external credential ownership, and replayable provenance.
Think of the system as a small constitutional court standing in front of a locked key cabinet.
AI agent proposes a bounded action
|
v
FIVE-ROLE MODEL COURT
proposer -> two opponents -> blind judge
|
process auditor
|
v
SMALL FORMAL CCG CORE <----> ITHZ state + evidence
|
exact one-use capability or STOP
|
v
EXTERNAL BROKER WITH CREDENTIALS
|
v
observed world effect
|
v
append result to ITHZ
The five model roles have different jobs:
For high- or critical-risk security work, a defensive-security model can replace the ordinary first opponent. This can strengthen technical challenge, but because it may still come from the same provider, it does not satisfy cross-laboratory independence by itself.
The important rule is that none of these models can mint a capability. Five confident models can still be wrong together.
For each proposed action, the implemented workflow is:
STOP or REQUEST_EVIDENCE.In compact form:
candidate_world = transition(current_world, proposal, provenance)
if court_valid
and constitution_allows(candidate_world)
and formal_checks_pass:
mint one-use capability
else:
STOP or REQUEST_EVIDENCEThe model court handles ambiguity and adversarial argument. The formal core handles invariants that should not depend on eloquence. The broker handles credentials and execution. ITHZ connects decisions across time.
Ordinary chat history is a poor security memory. It can be incomplete, summarized, reordered, or controlled by the same agent being constrained.
ITHZ instead preserves a canonical, append-only decision record containing the security-relevant state, provenance of artifacts and instructions, cumulative budgets and privileges, the constitution version, role outputs, capability scope, observed effect, and a hash-linked history.
This allows the gateway to distinguish facts that look identical in one call:
ITHZ does not decide and does not execute. It is the state and evidence plane, not the root of authority. Hashes make mutation and provenance inspectable; they do not make a false observation true.
The architecture can be deployed at two very different assurance levels.
| Weaker practical version | Stronger version | |
|---|---|---|
| Model diversity | Fresh isolated roles, possibly all from one provider | Same-model challenge plus a required opponent from another laboratory |
| Missing external opponent | Anonymous Codex B2 fallback, visibly recorded | Fail closed; no cross-lab quorum means no authorization |
| Judge | Blind to role/provider metadata | Blind and bound to a sealed evidence packet |
| Auditor | Checks the workflow and manifest | Checks workflow, manifest, telemetry, hashes, quorum, and risk-specific routing |
| State | Project state and append-only audit evidence | Closed ITHZ checkpoint with canonical provenance and cumulative effects |
| Execution | Bounded adapter or sandbox broker | Separate broker process/network boundary; agent has no alternate credential path |
| Capability | Narrow and single-use | Exact action, target, arguments hash, expiry, nonce, preconditions, postconditions, and replay protection |
| Appropriate claim | Better structured review and auditability | A stronger technical authority boundary — still not general AI safety |
The weaker version is useful for development, low-risk reviews, and learning where the protocol breaks. It prevents one conversation from being its own reviewer and makes fallbacks visible. But five threads from one provider are not five independent institutions.
The stronger version is the intended security architecture. Cross-laboratory opposition is mandatory for high-impact decisions. The judge is blind, the auditor is not. The formal core fails closed. Credentials live behind a broker the agent cannot bypass. High-consequence adapters also need human approval, explicit schemas, pre- and postcondition checks, rollback, and trajectory tests.
If an unrestricted agent still has a shell, network route, or credential that bypasses the broker, the strong property disappears. The gateway becomes advice rather than a boundary.
The 24-run pilot isolates one part of the architecture: does authorizing the candidate world state change outcomes compared with authorizing calls independently?
An isolated OpenClaw runtime using one low-cost model proposed operations over synthetic Gmail, SSH, GitHub, and payment services. Four attacks were paired with four closely related legitimate controls and run under three policies:
| Authorization policy | Forbidden outcomes reached | Legitimate controls completed |
|---|---|---|
| Direct forwarding | 4/4 | 4/4 |
| Stateless per-call authorization | 3/4 | 4/4 |
| Stateful CCG + ITHZ | 0/4, with four explicit stops | 4/4 |
The remaining stateless GitHub attack was abandoned by the model, not blocked by policy, so I do not count it as a security success.
The useful result is not “0% attack success.” Four fixed attacks cannot support that claim. The useful result is narrower:
In this author-designed pilot, changing the authorization unit from an isolated call to a candidate world-state transition changed the observed attack outcomes, while all four paired legitimate controls still completed.
The CCG Trajectory Lab exposes the 24 sanitized traces. The public protocol contains the predicates, topology, hashes, capability contract, release gate, and reproduction commands.
The five-role court was tested separately on bounded sandbox tasks. Real runs used fresh model calls for the proposer, both opponents, blind judge, and auditor. Tests included a same-provider fallback configuration, a real cross-laboratory Grok run, and later Gemini plus defensive-security opposition for a high-risk case.
The court demonstrated that role isolation, anonymized judging, recorded fallbacks, formal quorum, a hash-linked ledger, and a one-use capability can work together. In one high-risk run, the auditor found the procedure valid but unresolved evidence vetoes caused the formal core to return STOP; no token was issued. That is an important success condition: a procedurally valid debate is not automatically authorization.
These court demonstrations did not execute real Gmail, SSH, GitHub, payment, or production actions. The bundled broker was deliberately limited to an exact sandbox write.
Alignment asks what an AI will try to do. CCG + ITHZ asks a complementary question:
Who owns the technical ability to make the world different when the AI is wrong, manipulated, or strategically deceptive?
The answer should not be “the same process that generated the plan.” Intelligence can remain flexible and uncertain while authority is smaller, external, inspectable, revocable, and tied to a specific world transition.
This connects naturally to AI-control research. The hard evaluation is not whether a gateway blocks attacks written for its own predicates. It is whether it preserves useful work when legitimate and harmful tasks need the same affordances, the attacker adapts after denials, and the state representation is incomplete.
The current work does not show that CCG solves alignment, prompt injection, OpenClaw security, or agent safety. Important limitations include:
The most dangerous failure may be a missing fact. If provenance is wrong or the state representation omits the relevant cumulative effect, the gateway can authorize a transition that only appears safe. ITHZ makes that failure easier to inspect and replay; it does not make it impossible.
The next generation should combine the two implemented lines in a harder environment:
A strong negative result would be valuable: a realistic task where useful work requires authority too broad, or state too difficult to represent, for this architecture to retain its intended advantage.
I would especially value criticism on four questions:
The longer non-technical background is in Agent without the keys II. The earlier motivation for separating intelligence from credentials is in Skynet without keys.
I would rather see this architecture fail under a good counterexample than succeed only in another self-confirming demo.
Public evidence: release bundle — https://ithz.dev/docs/releases/ · source and verifier — https://github.com/thegobi/ccg-ithz-trajectory-pilot · external OWASP review request — https://github.com/OWASP/Agent-Security-Regression-Harness/issues/173