Is your feature request related to a specific problem?
When using LongRunningFunctionTool for HITL confirmation flows, the invocation pause is unconditional — it fires regardless of what the function returns. This breaks validation error handling.
If a tool validates its inputs and returns an error, the expected behavior is that the LLM sees the error and retries. What actually happens:
LLM calls submit_order(invalid_payload)
→ Tool returns {"status": "error", "error_message": "..."}
→ ADK pauses unconditionally
→ LLM never sees the error — cannot retry
The cause: long_running_tool_ids is stamped on the model event based on tool.is_long_running = True before the function runs. There is no hook to skip the pause based on what the function returns.
Describe the Solution You'd Like
A way to conditionally skip the pause based on the tool's return value. The simplest API would be a callable is_long_running evaluated after the function returns:
def submit_order(item_id: str, quantity: int) -> dict:
if quantity <= 0:
# Validation error — LLM should see this and retry, no pause needed
return {"status": "error", "error_message": "Quantity must be greater than zero"}
# Happy path — needs user confirmation, pause is appropriate
return {"status": "pending_confirmation", "summary": f"Order {item_id} x{quantity}"}
def should_pause(result: dict) -> bool:
return result.get("status") == "pending_confirmation"
submit_order_tool = LongRunningFunctionTool(
func=submit_order,
is_long_running=should_pause,
)
If should_pause returns False, the call ID is not added to long_running_tool_ids and the result goes directly to the LLM like a regular FunctionTool.
Impact on your work
Every propose tool in a HITL flow has validation guards. Without conditional pause, all of them require client-side workarounds. This is especially critical on Agent Engine (VertexAiSessionService), where LongRunningFunctionTool is the only available HITL mechanism — built-in adk_request_confirmation / adk_request_input are explicitly unsupported.
Willingness to contribute
Yes, happy to submit a PR if the team agrees on an approach.
🟡 Recommended Information
Describe Alternatives You've Considered
Client-side auto-resume: when the client detects status: "error" from a paused tool, it immediately sends the FunctionResponse back. Works, but adds an unnecessary round-trip and requires the frontend to distinguish validation errors from real confirmations.
Separate validation tool: a validate_order() (FunctionTool) before submit_order() (LongRunningFunctionTool). Doesn't fully work — the propose tool still needs its own internal validation as a safety net, bringing the problem back.
Additional Context
Is your feature request related to a specific problem?
When using
LongRunningFunctionToolfor HITL confirmation flows, the invocation pause is unconditional — it fires regardless of what the function returns. This breaks validation error handling.If a tool validates its inputs and returns an error, the expected behavior is that the LLM sees the error and retries. What actually happens:
The cause:
long_running_tool_idsis stamped on the model event based ontool.is_long_running = Truebefore the function runs. There is no hook to skip the pause based on what the function returns.Describe the Solution You'd Like
A way to conditionally skip the pause based on the tool's return value. The simplest API would be a callable
is_long_runningevaluated after the function returns:If
should_pausereturnsFalse, the call ID is not added tolong_running_tool_idsand the result goes directly to the LLM like a regularFunctionTool.Impact on your work
Every propose tool in a HITL flow has validation guards. Without conditional pause, all of them require client-side workarounds. This is especially critical on Agent Engine (
VertexAiSessionService), whereLongRunningFunctionToolis the only available HITL mechanism — built-inadk_request_confirmation/adk_request_inputare explicitly unsupported.Willingness to contribute
Yes, happy to submit a PR if the team agrees on an approach.
🟡 Recommended Information
Describe Alternatives You've Considered
Client-side auto-resume: when the client detects
status: "error"from a paused tool, it immediately sends theFunctionResponseback. Works, but adds an unnecessary round-trip and requires the frontend to distinguish validation errors from real confirmations.Separate validation tool: a
validate_order()(FunctionTool) beforesubmit_order()(LongRunningFunctionTool). Doesn't fully work — the propose tool still needs its own internal validation as a safety net, bringing the problem back.Additional Context
VertexAiSessionService)_finalize_model_response_event→get_long_running_function_calls, beforehandle_function_calls_asyncruns. No existing callback fires between those two steps.