When a reviewer rejects an AI agent’s proposed API write, close that proposal and stop the write. If the feedback identifies a correction within the original task, verify it against the source of record. Then submit the corrected request as a new proposal with its own idempotency key and ask for fresh approval. If the reviewer says to stop or the correction is unclear, return control to the user.
Make rejection a terminal state
A rejected approval means the reviewer declined that exact request. Preserve the job ID, the request the reviewer saw, and the decision. End that execution path, including downstream steps that depend on the write having happened. If the workflow was waiting on a notification, resuming it should let the agent read the decision and explain what happened.
Route decisions using the recorded status. A pending proposal is still waiting for review. A rejected one is closed. If a request was already sent and its result is uncertain, reconcile with the provider before considering another write. That situation needs a different recovery path. AI agent API retries and unknown outcomes
Human-in-the-loop frameworks can surface rejection feedback to the model. The OpenAI Agents SDK supports custom messages for rejected calls. LangChain’s middleware likewise lets a reviewer decline a tool call and return an explanation to the agent. Keep the authority to execute in the workflow’s approval logic, and use the explanation to decide whether there is a new proposal worth reviewing. OpenAI Agents SDK documentation · LangChain documentation
Write feedback that gives the agent a next step
Name the specific field or assumption that caused the rejection and point to an authoritative record the agent can already read. For example, “The proposed restock date came from a draft. Check the confirmed inbound shipment for SKU 42.” If the operation should end, write “Leave the catalog unchanged. Purchasing is handling this update.”
Treat free-text feedback as context for the task. Keep credentials and unnecessary personal data out of it. If the explanation calls for a different destination or a broader change, return to the user to confirm the new scope. A workflow can also limit itself to one revised proposal after a rejection and escalate further disagreements to the owner.
A corrected catalog update
Suppose an agent proposes PATCH /catalog/items/42 with {"restockDate":"2026-11-24"}. The date came from a draft shipment, so the owner rejects it and asks the agent to check the confirmed shipment.
- Record the first proposal as rejected and leave the catalog unchanged through that job.
- Read the confirmed shipment using an already authorized read path. If it gives November 26, prepare
{"restockDate":"2026-11-26"}for the same item. If the date is still uncertain, stop and ask. - Keep the same business task in your workflow history and give the revised request a new job and idempotency key. Show the reviewer the original and revised dates, along with the record that supports the change.
- Wait for the new decision before taking any step that depends on the update. If the provider supports conditional writes, bind the reviewed resource version to the proposal. ETags and If-Match for AI agents
How rejection feedback works in ActionDock
For an integration.execute job in awaiting_approval, the agent can share its reviewUrl. The link opens the exact job for the signed-in workspace owner. The owner selects Reject write, optionally enters a reason, and chooses Confirm rejection. ActionDock saves the original preview, sets the job to rejected, and leaves the proposed request undispatched. The rejection reason is trimmed and can contain up to 1,000 characters.
Read the decision through GET /v1/jobs/{id} or the MCP tools get_job and wait_for_job. When the owner supplies a reason, the returned job includes it in error. With a blank or omitted reason, error is null and the status is still rejected. If callbacks are configured, the job.rejected event can wake your workflow. The feedback is visible in workspace job reads, the event and evidence exports, so give reviewers the same data-handling guidance you use for job records. ActionDock agent docs · ActionDock OpenAPI contract
For the revised request, submit a new integration.execute job with a new key. Submitting identical action input with the old key returns the original rejected job. Reusing that key with changed input returns HTTP 409 idempotency_conflict. Your workflow decides whether a revision is appropriate and tracks its relationship to the earlier job. ActionDock applies policy and requires owner approval of the new request before dispatch. These controls apply to writes routed through ActionDock. Human-in-the-loop approval for AI agents
