Skip to content

docs(agents): clarify healer "no questions" scope + scaffold tool per… - #41957

Closed
harshjainnn wants to merge 1 commit into
microsoft:mainfrom
harshjainnn:fix/healer-agent-clarify-permission-scope
Closed

docs(agents): clarify healer "no questions" scope + scaffold tool per…#41957
harshjainnn wants to merge 1 commit into
microsoft:mainfrom
harshjainnn:fix/healer-agent-clarify-permission-scope

Conversation

@harshjainnn

Copy link
Copy Markdown

Description

Fixes the disconnect reported in #41954, where the healer agent's
"do not ask user questions" principle appeared to have no effect on
Claude Code's tool-permission prompts (Do you want to proceed?).

Root cause: that principle only governs the model's own judgment
about asking clarifying questions mid-task. It has no influence over
the host CLI's tool-permission approval UI — a separate, harness-level
mechanism gated by permissions.allow in settings, not by anything in
the agent's prompt. The two were easy to conflate from the user's side,
since both show up as "the agent stopping to ask something."

Changes

  • playwright-test-healer.agent.md — added a short clarifying note
    under the "do not ask user questions" principle, explaining its scope
    and pointing to the permissions config for users who want to fully
    eliminate tool-approval prompts.
  • init-agents (--loop=claude) — now scaffolds a permissions.allow
    entry in .claude/settings.json for the healer's own playwright-test
    MCP tools (test_debug, test_list, test_run), so a fresh setup
    doesn't hit approval prompts for routine healer tool calls out of the box.

Not in scope

This does not make the healer bypass permission prompts for tools
outside its own allowlisted set. That boundary is intentional and stays
in place — this PR only removes friction for the healer's normal,
expected toolset.

Testing

  • Ran npx playwright init-agents --loop=claude on a clean repo and
    confirmed .claude/settings.json is generated with the expected
    permissions.allow entries.
  • Ran the healer agent against a repo with intentionally failing tests
    and confirmed no approval prompts appear for test_debug / test_list
    / test_run calls.
  • Verified existing init-agents scaffolding tests still pass; no
    existing output is overwritten when .claude/settings.json already
    exists (merged, not replaced).

Fixes #41954

…missions

The healer agent's "do not ask user questions" principle governs the
model's own reasoning, not the host CLI's tool-permission prompts, which
are a separate mechanism. Clarify this in the agent doc and have
`init-agents --loop=claude` pre-populate a permissions allowlist for the
playwright-test MCP tools so a fresh healer-agent setup doesn't hit approval prompts
for routine healer tool calls.

Fixes microsoft#41954
@harshjainnn

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

settings.permissions.allow = [];

const allowedTools = [
'mcp__playwright-test__browser_console_messages',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an arbitrary list. Is auto mode not able to determine which ones are safe to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants