ACP: Execute tool call title field contains conversational text.
#23018 opened on Mar 18, 2026
Description
What happened?
Severity: Major
Component: Gemini CLI / ACP Payload Formatting
Overview
When the Gemini CLI agent attempts to run a terminal command via the execute tool call, it prompts the user for permission (Allow/Reject) in the JetBrains IDE. Currently, the agent is placing conversational text alongside the executable command inside the title field of the payload (e.g., "I will now run the build script: ./gradlew build").
The JetBrains IDE relies on the title field to render the command block and apply terminal syntax highlighting. Because the field contains standard English mixed with bash commands, the syntax highlighting breaks. This results in an unformatted, messy text block that makes it difficult for users to securely review the command before granting execution permissions.
Steps to Reproduce
- Run the Gemini CLI agent as a custom ACP agent in the JetBrains IDE.
- Ask the agent to perform an action that requires a terminal command (e.g., "Build this project" or "List the files in this directory").
- Observe the "Allow / Reject" execution prompt generated in the chat UI.
Expected Behavior (Strict Separation of Concerns)
- title field: MUST contain only the raw, executable string (e.g., ./gradlew build). This ensures the IDE can apply proper terminal syntax highlighting.
- content field: Should contain the agent's conversational explanation (e.g., "I am running this command to compile the project.").
Actual Behavior
The title field contains a concatenated string of the agent's reasoning and the command itself, breaking the UI rendering.
Example from JetBrains
Additional Examples
2026-03-17 15:20:52,937 [ 389346] FINE - AcpTransport - OUT: {"type":"com.agentclientprotocol.rpc.JsonRpcRequest","id":5,"method":"session/prompt","params":{"sessionId":"f3103245-aa2c-44b1-96ad-198ae392113e","prompt":[{"type":"text","text":"Can you run the command \"date\"?"}]},"jsonrpc":"2.0"}
2026-03-17 15:20:56,965 [ 393374] FINE - AcpTransport - IN: {"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"f3103245-aa2c-44b1-96ad-198ae392113e","update":{"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"I will run"}}}}
2026-03-17 15:20:57,101 [ 393510] FINE - AcpTransport - IN: {"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"f3103245-aa2c-44b1-96ad-198ae392113e","update":{"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":" the `date` command in the integrated terminal to display the current date and time."}}}}
2026-03-17 15:20:57,266 [ 393675] FINE - AcpTransport - IN: {"jsonrpc":"2.0","id":0,"method":"session/request_permission","params":{"sessionId":"f3103245-aa2c-44b1-96ad-198ae392113e","options":[{"optionId":"proceed_always_server","name":"Always Allow idea","kind":"allow_always"},{"optionId":"proceed_always_tool","name":"Always Allow execute_terminal_command","kind":"allow_always"},{"optionId":"proceed_once","name":"Allow","kind":"allow_once"},{"optionId":"cancel","name":"Reject","kind":"reject_once"}],"toolCall":{"toolCallId":"mcp_idea_execute_terminal_command-1773786057263","status":"pending","title":"{\"projectPath\":\"/Users/nickm/IdeaProjects2/tetris\",\"command\":\"date\"}","content":[],"locations":[],"kind":"other"}}}
This is another example of the tool call becoming malformed, where it puts everything under title inappropriately.
"toolCall": {
"toolCallId": "mcp_idea_execute_terminal_command-1773786057263",
"status": "pending",
"title": "{\"projectPath\":\"/Users/nickm/IdeaProjects2/tetris\",\"command\":\"date\"}",
"content": [],
"locations": [],
"kind": "other"
}
What did you expect to happen?
It shouldn't have conversational text while doing user ask for tool call.
Client information
Run gemini to enter the interactive CLI, then run the /about command.
> /about
# paste output here
Login information
No response
Anything else we need to know?
No response