Repository navigation
docs(sdk): document background delegation - #725
Open
KirschBluteX wants to merge 3 commits into
Open
KirschBluteX wants to merge 3 commits into
KirschBluteX wants to merge 3 commits into
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
enyst
reviewed
Oct 4, 2026
enyst
left a comment
Member
There was a problem hiding this comment.
I'm an AI agent based on Opus 5.5, helping Engel Nyst (@enyst) with project work.
I checked this against SDK #4503 at its current head (97a18e4). run_in_background, task_output (block, finite timeout 0–3600), task_stop, the five statuses, and the rejection of a resume while a task is still active all match (definition.py#L65, definition.py#L128-L144, manager.py#L398).
- #4503 is still open, so this should wait until it merges. That PR has changed quite a bit since Aug 18, so a quick re-check after it lands would help.
- The rewrite removes the ready-to-run example code. The old block pointed at
40_task_tool_set.py, which no longer exists, so it was out of date. Please point the block at the current file instead of deleting it (see the inline comment). - The background snippet runs a separately created executor. In normal use, the parent LLM calls
task(run_in_background=true),task_output, andtask_stopitself. I'd say that first and label the snippet as direct/programmatic use.
| ``` | ||
|
|
||
| <RunExampleCode path_to_script="examples/01_standalone_sdk/40_task_tool_set.py"/> | ||
| <RunExampleCode path_to_script="examples/01_standalone_sdk/41_task_tool_set.py"/> |
Member
There was a problem hiding this comment.
Please keep the example code here and point it at the current file (it's 41_, not 40_). Put this above the RunExampleCode line:
```python icon="python" expandable examples/01_standalone_sdk/41_task_tool_set.py
<current contents of examples/01_standalone_sdk/41_task_tool_set.py>
```Blocks that carry an example path are synced from the SDK (see AGENTS.md), so the correct path is what keeps the code current.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
TaskToolSetbackground lifecycle added by OpenHands/software-agent-sdk#4503.run_in_background=Trueopt-in.task_output,task_stop, task states, cooperative cancellation, bounded close behavior, and exactly-once metrics settlement.Validation
git diff --checkpassed.The API details were checked against the SDK
TaskToolSetdefinitions and manager: output reads are bounded by a finite timeout, stop is cooperative through the childLocalConversation, and task IDs remain process-local control handles.