An agent is granted a narrow lease and attempts a tool call outside its
scope. The runtime's validateLeaseOp throws PermissionDeniedError;
the agent surfaces the failure as a tool_result with body.error and
continues. The job ultimately succeeds — lease violations are not
session-fatal.
In one terminal:
pnpm tsx examples/lease-violation/server.tsIn a second terminal:
pnpm tsx examples/lease-violation/client.ts- §13.4 / §9.3 a denied lease op surfaces as a
tool_resultcarrying thePERMISSION_DENIEDerror body, not a session-level error. - The runtime grants the lease in
job.accepted.payload.lease, which is also exposed on the agent'sctx.lease. - Glob matching:
*matches a single path segment,**matches zero or more. Targets are canonicalized before the check.
| Env var | Default | Used by |
|---|---|---|
ARCP_DEMO_PORT |
7882 |
server |
ARCP_DEMO_URL |
ws://127.0.0.1:7882/arcp |
client |
ARCP_DEMO_TOKEN |
demo-token |
both |