You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The tool_confirmation window's data cannot be change. #3506
Describe the bug
The confirm window's data cannot be reset.
I have multi tool_context.tool_confirmation operation in a conversion, after user submited the first confirm window, When the user triggers confirmation again, the data in the confirmation window remains unchanged.
Expected behavior
The confirmation window display the right data.
Screenshots
Desktop (please complete the following information):
Thank you for reaching out. Could you please share some additional details about your issue to help us understand it better? If possible, please include a minimal reproducible code example so that we can try to reproduce the issue and analyze it in more depth.
It is that within a single session, it will trigger multiple confirmations, and each confirmation has a different tool name and data. However, the pop-up on the frontend always displays the tool name and data of the first confirmation.
In a single session, multiple user queries will trigger confirmations, but the data in the confirmation windows from the second and subsequent confirmations are all from the first one. Sorry, the code is not suitable for pasting here. There are multiple confirmation tools under the agent.
Ok, is it possible for you to share the reproduction steps to help us understand this better? Additionally could you please share the ADK version you are using and whether you are using LiteLLM or not?
We would require some more information on this so that we can try to reproduce, could please share some reproduction steps, it will help us analyze this issue better?
I’m facing the same issue. In my case, the agent checks the initial query to see if all required information is available. If something is missing, it triggers the request_user_clarification function. Each time the user provides more input, the agent checks again. If information is still missing, it asks for more details.
What I’ve noticed is that the user input shown in the ADK web UI is not getting updated with the latest information each time request_user_clarification is called. Instead, it seems to be using cached data. Because of this, it keeps sending requests with the old function call ID. As a result, the agent keeps asking for more information, but the new user input is not being added on top of the previous details.
This causes the tool-call pop-up to show outdated data, and it ends up in a loop where the user keeps providing information, but the agent never receives the correct, updated input.
adk --version
adk, version 1.19.0
google-adk = "1.19.0"
def request_user_clarification(
question: str,
context: str,
tool_context: Optional[ToolContext]
) -> Dict[str, Any]:
"""
Request clarification or missing information from user.
Use when you need additional information to proceed:
- Missing location/region
- Unclear requirements
- Need to choose from options
Arguments:
- question (str): Clear question for the user
- context (str): Why you need this information
"""
logger.info(f" 🔄 Clarification requested: {question}")
if tool_context and tool_context.tool_confirmation and tool_context.tool_confirmation.confirmed:
user_payload = tool_context.tool_confirmation.payload or {}
logger.info(f" ✅ User clarification received: {user_payload}")
return {
"user_answer": user_payload['answer'],
"message": "User clarification received"
}
logger.info(f" ⏸️ Pausing execution - waiting for user clarification")
if tool_context:
tool_context.request_confirmation(
hint=f"CLARIFICATION NEEDED: {question}\nContext: {context}",
payload={"answer": ""}
)
return {
"confirmation_needed": True,
"message": f"Waiting for clarification: {question}"
}
def request_human_approval(
summary: str,
context: str,
tool_context: Optional[ToolContext]
) -> Dict[str, Any]:
"""
Request human approval for a plan or action before proceeding.
Use for high-impact decisions:
- Campaign deployment
- Budget allocation
- Strategic decisions
- Severe weather responses
Arguments:
- summary (str): Brief summary of what needs approval
- context (str): Details about the approval request
"""
logger.info(f" 🔄 Approval requested: {summary}")
if tool_context and tool_context.tool_confirmation and tool_context.tool_confirmation.confirmed:
user_payload = tool_context.tool_confirmation.payload or {}
approved = user_payload.get("approved", False)
logger.info(f" ✅ User approval response: approved={approved}")
return {
"approved": approved,
"user_response": user_payload,
"message": "Approval decision processed"
}
logger.info(f" ⏸️ Pausing execution - waiting for user approval")
if tool_context:
tool_context.request_confirmation(
hint=f"APPROVAL REQUIRED:\n{summary}\n\nDetails:\n{context}",
payload={"approved": False}
)
return {
"confirmation_needed": True,
"message": f"Waiting for approval: {summary}"
}
def create_hitl_tools() -> list:
"""
Factory function to create HITL FunctionTools.
Returns:
List of FunctionTool instances for HITL interaction
Usage:
tools = create_hitl_tools()
agent = Agent(..., tools=[*tools, mcp_toolset])
"""
return [
FunctionTool(func=request_user_clarification),
FunctionTool(func=request_human_approval)
]
def create_weather_agent() -> Agent:
# Load system prompt
try:
instruction = load_system_prompt('weather')
logger.info(f" ✅ System prompt loaded")
except Exception as e:
logger.error(f" ❌ Failed to load system prompt: {e}")
raise
# Create HITL tools
hitl_tools = create_hitl_tools()
# Create MCP toolset
mcp_toolset = create_mcp_toolset(MCP_SERVER_URL, MCP_TOOLS)
if mcp_toolset:
logger.info(f" ✅ MCP toolset connected to {MCP_SERVER_URL}")
else:
logger.warning(f" ⚠️ MCP toolset not available (will use HITL only)")
# Combine tools
tools = [*hitl_tools]
if mcp_toolset:
tools.append(mcp_toolset)
# Create agent
agent = Agent(
name=AGENT_NAME,
model=LiteLlm(model=MODEL),
description=AGENT_DESCRIPTION,
instruction=instruction,
tools=tools
)
logger.info(f"✅ {AGENT_NAME} created successfully")
logger.info(f" Model: {MODEL}")
logger.info(f" Total tools: {len(agent.tools)}")
return agent
try:
weather_agent = create_weather_agent()
except Exception as e:
logger.error(f"❌ Failed to create weather_agent: {e}")
weather_agent = None
root_agent = weather_agent
app = App(
name="wather_app",
root_agent=root_agent,
resumability_config=ResumabilityConfig(
is_resumable=True
)
)
When using [LongRunningFunctionTool] (via [tool_context.request_confirmation()]) for Human-in-the-Loop (HITL) interactions, the original adk_request_confirmation event is never updated to reflect that the user has provided a response. This causes:
The ! (priority_high) FAB button to persist in the Dev UI after HITL completion
Clicking the button shows stale HITL request with [confirmed: false] and empty payload/previously submitted payload
Attempting to resubmit fails because it references an old/completed tool call ID
Steps to Reproduce
Create an agent with a [LongRunningFunctionTool] that uses [request_confirmation()]:
`from google.adk.tools import FunctionTool
from google.adk.tools.tool_context import ToolContext
Option B: Track Resolution Separately
Maintain a separate resolvedToolIds set and have Dev UI check both: is_pending = tool_id in longRunningToolIds and tool_id not in resolvedToolIds
Option C: Dev UI Logic Fix
Modify Dev UI to check for subsequent functionResponse events that match the longRunningToolIds:
fixed by google/adk-web@a2a337d, which replaced the confirmation dialog with an inline prompt per tool call, so a second confirmation no longer shows the first one's data. shipped in v1.27.0. please open a new issue if this is still happening.
Activity
llalitkumarrr commentedon Nov 12, 2025
Hello @hongliang-nemovideo,
Thank you for reaching out. Could you please share some additional details about your issue to help us understand it better? If possible, please include a minimal reproducible code example so that we can try to reproduce the issue and analyze it in more depth.
hongliang-nemovideo commentedon Nov 12, 2025
It is that within a single session, it will trigger multiple confirmations, and each confirmation has a different tool name and data. However, the pop-up on the frontend always displays the tool name and data of the first confirmation.
llalitkumarrr commentedon Nov 12, 2025
Could you please share minimal reproducible code so that we can understand this issue better?
hongliang-nemovideo commentedon Nov 12, 2025
In a single session, multiple user queries will trigger confirmations, but the data in the confirmation windows from the second and subsequent confirmations are all from the first one. Sorry, the code is not suitable for pasting here. There are multiple confirmation tools under the agent.
llalitkumarrr commentedon Nov 14, 2025
Ok, is it possible for you to share the reproduction steps to help us understand this better? Additionally could you please share the ADK version you are using and whether you are using LiteLLM or not?
hongliang-nemovideo commentedon Nov 14, 2025
Adk version is 1.8.0, and I'm using LiteLLM.
llalitkumarrr commentedon Nov 19, 2025
Hello @hongliang-nemovideo ,
We would require some more information on this so that we can try to reproduce, could please share some reproduction steps, it will help us analyze this issue better?
hongliang-nemovideo commentedon Nov 19, 2025
llalitkumarrr commentedon Nov 21, 2025
Just to confirm, are you using 1.8.0 or 1.18.0 ADK version?
hongliang-nemovideo commentedon Nov 21, 2025
oh, sorry! It is 1.18.0 adk version.
llalitkumarrr commentedon Nov 21, 2025
Have you tried using Gemini models out of Litellm or is this reproducible only with Litellm?
hongliang-nemovideo commentedon Nov 21, 2025
I only use cloude model, so I don't know how it will going without Litellm.
gmbwork commentedon Nov 27, 2025
I’m facing the same issue. In my case, the agent checks the initial query to see if all required information is available. If something is missing, it triggers the request_user_clarification function. Each time the user provides more input, the agent checks again. If information is still missing, it asks for more details.
What I’ve noticed is that the user input shown in the ADK web UI is not getting updated with the latest information each time request_user_clarification is called. Instead, it seems to be using cached data. Because of this, it keeps sending requests with the old function call ID. As a result, the agent keeps asking for more information, but the new user input is not being added on top of the previous details.
This causes the tool-call pop-up to show outdated data, and it ends up in a loop where the user keeps providing information, but the agent never receives the correct, updated input.
gmbwork commentedon Nov 28, 2025
When using [LongRunningFunctionTool] (via [tool_context.request_confirmation()]) for Human-in-the-Loop (HITL) interactions, the original adk_request_confirmation event is never updated to reflect that the user has provided a response. This causes:
Steps to Reproduce
`from google.adk.tools import FunctionTool
from google.adk.tools.tool_context import ToolContext
Expected Behavior
After user provides HITL response:
Actual Behavior
After user provides HITL response:
Evidence
Event 2 (adk_request_confirmation) - AFTER user responded:
Event 3 (functionResponse) - User's actual response:
The workflow continues correctly using Event 3, but the Dev UI still sees Event 2 as "pending".
Impact
Workaround
Currently, users must:
Suggested Fix
One of these approaches:
Option A: Update Original Event
When functionResponse is received for a longRunningToolIds tool, update the original adk_request_confirmation event:
Option B: Track Resolution Separately
Maintain a separate resolvedToolIds set and have Dev UI check both:
is_pending = tool_id in longRunningToolIds and tool_id not in resolvedToolIdsOption C: Dev UI Logic Fix
Modify Dev UI to check for subsequent functionResponse events that match the longRunningToolIds:
GWeale commentedon Oct 7, 2026
fixed by google/adk-web@a2a337d, which replaced the confirmation dialog with an inline prompt per tool call, so a second confirmation no longer shows the first one's data. shipped in v1.27.0. please open a new issue if this is still happening.