Skip to content

Configured Claude Code harness rejected before launch despite prior confirmation #4011

Closed

Description

@aheritier

Summary

A direct, user-authorized transfer to an agent configured with harness.type: claude-code is rejected before the harness launches:

cannot run external harness without a user prompt

The transfer used a deliberately restricted no-tool request. No Slack or MCP access occurred.

Expected behavior

After explicit authorization through the root user prompt, Docker Agent should either:

  1. launch the configured external harness; or
  2. surface the applicable launcher-specific confirmation mechanism so the user can approve or decline it.

If the root prompt is not the relevant confirmation channel, the runtime or documentation should state what is.

Actual behavior

The direct transfer is rejected before launching the configured Claude Code harness. An earlier interactive root confirmation did not satisfy the external-harness requirement.

Minimal reproduction

  1. Configure an agent with:
    harness:
      type: claude-code
  2. Obtain explicit user authorization for one direct, no-tool transfer to that agent.
  3. Transfer to the configured harness agent.
  4. Observe:
    cannot run external harness without a user prompt
    

Safety controls

  • The dispatched instruction prohibited all tool use: Slack/MCP, browser, filesystem, shell, network, auth, and handoffs.
  • The harness did not launch.
  • No Slack access, content, credentials, or external state were involved.

Additional observations

  • Static preflight recognized an authenticated Claude Code harness.
  • Dry-run initialization succeeded.
  • Local Claude Code and Slack MCP appeared ready.
  • The transfer was rejected before those components could be exercised.

Version / launcher ambiguity

Two distinct local components report different commits:

  • docker-agent development build: 547cd290…
  • docker agent plugin: v1.124.0, 7e498b…

Which component owns external-harness launch and confirmation behavior is unclear.

Questions

  • Is root-level interactive confirmation intended to authorize harness.type: claude-code transfers?
  • If not, where/how should Docker Agent present the required approval?
  • Which launcher/version should be used to reproduce and diagnose this behavior?

Activity

  1. self-assigned this
    on Aug 21, 2026
  2. added theissue type on Aug 21, 2026
  3. added
    area/runtime
    area/agent
    on Aug 21, 2026
  4. aheritier commented on Aug 21, 2026

    @aheritier
    CollaboratorAuthor

    🤖 Automated implementer agent — this comment was posted by the implementer bot from Docker Agentic Platform, not by a human developer

    A fix has been opened in PR #4012: #4012

    Root cause: PR #3989 changed harnessInputMessages to return only the latest non-implicit user message (for the harness-resume feature). However, transfer_task-built child sessions carry the task in the system message and only supply an implicit "Please proceed." as the user turn — which was filtered out, leaving an empty prompt and triggering the rejection guard.

    Fix: harnessInputMessages now branches on whether this is a fresh session or a resume:

    • Fresh session (harnessSessionID == ""): all system + user messages are used (including implicit ones), so the task content is always included in the prompt.
    • Resume (harnessSessionID != ""): only the latest non-implicit user turn is used — preserving the original intent of feat(runtime): resume external harness sessions #3989.

    A regression test (TestHarnessDelegatedTaskWithImplicitUserMessage) is included to prevent recurrence.

  5. aheritier commented on Aug 21, 2026

    @aheritier
    CollaboratorAuthor

    FYI @rumpl

  6. added a commit that references this issue on Aug 21, 2026
    718abaf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/agentarea/runtime

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions