Skip to content

Gemini CLI run_shell_command tool fails in ACP mode, missing tool results #23507

Description

@hzyu-hub

Description

When using Gemini CLI via ACP protocol (spawned by Alma app), the run_shell_command tool consistently fails to return results, causing the AI SDK to throw AI_MissingToolResultsError.

Steps to Reproduce

  1. Run Gemini CLI with ACP flags: gemini --acp --experimental-acp
  2. Ask for a shell command execution (e.g., 'run ls command')
  3. Observe the error

Expected Behavior

The run_shell_command tool should execute successfully and return results to the ACP client.

Actual Behavior

  • run_shell_command tool call is initiated but never returns a result
  • ACP client receives no tool result
  • Error: AI_MissingToolResultsError: Tool results are missing for tool calls run_shell_command-xxx

Environment

  • Gemini CLI version: 0.34.0
  • macOS Sonnet
  • ACP Client: Alma v0.0.723
  • Flags used: --acp --experimental-acp

Additional Context

This appears to be related to existing issues #14561 and #5382. The issue is that in ACP/non-interactive mode, the run_shell_command tool cannot render user confirmation prompts and fails silently without returning a result to the ACP stream.

Suggested Fix

  • Handle ACP/non-interactive mode for run_shell_command tool
  • Either auto-approve commands in ACP mode or return an error result instead of hanging indefinitely
  • Ensure tool results are always returned to the ACP stream, even on failure

Activity

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

Metadata

Metadata

Assignees

Labels

area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationeffort/medium2-3 days: UI state, async flow, cross-component refactorskind/bugpriority/p1Important and should be addressed in the near term.status/bot-triagedtype/bug

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions