Repository navigation
Description
Is there an existing feature request for this?
- I have searched existing issues and feature requests, and this is not a duplicate.
Problem or Use Case
OpenHands-style agents can write code, use command lines, browse, and operate in sandboxed environments. The final diff, terminal result, or browser outcome can be reviewed, but it can still be hard to answer a separate reviewer question:
The agent produced an output — but was it allowed to take that action?
This matters for higher-impact software-agent actions such as shell commands, file modifications, workflow/config changes, browser actions, or tool calls where a reviewer may want to see what evidence was checked before the action happened.
The use case is not to replace sandboxing, evals, or code review. It is to add a lightweight reviewer-facing audit artifact that makes agent action decisions easier to inspect and replay.
Proposed Solution
Add an optional reviewer-facing evidence-gate artifact around agent actions.
A possible flow:
agent proposes action
→ optional pre-action evidence gate
→ ALLOW / BLOCK / ESCALATE
→ reviewer-facing stop reasons + checked evidence
→ tool call / shell step / browser action / code change
The artifact could include:
action type,
triggering task,
checked evidence or context fields,
decision: ALLOW / BLOCK / ESCALATE,
stop reason if blocked or escalated,
replayable decision record.
This could start as a lightweight trace/log/export artifact rather than a hard runtime enforcement feature. The goal is to help reviewers inspect why an agent action was considered acceptable, risky, or requiring escalation.
Alternatives Considered
A reviewer can currently inspect the final diff, terminal logs, browser results, or conversation history. Those are useful, but they do not always provide a structured answer to whether the agent had enough evidence or permission to take a specific action.
Other alternatives include custom wrappers, external policy tools, or manual review checklists. The limitation is that they are usually inconsistent, not replayable, and not connected to the actual agent action trace.
Sandboxing, evals, and code review are still important, but they solve a different problem. This proposal is only about an optional reviewer-facing decision artifact around agent actions.
Priority / Severity
Medium - Would improve experience
Estimated Scope
Unknown - Not sure about the technical complexity
Feature Area
Agent / AI behavior
Technical Implementation Ideas (Optional)
A minimal version could start as an optional structured trace event emitted before selected high-impact actions. It does not need to block execution by default. The event could later be exported in logs or displayed in a reviewer UI.
Additional Context
Related experimental project: https://github.com/safal207/pythiaLabs
Example snapshot output:
https://github.com/safal207/pythiaLabs/blob/main/docs/examples/agent-action-audit-snapshot-example.md
Workflow intake template:
https://github.com/safal207/pythiaLabs/blob/main/docs/examples/agent-action-workflow-intake-template.md
PythiaLabs explores deterministic evidence gates for high-risk AI-agent actions and replayable reviewer artifacts. This issue is only a question/proposal about whether a similar optional artifact would be useful around OpenHands-style workflows.
Activity
VascoSch92 commentedon Jun 17, 2026
Thanks for the writeup, @safal207
Most of the flow you describe already exists in the agent SDK that powers OpenHands:
Given that, the parts of your request that look genuinely new are:
cschanhniem commentedon Jun 18, 2026
This is a great direction, and what @VascoSch92 describes from the software-agent-sdk is solid. But I think there is an important architectural distinction worth discussing: instructions vs policy.
Right now the OpenHands approach embeds governance inside the agent runtime — the security analyzer, confirmation policy, and policy rails all live within the agent loop. This means the agent itself decides whether it is acting safely. That is a great instruction layer.
What AGENTOWNERS (https://github.com/cschanhniem/AGENTOWNERS) explores is the other half: an external, deterministic policy file that declares what agents are allowed to do before the tool call is dispatched. The distinction:
For the tri-state decision question (@VascoSch92 asked about BLOCK vs ESCALATE vs CONFIRM), a deterministic policy engine can resolve this cleanly:
The priority is always
block > require_approval > allow, evaluated against file patterns, action types, and actor identity before the tool call leaves the agent. The nice thing is this is framework-agnostic — it does not matter whether the agent is OpenHands, Claude Code, or Cursor.The replayable audit artifact described in the issue is exactly what a deterministic policy evaluation produces: matched rule, decision, evidence, timestamp, zero randomness.
Happy to discuss how a .agentowners.yml could complement OpenHands runtime security as an external governance layer.
safal207 commentedon Jun 18, 2026
Thanks @VascoSch92 and @cschanhniem — this distinction is very helpful.
I agree that OpenHands already has strong runtime security primitives, and that an external deterministic policy layer such as AGENTOWNERS can provide hard authorization boundaries.
The reviewer-facing gap I am trying to describe is slightly different:
A concrete example:
An agent is asked to modify a production deployment workflow and rotate a secret reference.
The existing trajectory may show:
But a reviewer may still need a structured answer to:
In this case:
So ESCALATE describes the policy decision, while CONFIRM describes the runtime interaction.
A minimal implementation could simply emit an optional structured event containing:
This could complement both OpenHands runtime security and external policy layers without replacing either.
safal207 commentedon Jun 18, 2026
If this direction seems useful, I can draft a minimal event schema and a small proof-of-concept mapping it onto the existing "ActionEvent" / "ObservationEvent" flow.
The goal would be to keep it optional and lightweight: no new enforcement engine, just a first-class exportable decision record that reuses the existing OpenHands security primitives.
Would a schema-first proposal or a small experimental PR be more useful?
safal207 commentedon Jun 19, 2026
I drafted the schema-first version discussed above and kept it outside
OpenHands core so the event shape can be reviewed before implementation.
Interoperability note:
https://github.com/safal207/pythiaLabs/blob/main/docs/integrations/OPENHANDS_EVIDENCE_GATE_DECISION_EVENT.md
Draft-07 JSON Schema:
https://github.com/safal207/pythiaLabs/blob/main/schemas/integrations/openhands_evidence_gate_decision_event.schema.json
The proposal reuses existing SDK concepts:
It separates:
policy decision: ALLOW | BLOCK | ESCALATE
runtime interaction: NONE | DENY | CONFIRM
The schema also records evidence references, policy version/hash,
stable stop reasons and replay digests.
This remains an experimental interoperability proposal only — not an
OpenHands feature, endorsement, or replacement for its security stack.
Necmttn commentedon Jun 21, 2026
Evidence gates should emit receipts tied to the action they authorize. Fields: action id, tool call or command id, checked evidence refs, policy version, decision, stop reason, verifier, and verification command/result if present. That keeps the artifact lightweight while letting reviewers trace from final diff back to the pre-action evidence.
Generated with ax.
safal207 commentedon Jun 21, 2026
Thanks — I agree that “receipt” is a useful reviewer-facing abstraction.
Most of the proposed fields already map onto the current draft: action event ID, tool-call ID, evidence references, policy version/hash, decision, and stable stop reasons.
One implementation detail may be worth keeping explicit:
To preserve an append-only event model, I would avoid mutating the pre-action decision event after execution.
A minimal structure could therefore use two linked records:
EvidenceGateDecisionEventEvidenceGateVerificationEventThe exported reviewer “receipt” can be a projection joining these records.
That would allow a reviewer to trace:
final diff or observation
→ executed action
→ pre-action decision
→ matched policy and evidence
without changing the original authorization record after dispatch.
I can update the experimental schema with this two-phase receipt model and add a concrete OpenHands mapping example.
safal207 commentedon Jun 21, 2026
Follow-up: the two-phase receipt model discussed above has now been implemented
as an experimental interoperability protocol in PythiaLabs and merged to
mainvia safal207/pythiaLabs#200.
Canonical note:
https://github.com/safal207/pythiaLabs/blob/main/docs/integrations/OPENHANDS_EVIDENCE_GATE_DECISION_EVENT.md
It now includes:
EvidenceGateDecisionEventv0.2 for the pre-action decision;EvidenceGateVerificationEventfor post-action checks;EvidenceGateReceiptprojection;The key invariant is that post-action verification does not mutate the original
authorization record. The receipt joins decision, action/observation,
verification, and final artifacts through stable IDs and digests.
This remains an experimental interoperability proposal only, not an OpenHands
feature or endorsement.
anywaypridyrok commentedon Jun 24, 2026
Disclosure: I’m building DiffReceipt, a small devtool focused on reviewer-facing evidence for AI-coded changes.
This issue is very close to the problem we’re working on: not whether an agent can make a change, but whether a reviewer can understand what happened before accepting it.
A useful evidence gate might include: requested task, allowed scope, changed files, checks executed, check results, rollback boundary, and human-review status. In our experiments, the key is keeping the reviewer view short enough to actually use, while preserving a more detailed developer trail underneath.
No need to treat this as a product suggestion — mostly sharing the schema angle in case it helps the design here.
rpelevin commentedon Jun 24, 2026
Reviewer-facing evidence gates are useful if they stay split from enforcement and from post-action verification.
For OpenHands, I would keep the optional artifact as a pair of events plus a small projection:
The key invariant is that the pre-action decision is append-only. A later successful test, final diff, or reviewer acceptance can satisfy verification, but it cannot retroactively create permission for an action that was outside the declared scope when it ran.
I would pin these tests first:
That gives reviewers a short surface to inspect while preserving a replayable developer trail underneath.
Boundary: architecture and test feedback only; no claim about using OpenHands or running its code.
arian-gogani commentedon Jun 24, 2026
the reviewer-facing evidence gate is exactly the right primitive — and the property that makes it useful is the same one @safal207's two-phase receipt model captures: the evidence needs to be verifiable by the reviewer independently of OpenHands' infrastructure.
the concrete gap in most evidence gate implementations: a reviewer receives a diff + result, but the 'approved' record lives in the platform's database. if the platform is unavailable or the record is modified, the reviewer can't verify independently.
the receipt layer closes this: before the agent executes a command, it emits a signed pre-execution record (
decision: ALLOW, action_type: 'shell.exec', scope: 'sandbox'). after execution, it emits a signed outcome record carrying the result digest and the sameaction_ref. a reviewer holds the public key and verifies both records offline — no OpenHands instance needed.action_ref = SHA-256(JCS({agent_id, action_type, scope, timestamp_ms}))is the content-derived join key. computed from the intent fields before execution, so the reviewer can confirm: was the evidence gate cleared for the exact action that ran? if the agent deviated from what was approved, the hashes diverge.for OpenHands specifically: the
execute_action→observeloop is the natural hook point. receipt beforeexecute_action, receipt afterobserve.pip install nobulex— bilateral receipt shape in agentrust-io/integrations#6.all-hands-bot commentedon Aug 28, 2026
[Automatic Post]: This issue has had no activity for 29 days (labels: enhancement). @enyst @neubig @xingyaoww, could you take a look when you have a chance and help figure out next steps?
Generated by OpenHands automation on behalf of the user.
all-hands-bot commentedon Oct 6, 2026
[Automatic Post]: This issue has had no activity for 38 days (labels: enhancement). @enyst @neubig @xingyaoww, could you take a look when you have a chance and help figure out next steps?
Generated by OpenHands automation on behalf of the user.
safal207 commentedon Oct 11, 2026
Thanks for #5182. I checked the merged behavior at "4cc058275c5a08d845bd846576aafc80e5dd7d0d" and corrected my interoperability note to use "SecurityAnalysisEvent.risks[ActionEvent.id]", keeping the acting model's "ActionEvent.security_risk" label separate.
One small follow-up: the existing three-action batch test uses identical risks/details and checks only key sets, so it cannot catch value permutations between the correct action IDs. This "one-file native test patch" (https://github.com/safal207/pythiaLabs/blob/a5056d054d88d25aed27a69b88ba256ab0f02923/proofs/openhands-4259-mixed-batch/mixed-batch.patch) strengthens that existing case with LOW/HIGH/MEDIUM risks and distinct detail markers (35 additions, 8 deletions).
Two isolated controls rotate only risks or only details while preserving the fixture's keys and original policy input. For each, the original test file passes all 11 cases; the strengthened file fails only the intended mixed-batch assertion (10 pass, 1 expected failure). After restoring production, the relevant native suite passes: 491 passed, 7 skipped, 10 xfailed. "Replay and raw evidence" (https://github.com/safal207/pythiaLabs/blob/a5056d054d88d25aed27a69b88ba256ab0f02923/proofs/openhands-4259-mixed-batch/README.md); "fresh native CI" (https://github.com/safal207/pythiaLabs/actions/runs/38120091083).
Scope is the existing "Agent.step" unit helper with mocked completion and a no-op tool. This is test sensitivity, not an observed production defect or proof of execution/authorization.
Would a focused tests-only follow-up to #5182 be useful?
arian-gogani commentedon Oct 13, 2026
@safal207 Yes, a focused tests-only follow-up to #5182 would be useful. Please keep the claim scoped to the mixed-batch test: distinct risk and detail values should catch values being associated with the wrong ActionEvent IDs. I agree this is a test-coverage gap, not evidence of a production authorization defect.