Skip to content

fix: remove dead read handler from DeveloperClient#7821

Merged
codefromthecrypt merged 1 commit intomainfrom
adrian/remove-dead-read-handler
Mar 12, 2026
Merged

fix: remove dead read handler from DeveloperClient#7821
codefromthecrypt merged 1 commit intomainfrom
adrian/remove-dead-read-handler

Conversation

@codefromthecrypt
Copy link
Copy Markdown
Collaborator

@codefromthecrypt codefromthecrypt commented Mar 11, 2026

Summary

Remove unreachable read handler from DeveloperClient::call_tool. read is only offered in ACP mode via AcpTools::list_tools; the extension manager validates tool names against get_tools(), so this handler was never called.

Type of Change

  • Refactor / Code quality

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Existing tests pass — developer_tools_are_flat already asserts ["write", "edit", "shell", "tree"].

Related Issues

Follow-up to #7668

read is only offered in ACP mode (injected by AcpTools::list_tools
when fs caps are present). DeveloperClient::call_tool never receives
a read call because the extension manager validates tool names against
get_tools() first.

Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt changed the title remove dead read handler from DeveloperClient fix: remove dead read handler from DeveloperClient Mar 11, 2026
@codefromthecrypt codefromthecrypt marked this pull request as ready for review March 11, 2026 23:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f62d94364

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 156 to 157
match name {
"read" => match Self::parse_args::<FileReadParams>(arguments) {
Ok(params) => Ok(self.edit_tools.file_read_with_cwd(params, working_dir)),
Err(error) => Ok(CallToolResult::error(vec![Content::text(format!(
"Error: {error}"
))
.with_priority(0.0)])),
},
"shell" => match Self::parse_args::<ShellParams>(arguments) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reintroduce read dispatch in DeveloperClient

Removing the "read" arm changes behavior for valid prefixed calls that still reach this client: ExtensionManager::resolve_tool accepts any "<extension>__<tool>" name before consulting list_tools (see resolve_tool), and default extension configs treat an empty available_tools list as "all tools allowed", so a developer__read request can still be dispatched to DeveloperClient::call_tool. Before this change those requests succeeded via file_read_with_cwd; now they return Unknown tool, which is a regression for legacy/manual prefixed tool invocations.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

👎

Since read is no longer in get_tools(), the LLM never sees developer__read as an available tool. It can't call what it doesn't know exists.

your comment is the same as developer__poop yes LLM could hallucinate that.

Copy link
Copy Markdown
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

nice

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Mar 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@codefromthecrypt codefromthecrypt added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit f2ad0a8 Mar 12, 2026
38 of 41 checks passed
@codefromthecrypt codefromthecrypt deleted the adrian/remove-dead-read-handler branch March 12, 2026 05:00
michaelneale added a commit that referenced this pull request Mar 15, 2026
* origin/main:
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set (#7284)
  fix: disable some computercontroller functionality when no $DISPLAY detected (#7824)
  test(acp): align provider and server test parity (#7822)
  fix(acp): register MCP extensions when resuming a session (#7806)

# Conflicts:
#	ui/desktop/src/hooks/useChatStream.ts
lifeizhou-ap added a commit that referenced this pull request Mar 16, 2026
* main: (191 commits)
  fix: add tool_choice and parallel_tool_calls to chatgpt_codex provider (#7867)
  fix: tool confirmation handling for multiple requests (#7856)
  Remove dead OllamaSetup onboarding flow (#7861)
  fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832)
  Upgrade Electron 40.6.0 → 41.0.0 (#7851)
  Only show up to 50 lines of source code (#7578)
  fix: stop writing without error when hitting broken pipe for goose session list (#7858)
  feat(acp): add session/set_mode handler (#7801)
  Keep messages in sync (#7850)
  More acp tools (#7843)
  fix: skip upgrade-insecure-requests CSP for external HTTP backends (#7714)
  fix(shell): prevent hang when command backgrounds a child process (#7689)
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  ...
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.

2 participants