Research brief
Landscape survey (2026-07-25), scoped to: "agent_mesh roadmap & comparable OSS
agent frameworks" (OpenHands, SWE-agent, Aider, MetaGPT/ChatDev, Renovate,
claude-code-action).
Landscape signal — OpenHands' graduated risk confirmation. OpenHands' SDK
ships an LLMSecurityAnalyzer that rates every proposed tool call
LOW/MEDIUM/HIGH/UNKNOWN risk; a ConfirmRisky() policy auto-executes
low-risk actions but transitions the run to a WAITING_FOR_CONFIRMATION
state for medium/high-risk ones until a human approves or rejects (a
rejection feeds explanatory context back so the agent retries safely).
Source (fetched, verified): https://docs.openhands.dev/sdk/guides/security
Gap (confirmed against this repo, not just landscape-inspired)
do-mode write confinement today is a flat, binary boundary: the
PreToolUse path-guard hook (hooks/path-guard.js) allows any write inside
AGENT_MESH_ROOT and denies anything outside it — see
src/path-guard.js/src/config.js WRITE_TOOLS. There is no graduated
signal between "inside the root, fine" and "outside the root, denied." A
worker deleting/rewriting a large fraction of the tree, touching a
secret-looking path (.env, credentials.json, a lockfile), or performing
an unusually broad multi-file edit is treated identically to a single
one-line doc fix, as long as both stay inside the writable root. Nothing in
src/delegate.js classifies how risky a write looks before letting the
result finalize as status: done.
This is a different axis from every open security-tagged idea already in the
backlog:
None of these classify the content/blast-radius of an individual write
call at the moment it happens and route only the risky ones for human
review before the Task is considered final. That's the OpenHands gap.
Proposed direction
Because agent_mesh's do-mode spawn is a one-shot, non-interactive
claude -p run (there is no live human-in-the-loop channel mid-spawn, unlike
OpenHands' synchronous agent loop), the adaptation should stay consistent
with this repo's existing async, review-first model rather than blocking
execution:
- An optional per-peer
agent.json x-agentmesh.riskyWritePatterns (or a
small built-in heuristic set: N+ files touched in one task, a path
matching common secret/lockfile globs, a Write to a previously
non-existent large binary, etc.) evaluated after the do-mode spawn
completes, using the same files_changed data src/change-detect.js
already computes — no new hook, no new spawn-time gate.
- A match does not block or retry anything (same "failure is data, not an
exception" invariant as timeout/refused/error): it surfaces a new
structured field (e.g. agentmesh/risk: { level, reasons }) on the Task
result, and — reusing the existing review-first session/dashboard
machinery (src/session-provenance.js, the Task Board view) — a
needs-human-confirm marker so a risky-but-completed write is flagged for
review before a caller/board treats it as fully accepted, instead of
silently landing with the same status as a trivial edit.
- Purely additive: omitting the manifest field preserves today's behavior
exactly (no risk field emitted).
Invariants preserved
- Single writable root: unaffected — the path-guard boundary is
unchanged; this only classifies writes that already happened inside the
root.
- Anti-spoof: risk classification reads only
files_changed (already
framework-computed) and the peer's own manifest — never tool-call args.
- Failure is data: a risky write is still
status: done with an
additional advisory field, never auto-blocked/auto-reverted.
Scope hint
src/change-detect.js (reuse files_changed), src/delegate.js (post-spawn
classification hook), src/config.js (heuristic defaults), src/a2a/protocol.js
(new agentmesh/risk metadata field, additive), pure unit tests only.
Sources
Research brief
Landscape survey (2026-07-25), scoped to: "agent_mesh roadmap & comparable OSS
agent frameworks" (OpenHands, SWE-agent, Aider, MetaGPT/ChatDev, Renovate,
claude-code-action).
Landscape signal — OpenHands' graduated risk confirmation. OpenHands' SDK
ships an
LLMSecurityAnalyzerthat rates every proposed tool callLOW/MEDIUM/HIGH/UNKNOWN risk; a
ConfirmRisky()policy auto-executeslow-risk actions but transitions the run to a
WAITING_FOR_CONFIRMATIONstate for medium/high-risk ones until a human approves or rejects (a
rejection feeds explanatory context back so the agent retries safely).
Source (fetched, verified): https://docs.openhands.dev/sdk/guides/security
Gap (confirmed against this repo, not just landscape-inspired)
do-mode write confinement today is a flat, binary boundary: thePreToolUsepath-guard hook (hooks/path-guard.js) allows any write insideAGENT_MESH_ROOTand denies anything outside it — seesrc/path-guard.js/src/config.jsWRITE_TOOLS. There is no graduatedsignal between "inside the root, fine" and "outside the root, denied." A
worker deleting/rewriting a large fraction of the tree, touching a
secret-looking path (
.env,credentials.json, a lockfile), or performingan unusually broad multi-file edit is treated identically to a single
one-line doc fix, as long as both stay inside the writable root. Nothing in
src/delegate.jsclassifies how risky a write looks before letting theresult finalize as
status: done.This is a different axis from every open security-tagged idea already in the
backlog:
preventive — it narrows which write tools a peer may ever invoke,
declared once in
agent.json, independent of any specific call's content.path-guard boundary itself.
are detective — they assess the result of a completed do-mode task
after the fact, not the blast-radius of an individual write.
None of these classify the content/blast-radius of an individual write
call at the moment it happens and route only the risky ones for human
review before the Task is considered final. That's the OpenHands gap.
Proposed direction
Because agent_mesh's
do-mode spawn is a one-shot, non-interactiveclaude -prun (there is no live human-in-the-loop channel mid-spawn, unlikeOpenHands' synchronous agent loop), the adaptation should stay consistent
with this repo's existing async, review-first model rather than blocking
execution:
agent.jsonx-agentmesh.riskyWritePatterns(or asmall built-in heuristic set: N+ files touched in one task, a path
matching common secret/lockfile globs, a
Writeto a previouslynon-existent large binary, etc.) evaluated after the do-mode spawn
completes, using the same
files_changeddatasrc/change-detect.jsalready computes — no new hook, no new spawn-time gate.
exception" invariant as
timeout/refused/error): it surfaces a newstructured field (e.g.
agentmesh/risk: { level, reasons }) on the Taskresult, and — reusing the existing review-first session/dashboard
machinery (
src/session-provenance.js, the Task Board view) — aneeds-human-confirmmarker so a risky-but-completed write is flagged forreview before a caller/board treats it as fully accepted, instead of
silently landing with the same status as a trivial edit.
exactly (no risk field emitted).
Invariants preserved
unchanged; this only classifies writes that already happened inside the
root.
files_changed(alreadyframework-computed) and the peer's own manifest — never tool-call args.
status: donewith anadditional advisory field, never auto-blocked/auto-reverted.
Scope hint
src/change-detect.js(reusefiles_changed),src/delegate.js(post-spawnclassification hook),
src/config.js(heuristic defaults),src/a2a/protocol.js(new
agentmesh/riskmetadata field, additive), pure unit tests only.Sources
ConfirmRisky, fetched and verified directly, not from a search snippet)