Skip to content

[Bug]: Sandbox prompt references non-existent upload/download tools — agents lack an artifact delivery tool #2663

Closed

Description

@chcodex

Is your feature request related to a problem? Please describe.

In sandbox mode, WorkspaceContextMiddleware renders a ## Workspace paragraph that
instructs the model to "use the upload/download tools to move files across the
boundary" (WorkspaceContextMiddleware.java, sandbox branch). However, the harness
exposes no upload/download AgentTool to the model at all:

  • FilesystemTool registers only read_file, write_file, edit_file,
    grep_files, glob_files, list_files.
  • File transfer into/out of the sandbox (SandboxFileTransfer, base64-via-exec) is
    an internal mechanism, invisible to the LLM.

So the instruction is a dead reference: the model is told to use tools that do not
exist, and any artifact it produces inside the sandbox has no supported way to leave
it.

Describe the solution you'd like

My view: the agent does not actually need a generic upload/download tool. What is
missing is an artifact delivery tool — a first-class tool that takes a file
produced in the sandbox workspace and explicitly delivers it to a destination
outside the sandbox (e.g. the host, or a project's artifact store).

Concretely:

  • An SPI interface such as ArtifactDeliveryTarget
    (deliver(RuntimeContext, ArtifactDeliveryRequest) -> ArtifactDeliveryResult)
    so the framework stays business-agnostic and the destination logic (e.g. WebDAV
    upload) is implemented by the application.
  • A generic deliver_artifact tool in the harness (same style as FilesystemTool,
    @Tool-annotated), which downloads the file from the sandbox filesystem and
    delegates delivery to the configured target.
  • Update the sandbox branch of buildWorkspaceParagraph to reference the actual
    tool name instead of the non-existent "upload/download tools".

Additional context

Deployment scenario: a sandboxed agent that produces reports/documents and must hand
them off to a project's artifact store (e.g. WebDAV). Currently there is no
supported path for this.

Activity

  1. chcodex commented on Aug 11, 2026

    @chcodex
    ContributorAuthor
  2. changed the title [-][Feature]: Sandbox prompt references non-existent upload/download tools — agents need an artifact delivery tool instead[/-] [+][Bug]: Sandbox prompt references non-existent upload/download tools — agents lack an artifact delivery tool[/+] on Aug 11, 2026
  3. dargoner commented on Aug 11, 2026

    @dargoner
    Contributor

    我也遇到了,比如要沙箱里面,脚本已经生成的文件或者生成文档,需要智能体根据要求,能上传到对象OSS存储服务里

  4. Buktal commented on Aug 11, 2026

    @Buktal
    Collaborator

    我也遇到了,比如要沙箱里面,脚本已经生成的文件或者生成文档,需要智能体根据要求,能上传到对象OSS存储服务里

    目前我的方案也是提供@tool,由Agent上传到云存储

  5. chcodex commented on Aug 11, 2026

    @chcodex
    ContributorAuthor

    我也遇到了,比如要沙箱里面,脚本已经生成的文件或者生成文档,需要智能体根据要求,能上传到对象OSS存储服务里

    目前我的方案也是提供@tool,由Agent上传到云存储

    没问题,但是框架层面必须与具体业务解耦

  6. added
    bug
    area/extensions
    area/harness
    on Aug 11, 2026
  7. moved this from Backlog to In progress in AgentScope Javaon Aug 11, 2026
  8. chcodex commented on Aug 11, 2026

    @chcodex
    ContributorAuthor
  9. moved this from In progress to Done in AgentScope Javaon Sep 2, 2026
  10. added a commit that references this issue on Sep 2, 2026
    d25d4e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/extensionsarea/harnessbug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions