Skip to content

[Bug]: agentscope-dataagent fails to start — builderBootstrap throws "requires a non-noop snapshotSpec" (default single-node run) #1600

Open

Description

@iuin8

Describe the bug

agentscope-examples/agents/agentscope-dataagent fails to start with its default, single-node configuration. The Spring context aborts while creating the builderBootstrap bean (DataAgentConfig): it builds every HarnessAgent with a DockerFilesystemSpec but never opts out of the distributed-sandbox validation, so HarnessAgent.Builder.build() runs validateDistributedSandboxConfig, which throws because DockerFilesystemSpec defaults to a NoopSnapshotSpec.

The process exits ~5s after Starting DataAgentApp, before the web server starts. This is a pure in-JVM bean-initialization validation that runs before any sandbox container is created, so it fails regardless of deployment method (plain java -jar, Docker Compose, …) and regardless of whether a Docker daemon is available (I reproduced it with a healthy Docker daemon present).

In effect, the module README quick-start ("4. Run: java -jar target/agentscope-dataagent-*-exec.jar") does not work as written.

To Reproduce

  1. Build the module:
    mvn -pl agentscope-examples/agents/agentscope-dataagent -am package -DskipTests
  2. Run the fat jar (no extra config required; presence/absence of a Docker daemon makes no difference):
    java -jar agentscope-examples/agents/agentscope-dataagent/target/agentscope-dataagent-2.0.0-SNAPSHOT-exec.jar
  3. Startup fails after a few seconds.

Expected behavior

The default single-node configuration should boot to a running web server on :8080 (as the README quick-start implies), or the module should ship a working default sandbox/snapshot configuration so a fresh checkout starts out of the box.

Error messages

ERROR --- [           main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
'webhookCallbackController' ...: Unsatisfied dependency expressed through constructor parameter 0:
Error creating bean with name 'builderBootstrap' defined in class path resource
[io/agentscope/dataagent/web/config/DataAgentConfig.class]: Factory method 'builderBootstrap' threw
exception with message: filesystem(SandboxFilesystemSpec) requires a non-noop snapshotSpec to
restore workspace archives across distributed instances. Configure one via
SandboxFilesystemSpec.snapshotSpec(...). For single-node use, opt out via
.sandboxDistributed(SandboxDistributedOptions.builder().requireDistributed(false).build()).
	at io.agentscope.dataagent.web.DataAgentApp.main(DataAgentApp.java:40)
...
Caused by: java.lang.IllegalStateException: filesystem(SandboxFilesystemSpec) requires a non-noop
snapshotSpec to restore workspace archives across distributed instances. ... For single-node use,
opt out via .sandboxDistributed(SandboxDistributedOptions.builder().requireDistributed(false).build()).
	at io.agentscope.harness.agent.HarnessAgentBuilderSupport.validateDistributedSandboxConfig(HarnessAgentBuilderSupport.java:180)
	at io.agentscope.harness.agent.HarnessAgent$Builder.build(HarnessAgent.java:1601)
	at io.agentscope.dataagent.runtime.DataAgentBootstrap$Builder.build(DataAgentBootstrap.java:613)
	at io.agentscope.dataagent.web.config.DataAgentConfig.builderBootstrap(DataAgentConfig.java:214)
	...

Environment (please complete the following information):

  • AgentScope-Java Version: 2.0.0-RC1 (also reproduces on current main; the agentscope-dataagent module is identical between the v2.0.0-RC1 tag and main — verified with git diff v2.0.0-RC1 HEAD -- agentscope-examples/agents/agentscope-dataagent, no differences)
  • Java Version: 17 (Amazon Corretto 17.0.15)
  • OS: macOS (arm64)

Additional context

Root-cause chain:

  • DataAgentConfig#builderBootstrap configures every agent with
    new DockerFilesystemSpec().client(sandboxClient).isolationScope(IsolationScope.USER)
    (DataAgentConfig.java:208-211) but never calls .sandboxDistributed(...) nor .snapshotSpec(...).
  • DockerFilesystemSpec defaults snapshotSpec to new NoopSnapshotSpec() (DockerFilesystemSpec.java:35).
  • In HarnessAgent.Builder.build() the validation is skipped only when
    sandboxDistributedOptions != null && !requireDistributed (HarnessAgent.java:1597-1603).
    Since sandboxDistributed(...) is never set, the validation runs and
    validateDistributedSandboxConfig throws on the NoopSnapshotSpec
    (HarnessAgentBuilderSupport.java:177-187).

Suggested fix (matching the exception's own guidance) — for the single-node default, opt out in DataAgentConfig#builderBootstrap:

b.filesystem(new DockerFilesystemSpec().client(sandboxClient).isolationScope(IsolationScope.USER));
b.sandboxDistributed(SandboxDistributedOptions.builder().requireDistributed(false).build());

or configure a non-noop snapshotSpec. (For distributed/HA deployments a real snapshot spec + distributed Session would still be required.)

Possibly related: the module's three full-context @SpringBootTest classes — MarketContributionServiceTest, H2DemoSeedTest, JpaPersistenceIntegrationTest — are currently @Disabled("Pending fix for circular dependency between builderBootstrap and userSandboxRegistry"), so this startup path is not covered by an enabled test. I have not verified whether that circular-dependency issue surfaces after applying the requireDistributed(false) opt-out; it may be a second, related blocker.

A further, separate note for single-container deployments: even once startup is fixed, each per-user workspace is backed by a live Docker sandbox via the default DockerSandboxClient (DataAgentWorkspaceConfig#sandboxClient), so a single container would additionally need access to a Docker daemon (e.g. a mounted /var/run/docker.sock + the docker CLI) — or a non-Docker SandboxClient bean — for the chat/workspace path to work. Happy to open that as a separate issue if useful.

Activity

  1. iuin8 commented on Jun 5, 2026

    @iuin8
    Author

    Update: verified the fix, and found a second startup blocker right behind it

    I applied the suggested opt-out and traced startup to completion. The default single-node config needs two changes to boot; with both, the app starts cleanly and serves traffic.

    1. requireDistributed(false) opt-out (this issue) — in DataAgentConfig#builderBootstrap, after the filesystem(...) call:

    b.filesystem(new DockerFilesystemSpec().client(sandboxClient).isolationScope(IsolationScope.USER));
    b.sandboxDistributed(SandboxDistributedOptions.builder().requireDistributed(false).build());

    This clears the NoopSnapshotSpec IllegalStateException.

    2. Second blocker, surfaced once #1 is fixed: a missing Jackson 2 ObjectMapper bean. The context then fails on:

    APPLICATION FAILED TO START
    Parameter 3 of constructor in io.agentscope.dataagent.web.marketplace.MarketContributionService
    required a bean of type 'com.fasterxml.jackson.databind.ObjectMapper' that could not be found.
    

    MarketContributionService injects a Jackson 2 com.fasterxml.jackson.databind.ObjectMapper, but under Spring Boot 4 the auto-configured mapper is Jackson 3 (tools.jackson...), so the classic Jackson 2 type is no longer registered as a bean. (Every other class in the module sidesteps this with a local new ObjectMapper().) Fix — define it explicitly, e.g. in a @Configuration:

    @Bean
    @ConditionalOnMissingBean
    public ObjectMapper objectMapper() {
        return new ObjectMapper();
    }

    3. The @Disabled circular dependency did NOT block the running app. With both fixes, the production fat jar (java -jar ...-exec.jar) reaches Started DataAgentApp, Netty on :8080, and /actuator/health returns UP. The builderBootstrap ↔ userSandboxRegistry "circular dependency" cited in the three @Disabled @SpringBootTests appears specific to the test context, not the live app.

    Verified end-to-end (JDK 17, built from v2.0.0-RC1; the agentscope-dataagent module is identical on main): login works, chat/send returns a DashScope model reply, and per-user Docker sandbox containers (ubuntu:22.04) start as expected.

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/examplesagentscope-examplesbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions