Skip to content

feat(agents): enable GraphQL mutations by default - #15413

Draft
axiomofjoy wants to merge 1 commit into
agent/tool-instructions-into-descriptionsfrom
agent/allow-graphql-mutations
Draft

feat(agents): enable GraphQL mutations by default#15413
axiomofjoy wants to merge 1 commit into
agent/tool-instructions-into-descriptionsfrom
agent/allow-graphql-mutations

Conversation

@axiomofjoy

@axiomofjoy axiomofjoy commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Removes the experimental setting that gated GraphQL mutations for the agent's phoenix-gql command and enables mutations by default, with prompt guidance to ask the user before executing one.

Changes

Server

  • allow_mutations is removed as a parameter throughout (BashCapability, build_agent, build_server_agent, both chat routers, and the harbor eval harness). phoenix-gql now accepts queries and mutations; subscriptions are still rejected. Server-side GraphQL authorization (read-only deployments, viewer roles) remains the enforcement point, so the tool-layer gate was redundant defense.
  • The mutations prompt policy (GRAPHQL_MUTATIONS_INSTRUCTIONS.xml.j2) is rewritten: the agent must describe the mutation and get user approval (e.g. via ask_user) unless the user's most recent request explicitly asked for the exact change. When edit_permission is bypass (auto-accept), confirmation is skipped, matching the behavior of every other write tool.
  • GraphQLContext stays in the wire contract as accepted-but-ignored so already-installed clients that still send {type: "graphql", mutationsEnabled} continue to validate. Removing it from the union can happen in a later release.

Frontend

  • The graphql.mutations capability ("Dangerously enable mutations") is removed, along with the now-empty experimental settings section and the controlSurface machinery. Stale persisted capability keys are dropped on rehydrate by the existing normalizer. The agent-experimental-settings feature flag is left defined since it is the only flag and removing it would break the FeatureFlag type mechanism.
  • Chat requests no longer send the graphql context.

js CLI

  • --enable-graphql-mutations and the graphql context are removed.

Testing

  • tests/unit/server/agents (440 passed), mypy clean on changed server modules
  • Frontend typecheck plus the affected vitest suites (82 passed)
  • phoenix-cli typecheck and tests (41 passed)
  • make openapi regenerated (description-only diff for the deprecated GraphQLContext)

🤖 Generated with Claude Code

Remove the experimental setting that gated phoenix-gql mutations and the
allow_mutations plumbing behind it. Mutations are now always permitted at
the tool layer; server-side GraphQL authorization (read-only deployments,
viewer roles) remains the enforcement point.

- Drop allow_mutations from BashCapability, build_agent, and
  build_server_agent; phoenix-gql accepts queries and mutations
  (subscriptions still rejected)
- Rewrite the mutations prompt policy: confirm with the user before
  executing a mutation unless they explicitly asked for the change,
  skipping confirmation when edit_permission is bypass
- Remove the "Dangerously enable mutations" experimental setting, the
  now-empty experimental settings section, and the graphql.mutations
  capability from the frontend
- Remove --enable-graphql-mutations and the graphql context from the js
  CLI
- Keep GraphQLContext in the wire contract as accepted-but-ignored so
  older clients that still send it continue to validate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Card links check

No broken Card links found. Checked external links in 17.9s

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@arizeai/phoenix-cli

npm i https://pkg.pr.new/@arizeai/phoenix-cli@15413

@arizeai/phoenix-client

npm i https://pkg.pr.new/@arizeai/phoenix-client@15413

@arizeai/phoenix-config

npm i https://pkg.pr.new/@arizeai/phoenix-config@15413

@arizeai/phoenix-evals

npm i https://pkg.pr.new/@arizeai/phoenix-evals@15413

@arizeai/phoenix-mcp

npm i https://pkg.pr.new/@arizeai/phoenix-mcp@15413

@arizeai/phoenix-otel

npm i https://pkg.pr.new/@arizeai/phoenix-otel@15413

commit: c45f5dd

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

Labels

None yet

Projects

Status: 📘 Todo

Development

Successfully merging this pull request may close these issues.

1 participant