Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Redmond desk5 min

Human-in-the-Loop Approvals in Microsoft Foundry: Pause a Long-Running Agent and Resume It Later

A Foundry hosted agent can suspend a multi-turn task for human approval and resume it later with the same task ID. Learn what to persist and how its preview behavior differs from Durable Task session retention.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To pause a long-running Microsoft Foundry hosted agent for human approval, model the work as a persistent multi-turn task: return an approval request on the first turn, then start another turn with the same task_id after a person decides. The original turn ends rather than holding an HTTP request open. Microsoft’s guide says the suspended task can wait arbitrarily long and survive container restarts, but the feature is in preview and its API may change.

How the approval pause works

A Foundry multi-turn task suspends its chain under a task ID when it returns an approval request. The application can show that request to a person and let the turn finish. Once the person approves or rejects, the application invokes the task again with the same task ID and supplies the decision as new input. The handler resumes in a resumed mode and continues along the appropriate branch. Microsoft describes this wait as arbitrarily long and says it survives container restarts; those claims apply to the long-running hosted-agent preview documented in its approval guide, not to every related session or framework.

As an Amazon Associate I earn from qualifying purchases.

Implement the approval as a multi-turn task

  1. Define the task and context. Use @multi_turn_task and a typed task context for the approval workflow.
  2. Prepare the action on the first turn. Gather what is needed to make the decision, save only small references such as an expense ID or watermark in ctx.metadata, and return a concise approval summary and a status such as awaiting_approval.
  3. Present the request and end the turn. Show the summary to the approver. Do not keep the original request open while waiting; the chain is suspended under its task ID.
  4. Resume with the decision. After the person responds, invoke the same task with that same task_id and input containing the approval or rejection. In the resumed call, read ctx.input and continue the corresponding branch.
  5. Persist the substantial state elsewhere. Keep full request payloads, conversation history, and generated artifacts in application storage or a framework checkpoint rather than relying on task metadata for large state.

Microsoft’s example uses an expense: the first turn stores expense.id in task metadata and returns an awaiting-approval status with a summary; a later turn submits the expense if approved or returns a rejected result. It is a documentation example, not an independently verified implementation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Preserve state across framework interrupts

If approval pauses a framework workflow over a background response, use the framework’s interrupt or approval mechanism, enable resilient_background=True, persist its checkpoint at the interrupt, and rebuild state from that checkpoint when resuming. This is a separate state-management layer from the Foundry task ID: the task ID identifies the suspended multi-turn chain, while the checkpoint or application store holds the full workflow state.

#1 Best Overall
Sale
Microsoft Surface Laptop (2026), 13.8-inch Premium Performance Laptop, Snapdragon X2 Elite Processor, Touchscreen Display, 16GB RAM, 512GB SSD Storage, Windows 11 Copilot+ PC Built for AI, Platinum
  • Brilliant Display – Stunning 13.8" PixelSense touchscreen[1], with brilliant LCD display[2], unleashes luminous whites, deeper blacks and colors so richly saturated bringing vivid life into every frame – perfect for work, school, streaming and creative tasks.
  • Power that lasts all day – With 20 hours of battery life[3], the new Surface Laptop powers through your entire day, so you can create, work and stream from morning to night without reaching for a charger.​
  • Work at the speed of your ideas – Built with the latest Qualcomm Snapdragon X2 Elite (12 Core) processors, Surface Laptop delivers fast, AI‑accelerated performance—making it the most powerful Surface laptop for everything from multitasking to demanding workloads.
  • The ports you need – Charge on-the-go, transfer data fast, or create the ultimate desktop set up with two USB-C / USB4[4] ports.
  • Built-in AI Companion – Work smarter, create freely, and communicate with confidence—Copilot[5] on Windows 11 is always there to help.​

Do not confuse an indefinite wait with session retention

“Arbitrarily long” describes the suspended wait in the Foundry long-running hosted-agent approval guide. The separately documented Durable Task extension for Microsoft Agent Framework has an idle session TTL: its default is 14 days, it can be configured globally or per agent, and an agent can be configured with no TTL. When an idle session expires, its entire state is deleted; a later message creates a fresh session. Microsoft says TTL configuration is currently available in .NET only. The same documentation gives a 5-minute minimum TTL deletion delay, and notes a 1 MB maximum entity state size for Durable Task Scheduler, which can matter when long conversations include large tool outputs and may require manual compaction. See Microsoft’s Durable Task extension documentation.

These TTL details concern Durable Task agent sessions, not the Foundry preview task’s documented suspended wait. Likewise, the Durable Task for AI agents overview lists stateful Logic Apps workflows as lasting up to 90 days in its comparison of Azure options; that is a Logic Apps service-option limit, not a Foundry task limit.

Rank #2
Microsoft Surface Laptop 5 13.5" Touchscreen Notebook - 2256 x 1504 - Intel Core i7 12th Gen i7-1265U - Intel Evo Platform - 16 GB Total RAM - 512 GB SSD (Platinum) (Renewed)
  • With 16 GB of memory, runs as many programs as you want without losing the execution
  • The 13.5" 2256 x 1504 screen provides a great movie watching experience
  • 512 GB SSD is enough to store your essential documents and files, favorite songs, movies and pictures
  • 8 Hours battery run time helps you stay unwired and work longer non-stop
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the orchestration model that fits the workflow

Human approval can be implemented through several Microsoft options. They differ in how control flow is expressed, where the workflow runs and stores state, and how the system resumes after a pause or failure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Option Control flow and resume Fit and retention considerations
Foundry long-running hosted-agent multi-turn task The agent returns an approval request, suspends under a task ID, and resumes when called again with that ID and the person’s decision. Use when the agent itself needs a durable suspended task. The feature is preview; the approval guide describes an arbitrarily long wait that survives container restarts.
Microsoft Agent Framework workflow with Durable Task extension Pause at a workflow point such as .NET RequestPort or Python ctx.request_info(); the documented durable workflow exposes run, status, and respond HTTP endpoints, with the response endpoint resuming execution. Consider its session TTL and storage limits. The default idle session TTL is 14 days, configurable including no TTL; expired state is deleted. Microsoft says TTL configuration is currently .NET-only.
Azure Logic Apps with Foundry A managed, declarative workflow can combine agent steps, connectors, webhooks, human approvals, and external events; Microsoft shows approvals waiting for a manager response. Useful when orchestration should be declarative and integrate with managed connectors or events. Microsoft describes workflows as durably running for the process duration; its options comparison lists stateful Logic Apps workflows up to 90 days.
Durable Task programming model A code-first durable-execution model with checkpointing and recovery after infrastructure failures. Consider when a code-first orchestration model, multiple language options, and framework flexibility suit the application; compare hosting and state-storage choices for the intended deployment.

Microsoft’s Azure options comparison also distinguishes the options by language support, hosting, state storage, long-running limits, and failure recovery. Azure Logic Apps approval behavior is described in Microsoft’s agentic process automation documentation.

Best Value
Sale
Microsoft Surface Laptop (2026), 13.8-inch Premium Performance Laptop, Snapdragon X2 Elite Processor, Touchscreen Display, 16GB RAM, 512GB SSD Storage, Windows 11 Copilot+ PC Built for AI, Dune
  • Brilliant Display – Stunning 13.8" PixelSense touchscreen[1], with brilliant LCD display[2], unleashes luminous whites, deeper blacks and colors so richly saturated bringing vivid life into every frame – perfect for work, school, streaming and creative tasks.
  • Power that lasts all day – With 20 hours of battery life[3], the new Surface Laptop powers through your entire day, so you can create, work and stream from morning to night without reaching for a charger.​
  • Work at the speed of your ideas – Built with the latest Qualcomm Snapdragon X2 Elite (12 Core) processors, Surface Laptop delivers fast, AI‑accelerated performance—making it the most powerful Surface laptop for everything from multitasking to demanding workloads.
  • The ports you need – Charge on-the-go, transfer data fast, or create the ultimate desktop set up with two USB-C / USB4[4] ports.
  • Built-in AI Companion – Work smarter, create freely, and communicate with confidence—Copilot[5] on Windows 11 is always there to help.​
Rank #4
Sale
Microsoft Surface Laptop (2026), 15-inch Premium Performance Laptop, Snapdragon X2 Elite Processor, Touchscreen Display, 16GB RAM, 1TB SSD Storage, Windows 11 Copilot+ PC Built for AI, Black
  • A PREMIUM PERFORMANCE LAPTOP — Ready for work, school, and creativity. Built for busy days, big projects, and nonstop multitasking. Run video calls, school and work apps, 20+ browser tabs, and AI tools at the same time without slowing down.
  • WITH AI BUILT IN — With a dedicated AI chip (Qualcomm Snapdragon X2 Elite), this Copilot+ PC[5] on Windows 11 helps you work smarter and faster. Prompt, create, and automate with ease - ready for even your most demanding tasks.
  • A 15" TOUCHSCREEN YOU'LL ACTUALLY USE — Sharp colors, real detail, smooth 120Hz scrolling on the PixelSense touchscreen[1] with LCD display[2]. Tap, scroll, or pinch to zoom - whichever feels right for streaming, editing photos, or daily work.
  • 19 HOURS OF BATTERY (LEAVE THE CHARGER) — Up to 19 hours of video playback[3] on a single charge. Work from a coffee shop, take it to class/work, or binge an entire season on a long flight — it'll keep up.
  • Two USB-C / USB4[4] ports and a microSD card reader for fast charging, big file transfers, or hooking up to three 4K monitors when you want a full desktop. Wi-Fi 7 keeps you online and fast wherever you are.
Rank #3
Sale
Microsoft Surface Laptop (2026), 13.8-inch Premium Performance Laptop, Snapdragon X2 Elite Processor, Touchscreen Display, 16GB RAM, 512GB SSD Storage, Windows 11 Copilot+ PC Built for AI, Black
  • A PREMIUM PERFORMANCE LAPTOP — Ready for work, school, and creativity. Built for busy days, big projects, and nonstop multitasking. Run video calls, school and work apps, 20+ browser tabs, and AI tools at the same time without slowing down.
  • WITH AI BUILT IN — With a dedicated AI chip (Qualcomm Snapdragon X2 Elite), this Copilot+ PC[5] on Windows 11 helps you work smarter and faster. Prompt, create, and automate with ease - ready for even your most demanding tasks.
  • A 13.8" TOUCHSCREEN YOU'LL ACTUALLY USE — Sharp colors, real detail, smooth 120Hz scrolling on the PixelSense touchscreen[1] with LCD display[2]. Tap, scroll, or pinch to zoom - whichever feels right for streaming, editing photos, or daily work.
  • 20 HOURS OF BATTERY (LEAVE THE CHARGER) — Up to 20 hours of video playback[3] on a single charge. Work from a coffee shop, take it to class/work, or binge an entire season on a long flight — it'll keep up.
  • THE PORTS YOU NEED — Two USB-C / USB4[4] ports for fast charging, big file transfers, or hooking up to three 4K monitors when you want a full desktop. Wi-Fi 7 keeps you online and fast wherever you are.

Design the approval boundary deliberately

  • Make the request actionable. Include the information a person needs to approve or reject, while keeping the persisted task metadata small.
  • Separate durable identity from durable content. Keep the task ID for resumption and store the full payload and artifacts in an appropriate application store or checkpoint.
  • Define both outcomes. Resume into explicit approved and rejected branches so rejection does not accidentally proceed with the action.
  • Check the retention model you actually use. An indefinite suspended wait in the Foundry preview does not disable a separate session TTL or guarantee retention by every external state store.
  • Plan for preview changes. Confirm current package and API details against Microsoft documentation before relying on specific signatures or availability.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.