← Back to PRs

#7382: fix: remove config.schema from agent gateway tool

by kakuteki open 2026-02-02 19:23 View on GitHub →
agents
The config.schema endpoint returns a 373KB JSON schema designed for Control UI form rendering, not for agent consumption. When agents called this action, it caused context explosion issues. Changes: - Remove config.schema from GATEWAY_ACTIONS in gateway-tool.ts - Update system prompt to remove config.schema reference - Add config.patch to system prompt documentation The underlying config.schema endpoint remains available for Control UI via the internal callGatewayTool function. [Fixes #7347](https://github.com/openclaw/openclaw/issues/7347) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR removes the `config.schema` gateway action from the agent-facing `gateway` tool (and the system prompt) to prevent large JSON schema responses from causing context bloat. The underlying gateway endpoint remains implemented and listed in the server method registry for internal/UI usage; agents are directed to use `config.get`, `config.apply`, `config.patch`, and `update.run` instead. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Changes are a small, targeted removal of an agent-exposed action and matching system prompt text; no runtime behavior changes outside the gateway tool dispatch and schema enum. The underlying gateway handler remains intact for internal consumers. - No files require special attention <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs