Repository navigation
docs: auto-update for merged PRs (2026-11-03) - #4798
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly implies hook errors stop the child task, but worktree_create defaults to warning and allows execution to continue unless a blocking policy or verdict is used.
1 open issue
What changed in this PR
Updates the hook documentation to reflect background-agent worktree support introduced in #4776. This PR changes documentation only.
Changes:
- Adds isolated background tasks to the
worktree_createevent description. - Documents hook inputs, execution ordering, context delivery, and task failure behavior.
| File | Description |
|---|---|
docs/configuration/hooks/index.md |
Expands worktree_create documentation to cover background tasks using worktree: true. |
Review effort: Balanced
| ``` | ||
|
|
||
| Unlike most events, `worktree_create` is dispatched from the CLI rather than the run loop, because the worktree (and the working directory the runtime, session, tools, and snapshot machinery all capture) must be settled before the runtime and session exist. See [`examples/worktree_create_hook.yaml`](https://github.com/docker/docker-agent/blob/main/examples/worktree_create_hook.yaml) for the full file. | ||
| `worktree_create` also fires when `run_background_agent` is called with `worktree: true`. Hooks run inside the task's new checkout with `agent_name` and `parent_session_id` set, before the child's toolsets and skills are loaded. Their additional context is added to the child's instructions, and a blocking decision (or error) fails the task; the checkout and branch are retained. |
trungutt
approved these changes
Nov 3, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 3, 2026
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.

Documentation updates for recently merged changes.
docs/configuration/hooks/index.md: theworktree_createhook now fires for background agent tasks started withworktree: true, not onlydocker agent run --worktree. Updated the event table, context note, and the Worktree-Create section (input fields, ordering, context goes to the child's instructions, blocking fails the task).Other PRs merged in the last 25h (#4795 TypeScript SDK, #4791, #4794, #4792, #4789) need no further docs; #4776's and #4795's own docs changes were already included in those PRs.
References: #4776