Skip to content

docs(build-agent): document harness.permissions.default_mode for testing gated writes#17

Open
bekossy wants to merge 1 commit into
mainfrom
docs/testing-bypass-permissions
Open

docs(build-agent): document harness.permissions.default_mode for testing gated writes#17
bekossy wants to merge 1 commit into
mainfrom
docs/testing-bypass-permissions

Conversation

@bekossy

@bekossy bekossy commented Jul 8, 2026

Copy link
Copy Markdown
Member

Context

Per today's standup (2026-07-08), the team flagged "approval-related agent breaks during testing" as something to fix by configuring bypass-permission auto-approval. Hit exactly this while testing a multi-tool GitHub + Slack agent: SEND_MESSAGE tripped a human-approval gate through test-agent.sh's low-level invoke. That endpoint doesn't hydrate a resumable Playground session, so the pending approval had nothing to resolve against and stayed stuck (APPROVAL: paused, check-tools.sh verdict UNCONFIRMED). The identical config ran clean through a real Playground chat session instead, since that session support actually resolving the approval.

Changes

Documented harness.permissions.default_mode: "bypassPermissions" in SKILL.md, right where the approval-gate behavior is already explained. It's the same field behind the Playground's Advanced panel "Bypass (skip every gate)" option (confirmed in web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ClaudePermissionsControl.tsx in the agenta repo).

"harness": { "kind": "claude", "permissions": { "default_mode": "bypassPermissions" } }

Explicitly kept out of the fixed boilerplate. It skips every approval gate for the whole run, including ones a real end user would want to review, so it's documented as a deliberate opt-in for whoever is testing, not a default.

Tests

Verified end to end: added this field to the exact multi-tool config that previously stalled, re-ran through test-agent.sh. Before: APPROVAL: paused on SEND_MESSAGE, check-tools.sh verdict UNCONFIRMED. After: SEND_MESSAGE completed with an ok result in TOOLS, no APPROVAL line, check-tools.sh verdict PASS. Confirmed the message actually posted by reading #non-human-chat back.

What to QA

  • Build a multi-tool agent with a gated WRITE action (e.g. a Slack SEND_MESSAGE), test it through test-agent.sh without this field set. It should stall on APPROVAL: paused with an UNCONFIRMED check-tools.sh verdict.
  • Add harness.permissions.default_mode: "bypassPermissions", commit the change, re-test. The write should complete with an ok result and a PASS verdict.

…ing gated writes

Hit a real stall while testing a multi-tool GitHub+Slack agent: SEND_MESSAGE
tripped an approval gate through test-agent.sh's low-level invoke, which
doesn't hydrate a resumable Playground session, so the pending approval had
nothing to resolve against and never completed. The identical config ran
clean through a real Playground chat session instead.

harness.permissions.default_mode: "bypassPermissions" (the same field behind
the Playground's Advanced panel "Bypass (skip every gate)" option, per
web/packages/agenta-entity-ui/.../ClaudePermissionsControl.tsx in the agenta
repo) skips approval gates entirely. Verified end to end: the same
previously-stalling SEND_MESSAGE call completed with an ok result and a PASS
check-tools.sh verdict once this was set.

Documented as an explicit testing convenience, not added to the fixed
boilerplate - it's a deliberate opt-in for whoever is testing, not something
that should ship silently in every agent config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant