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
A2A server: ask the client for tool approval via TASK_STATE_INPUT_REQUIRED instead of auto-denying #4970
When an agent served with docker agent serve a2a makes a tool call that needs user approval, the call is silently auto-denied. The client is never asked, and the task still ends in COMPLETED.
I'd like the A2A server to use the protocol's TASK_STATE_INPUT_REQUIRED state instead, so the client can approve or reject the tool call.
Motivation
Today the only way to get useful work done over A2A is to auto-approve every tool, which is a safety trade-off users shouldn't be forced into. The TUI and serve api already support approvals, and A2A defines TASK_STATE_INPUT_REQUIRED for exactly this, but docker-agent never emits it.
Use cases
An orchestrator delegates a task to a docker-agent over A2A and relays shell-command approval requests to its own user.
A web front-end built on A2A shows an "Approve / Reject" prompt instead of the tool call being silently dropped.
With push notifications, the client is notified that the task is waiting for approval and can answer asynchronously.
Proposed solution
When a tool call needs confirmation, the task moves to INPUT_REQUIRED. The status message describes the pending call.
The client approves or rejects it with a follow-up message on the same task, and the task resumes.
Opt-in behind a flag, so existing deployments keep the current behavior.
Addendum: normalizing the reply with an A2A extension
Problem. A2A (1.0) has no "allowed responses" field for TASK_STATE_INPUT_REQUIRED. The A2A TSC decided this should be handled by an extension.
Proposal. An extension …/a2a/tool-approval/v1 (URI to be decided), enabled only with --tool-approval.
Declared in the AgentCard
capabilities.extensions: [{uri: ".../tool-approval/v1",required: false// clients unaware of it keep working}]
Pause: the contract lives in the function_call part of status.message
status: {
state: INPUT_REQUIRED,message.parts: [{data: { id,name: "shell", args },metadata: {".../tool-approval/v1": {prompt: "shell wants to run a command",responseSchema: {// JSON Schema, readable by a UI and by an LLMdecision: enum[approve,reject],reason?: string}}}}]}
Addendum: normalizing the reply with an A2A extension
Problem. A2A (1.0) has no "allowed responses" field for TASK_STATE_INPUT_REQUIRED. The A2A TSC decided this should be handled by an extension.
Proposal. An extension …/a2a/tool-approval/v1 (URI to be decided), enabled only with --tool-approval.
Declared in the AgentCard
capabilities.extensions: [{
uri: ".../tool-approval/v1",
required: false // clients unaware of it keep working
}]
2. Pause: the contract lives in the function_call part of status.message
status: {
state: INPUT_REQUIRED,
message.parts: [{
data: { id, name: "shell", args },
metadata: {
".../tool-approval/v1": {
prompt: "shell wants to run a command",
responseSchema: { // JSON Schema, readable by a UI and by an LLM
decision: enum[approve, reject],
reason?: string
}
}
}
}]
}
3. Client reply
SendMessage {
taskId, contextId, // taskId is required
extensions: [".../tool-approval/v1"],
parts: [{ data: { id, name, response: { decision: "approve" } } }]
}
4. Invalid decision: the request is rejected and the task keeps waiting
error: { code: -32602, data.reason: "decision 'x' not allowed; expected [approve, reject]" }
// task stays INPUT_REQUIRED, nothing added to history, no push notification
@aheritier , @rumpl , @dgageot , Before starting development, can you confirm that this design is ok for you?
To put it simply, the idea is to add an A2A extension to normalize INPUT_REQUIRED exchanges.
If ok, we need extension uri like https://docker.github.io/docker-agent/features/a2a/extensions/tool-approval/v1
Activity
deka commentedon Nov 23, 2026
Addendum: normalizing the reply with an A2A extension
Problem. A2A (1.0) has no "allowed responses" field for TASK_STATE_INPUT_REQUIRED. The A2A TSC decided this should be handled by an extension.
Proposal. An extension …/a2a/tool-approval/v1 (URI to be decided), enabled only with --tool-approval.
deka commentedon Nov 24, 2026
@aheritier , @rumpl , @dgageot , Before starting development, can you confirm that this design is ok for you?
To put it simply, the idea is to add an A2A extension to normalize
INPUT_REQUIREDexchanges.If ok, we need extension uri like
https://docker.github.io/docker-agent/features/a2a/extensions/tool-approval/v1