Synchronous vs Background Agents
What synchronous and background agents are, when each one fits, and what a job that runs alone needs, explained simply for your AI interview.
In short
A synchronous agent works while the user waits and answers in the same session. A background agent takes a job, works alone for minutes or hours, and returns the result later. Background agents need saved progress, stop rules and a way to collect results.
11 min readIntermediateOccasional ยท estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
A synchronous agent works while the user waits, and the answer comes back in the same session. A background agent takes a job, works on its own for minutes or hours, and the result is collected later. The background kind needs saved progress, stop rules and a human check before risky steps, because nobody watches each step. I use the synchronous kind for live chat and the background kind for big jobs like overnight claims triage.
There are two ways to run an agent. In a synchronous run, the request stays open and the user waits for the answer. A live chat is the typical case: the customer types, the agent looks up the order and replies within a minute, and nobody leaves the screen.
A background run works differently. The job is submitted with its task and its limits, and a job ID comes back at once. The agent keeps working on its own, sometimes for hours. The result is collected later, either by polling the job ID or by a webhook, a message to my system that says it is done. Picture a claims team with 6,000 storm claims to read overnight.
Background is harder, because nobody watches each step. So I save progress after every step, so a crash resumes instead of starting over. I cap the steps and the spend, so a loop cannot run all night. Any risky action, like a payment, waits for a person. And retries must not repeat a side effect, so a retry never sends the same letter twice.
My rule of thumb: if a user is waiting for the answer, go synchronous. If the work is big, can wait and can be checked later, go background, and design it for failure from the first day.
What are synchronous and background agents, in plain words?
An agent is an AI program that plans its steps and calls tools to finish a task. The question here is how the work gets back to the person who asked for it.
In a synchronous run, the request stays open and you wait for the answer. In a background run, you hand over the job, get a job ID straight away, and come back later for the result.
Think of a bank loan desk. A teller checks your form while you stand at the counter, which is synchronous. A mortgage file sent to the back office, and emailed back two days later, is background. The work is the same kind. What differs is who waits.
In an AI product, a claims assistant that answers an adjuster on a live call is synchronous. A job that reads 6,000 storm claims overnight is background. OpenAI calls the second kind background mode, and Anthropic's batch service uses the same asynchronous idea for plain requests.
Key words
- Synchronous
- The request stays open, and the answer comes back in the same session.
- Background job
- Work an agent does on its own after you submit it, with the result collected later.
- Polling
- Asking the job, by its ID, whether it has finished yet.
- Checkpoint
- A saved copy of progress after a step, so a crash can resume from there.
- Stopping condition
- A rule that ends a run, such as a maximum number of steps or a spend cap.
How do the two modes differ?
- Synchronous
The user waits
The connection stays open and the answer comes back in the same session. Best for a chat reply or a quick lookup.
- Background
The job runs alone
The agent takes the job, works for minutes or hours, and the result is collected later. Best for big, slow work that can wait.
- The trade-off
Who waits, and how long it runs
Synchronous keeps the user waiting for the answer. Background allows long work, but nobody is waiting on it, so it needs saved progress and rules.
Anthropic's Agent SDK hosting guide gives examples of long-running agent work. It lists a deep research job that pauses and resumes over hours as one case, next to a customer support agent that loads ticket history across interactions.
Two ways to run an agent
Synchronous: user waits
User asks
A question in the chat or on a call
Agent works
The user waits for the answer
Background: user leaves
Job submitted
Gets a job ID at once
Agent works alone
Minutes or hours, saved as it goes
Answer now
Read in the same session
Result later
Fetched by job ID, or sent by webhook
- 1The user asks, and the agent works while the connection stays open.
- 2The answer comes back in the same session, so the user never leaves.
- 3The job is submitted, and the agent carries on without the user.
- 4The result is collected later by job ID, or pushed by a webhook.
Worked example, with made-up numbers. A motor insurer gets 6,000 claims after a storm weekend. Synchronous: an adjuster on a call asks for a summary of the photos and the policy, and gets it back in about 20 seconds. Background: an overnight job reads all 6,000 claims, tags the damage type, drafts the first letter, and lists any claim with a missing photo. By 7am, 5,870 drafts are ready and 130 claims wait on a list for a person.
What does a background agent need to work?
Nobody watches each step, so the job has to survive a crash, report where it is, and stop on its own. Five parts do that.
- 1
Saved progress
Save a checkpoint after each step. Microsoft's architecture guide makes the same point for long-running work: keep shared state outside the agent's memory. That is what lets a run pick up after a crash.
- 2
A way to collect the result
Poll the job ID until it is done, or receive a webhook (a message the service sends to your system when the job ends). OpenAI's background mode says to poll by ID when webhooks cannot be received.
- 3
Stop rules
Cap the steps, the time and the spend for each job. Anthropic's guide suggests stopping conditions, such as a maximum number of iterations, to maintain control.
- 4
A person before risky steps
Payments, sent letters and deletes wait for a human. Anthropic's guide says agents can pause for human feedback at checkpoints.
- 5
Cancel, and safe retries
The owner can cancel a running job. OpenAI shows a cancel call for a background response that is still running. Make each retry safe, so a retry does not send the same letter twice.
โUse background mode to run long-running Responses API requests asynchronously, including multi-step agent runs.โ
OpenAI
โFor orchestrations that span multiple user interactions or long-running tasks, persist shared state externally rather than relying only on in-memory context.โ
Microsoft
โAgents can then pause for human feedback at checkpoints or when encountering blockers.โ
Anthropic
Two costs to name. Anthropic's guide warns that agents bring higher costs and the chance of errors that build on each other, so one wrong early step can spread. And OpenAI's background mode keeps response data for a while even when storing is switched off, so check where a job's data lives before you use it on sensitive work.
Life of a background job
Job starts
Task, step cap and spend cap set
Agent works
Saves a checkpoint after each step
How it ends
Result saved
Read by poll or webhook
Human reviews
Risky steps wait for approval
Stopped at a cap
Partial work kept, resume later
- 1The job starts with its task and its limits already set.
- 2When the task is finished, the result is saved for the user.
- 3A risky step, like a payment, waits for a person before it runs.
- 4A step or spend cap is hit, so the job stops and keeps its partial work.
Tip
Asked how to make a background job safe? Name the parts in order: saved progress, a way to collect results, stop rules, a human check before risky steps, and retries that are safe.
How would you choose a mode for a real team?
A payments team wants an agent that flags duplicate supplier invoices. Start with one question: does someone wait for the answer? A clerk checking an invoice in front of them needs it now, so that check runs synchronously inside the portal. The nightly sweep of 2 million invoices, which reads the attachments and flags likely duplicates, runs in the background.
The background sweep gets a checkpoint every 1,000 invoices, a spend cap for each night, and a review list that a person works through. The agent alone never pays or blocks a supplier. The numbers are made up, but the shape of the job is real.
- 1
Ask who waits
If a person is waiting, the answer must be synchronous. If nobody waits, the work can move to the background.
- 2
Estimate length and cost
Time the work on a sample and scale it up. A sweep that takes nine hours needs a job that survives the night.
- 3
Design the safety
Checkpoints, caps, a review queue, and no automatic payment.
- 4
Test the failure
Stop the job halfway, then check that it resumes, does not repeat a flag, and still stops at its cap.
What does the interviewer want to hear?
A strong answer covers
- The plain difference: in one mode the user waits, in the other the job runs alone.
- A real example of each, and the reason for choosing it.
- Background jobs need saved progress, a way to collect results, cancel, and stop rules.
- Retries must not repeat an action that changes the outside world, like a sent email or a payment.
- A person checks risky steps before they run.
- Cost and data: caps per job, and where the job's data is kept.
Common traps
Trap"Background agents are just faster synchronous ones."
BetterThey are a different shape. The job runs alone, so it needs saved progress, a way to collect results and stop rules.
Trap"Let it run until it finishes."
BetterSet caps on steps, time and spend. A looping agent can run up a large bill all night.
Trap"Keep the progress in memory, it is fine."
BetterA crash wipes memory. Save a checkpoint after each step so the job resumes where it stopped.
Can you spot the unsafe job design?
Spot the unsafe design
Your claims team wants an agent to re-read 6,000 claims overnight. Which job design is safe?
Quick check
A live chat assistant must answer a customer's refund question before the customer closes the window. Which mode fits?
Can you answer these from memory?
Flash cards ยท tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Building an agent that runs jobs overnight?
I design and build AI agents, the interface and the system behind it, including background jobs with saved progress, stop rules and human checks. Book a short call and tell me what your job needs to do.