Repository navigation
fix(runtime): scope harness prompt-selection to fresh vs resume session - #4012
Merged
Merged
Conversation
Fixes #4011. PR #3989 (commit 992c8c0) changed harnessInputMessages to return only the latest non-implicit user message. This is correct for resume turns, where the harness already holds prior context. But transfer_task builds sub-sessions where the task lives in the system message and the only user message is the implicit 'Please proceed.' filler (Implicit=true). With the old guard that filler was filtered out, harnessInputMessages returned nil, prompt was empty, and the run was rejected with 'cannot run external harness without a user prompt' before the harness launched. Fix: gate the prompt-building strategy on whether a harness session already exists: - Fresh session (harnessSessionID == ""): collect all system and user messages (including implicit) from the session snapshot so the task/system content reaches the harness. A bare implicit filler with no system/task still returns nil, keeping the empty-prompt guard for that genuinely degenerate case. - Resume (harnessSessionID != ""): keep sending only the latest non-implicit user turn. Preserves #3989's intent for multi-turn harness sessions. harnessPrompt is updated to concatenate content from all supplied messages (system and user) rather than returning only the last user message, so the task text from the system message is included in the harness prompt on fresh sessions. Add TestHarnessDelegatedTaskWithImplicitUserMessage as a regression test.
aheritier
marked this pull request as ready for review
August 21, 2026 14:56
aheritier
enabled auto-merge
August 21, 2026 15:00
oliver-hohn
approved these changes
Aug 21, 2026
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
docker-agent 1.127.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>This release delivers Desktop PAC-aware egress with SSRF protections, several runtime and toolset fixes, and documentation updates for served-agent safety controls. ## What's New - Adds Desktop PAC-aware egress for configured HTTP clients while preserving standalone proxy behavior and SSRF protections, covering agent/source fetches, sessions, tools, MCP HTTP transports, and MCP OAuth flows ## Bug Fixes - Fixes slow toolset startup from blocking conversation turns; keeps turns responsive when a toolset start is already in progress or exceeds the start budget - Fixes `on_user_input` notifications firing incorrectly for sub-sessions, background agents, non-interactive runs, and canceled max-iteration waits — now only fires when an interactive root session is genuinely waiting for the next prompt - Fixes Desktop PAC transport detection, routing, and state retention across multiple egress and transport handling regressions - Fixes server to distinguish unavailable agent sources ## Technical Changes - Extends Windows streaming TUI test timeouts to 30 seconds for simulated-stream scenarios - Updates CLI reference documentation for `serve a2a` safety flags (`--auth-token`, `--cors-origin`, `--insecure-no-auth`, `--safety`) - Adds documentation describing Desktop PAC egress controls and clarifying coverage for MCP OAuth and direct egress - Makes Desktop transport tests hermetic --- ## What's Changed * docs: update CHANGELOG.md for v1.126.0 by @docker-read-write[bot] in docker/docker-agent#4002 * docs: complete CLI reference for serve a2a safety flags by @aheritier in docker/docker-agent#4003 * test(e2e): extend Windows streaming TUI timeouts by @Sayt-0 in docker/docker-agent#4005 * fix: add Desktop PAC-aware egress with SSRF protections by @aheritier in docker/docker-agent#3999 * fix(runtime): avoid false on_user_input notifications by @Sayt-0 in docker/docker-agent#4010 * fix(tools): prevent slow startup from blocking turns by @Sayt-0 in docker/docker-agent#4009 * fix(runtime): scope harness prompt-selection to fresh vs resume session by @aheritier in docker/docker-agent#4012 **Full Changelog**: docker/docker-agent@v1.126.0...v1.127.0 </pre> <p>View the full release notes at <a href="https://github.com/docker/docker-agent/releases/tag/v1.127.0">https://github.com/docker/docker-agent/releases/tag/v1.127.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!17388
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.
Fixes #4011.
PR #3989 changed
harnessInputMessagesto return only the latest non-implicit user turn for all sessions. This is correct for resume turns, but breakstransfer_taskdelegations where the task lives in the system message and the only user message is the implicit"Please proceed."filler — yielding an empty prompt and the errorcannot run external harness without a user prompt.Fix: gate prompt-building on whether a harness session already exists:
harnessSessionID == ""):freshHarnessMessagescollects all system and user messages including implicit ones, so the task/system content reaches the harness. A bare implicit filler with no system/task still returnsnil, keeping the empty-prompt guard for that degenerate case.harnessSessionID != ""):latestUserTurnsends only the latest non-implicit user turn. Preserves feat(runtime): resume external harness sessions #3989's intent.harnessPromptis updated to concatenate content from all supplied messages (system + user) so task text from the system message is included in the prompt on fresh sessions.Testing: all existing harness tests pass; added
TestHarnessDelegatedTaskWithImplicitUserMessageas a regression test that mirrors whatnewSubSessionbuilds for atransfer_taskdelegation.