﻿# OpenHands pause and resume require execution-state coordination

OpenHands pause and resume are conversation lifecycle operations: coordinate the running execution, inspect state and then resume rather than treating a pause request as rollback.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-openhands-pause-run-coordination/
Language: en

## Decide why execution needs to pause

An agent is editing a parser when the user discovers that the input contract differs from the initial request. The developer wants to inspect the partial patch before continuing. The [SDK pause guide](https://docs.openhands.dev/sdk/guides/convo-pause-and-resume) supports pausing a conversation and later resuming it without discarding state. This is useful for a coordinated intervention, rather than starting another run against the same files while the first still works.

## Coordinate with the active run

The documented example runs the conversation in a background thread, calls `pause()`, then joins that thread before its intervention. Keep that sequence meaningful in the host application. Requesting a pause and observing that the run has returned are different events. Avoid assuming an arbitrary delay proves the agent stopped. Use the available execution status and run completion signal to establish when the application's intervention can proceed.

## Inspect what already happened

A pause retains conversation state and does not imply that earlier file changes were undone. Inspect the current diff and any relevant check output before deciding what needs correction. Do not expand the pause contract into a guarantee about every external process or remote operation the agent may have started. If the task needs cancellation of a separate running operation, identify that operation and its own lifecycle rather than relying only on a conversation control.

## Resume through the appropriate interface

The SDK example sends revised instructions while paused and invokes `run()` again. The remote [pause endpoint](https://docs.openhands.dev/sdk/guides/agent-server/api-reference/conversations/pause-conversation) similarly describes later resumption, while the [run endpoint](https://docs.openhands.dev/sdk/guides/agent-server/api-reference/conversations/run-conversation) starts background execution. A successful run request therefore acknowledges starting the process; it is not proof that the new task completed before the response arrived. Monitor subsequent state and results.

## Make the intervention reviewable

State the corrected input contract and whether existing changes should be retained, revised or discarded through an explicit action. The [task-contract guide](/journal/learn-codex-task-contract/) clarifies the next outcome; [tool observations](/journal/learn-codex-tool-observation/) separate the pause request, paused state and resumed work. Preserve those transitions in the handoff. A controlled continuation depends on observed state and clear instructions, not on equating an inactive interface with a reverted repository.
