Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: docker/docker-agent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.47.0
Choose a base ref
...
head repository: docker/docker-agent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.48.0
Choose a head ref
  • 12 commits
  • 25 files changed
  • 4 contributors

Commits on Apr 20, 2026

  1. Don't retry SQLITE_CANTOPEN (14) errors

    Signed-off-by: David Gageot <david.gageot@docker.com>
    dgageot committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    1c0996d View commit details
    Browse the repository at this point in the history
  2. docs: update CHANGELOG.md for v1.47.0

    Automated changelog update for release v1.47.0
    
    Assisted-By: Docker Agent
    github-actions[bot] committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    f220a54 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2468 from docker/changelog/v1.47.0

    docs: update CHANGELOG.md for v1.47.0
    dgageot authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    f131051 View commit details
    Browse the repository at this point in the history
  4. feat: add optional working_dir to MCP and LSP toolset configs

    - Add WorkingDir field to Toolset struct (pkg/config/latest/types.go)
    - Validate that working_dir is only used with type 'mcp' or 'lsp'
    - Resolve working_dir relative to agent's working directory at process start
    - Propagate working_dir from top-level mcps: definitions to agent toolsets
    - Add resolveToolsetWorkingDir helper in registry.go
    - Add tests: validate_test.go, mcps_test.go, registry_test.go
    - Add example: examples/toolset-working-dir.yaml
    - Update agent-schema.json for Toolset and MCPToolset
    
    Closes #2459
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    3ec5627 View commit details
    Browse the repository at this point in the history
  5. fix: address reviewer feedback on working_dir feature

    B1: pass resolved CWD to NewGatewayToolset; gateway-based MCPs now
    honour working_dir. Remote MCP toolsets reject working_dir at
    validation time (no local subprocess).
    
    B2: call path.ExpandPath in resolveToolsetWorkingDir so ~ and
    ${VAR}/$VAR are expanded before path operations. Use filepath.Abs
    when joining a relative path with the agent dir (fixes file://./backend
    LSP root URI).
    
    S1: add checkDirExists helper; createMCPTool and createLSPTool now
    surface a clear error if working_dir does not exist at tool-creation
    time.
    
    S2: doc comment on resolveToolsetWorkingDir explains no-containment-
    check posture (working_dir is treated like command/args).
    
    S3: filepath.Abs on relative+non-empty-agentDir path ensures LSP
    rootURI is always absolute.
    
    S4: validation rejects working_dir on remote MCP toolsets.
    
    S5: comment in applyMCPDefaults explains empty-string inheritance
    semantics.
    
    S6: doc comment covers the empty-agent-dir+relative edge case.
    
    Nits: example model → gpt-5-mini; test name → 'bare relative dir';
    schema descriptions aligned; import groups tidied; hard-coded
    non-existent path in test → t.TempDir()+'/missing'.
    
    N5: integration tests added:
    - TestCreateMCPTool_WorkingDir_ReachesSubprocess
    - TestCreateMCPTool_RelativeWorkingDir_ResolvedAgainstAgentDir
    - TestCreateMCPTool_NonexistentWorkingDir_ReturnsError
    - TestCreateLSPTool_WorkingDir_ReachesHandler
    
    Also add WorkingDir() accessors on *mcp.Toolset and *builtin.LSPTool
    to support the above integration tests.
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    67baf03 View commit details
    Browse the repository at this point in the history
  6. fix: use filepath.Join with separate segments to satisfy gocritic fil…

    …epathJoin lint rule
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    293e359 View commit details
    Browse the repository at this point in the history
  7. fix: return explicit error when ref-based MCP resolves to remote serv…

    …er with working_dir
    
    When a toolset uses ref: to point to a catalog entry that resolves to a
    remote server at runtime, working_dir cannot be validated at config-parse
    time (the transport type is only known after the catalog API call). The
    previous code silently discarded working_dir in this case.
    
    - Fix the misleading comment in createMCPTool that claimed the remote
      branch was unreachable due to validation; ref-based MCPs are not
      blocked at validation time.
    - Defer the checkDirExists call for ref-based toolsets until after the
      server spec is resolved (avoids unnecessary work for remote refs).
    - Return a clear error when serverSpec.Type == "remote" and
      working_dir is set, instead of silently discarding the field.
    - Update the Remote.URL branch comment to accurately describe what it
      does and does not cover.
    - Add gateway.OverrideCatalogForTesting helper so teamloader tests can
      seed a fake catalog without a live network call.
    - Add TestMain in pkg/teamloader that seeds remote and local catalog
      entries for use by tests.
    - Add TestCreateMCPTool_RefRemote_WorkingDir_ReturnsError and
      TestCreateMCPTool_RefRemote_NoWorkingDir_Succeeds.
    
    Closes #2461
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    d610013 View commit details
    Browse the repository at this point in the history
  8. docs: document working_dir field for MCP and LSP toolsets

    - docs/tools/lsp/index.md: add working_dir to Properties table;
      extend the Go/gopls example to show the monorepo subdirectory use-case
    - docs/configuration/tools/index.md: add working_dir to both the
      Local MCP (stdio) and Docker MCP (ref) property tables
    - CHANGELOG.md: add Unreleased section noting the new field
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    c6bc325 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #2460 from simonferquel-clanker/feat/toolset-worki…

    …ng-dir
    
    feat: add optional working_dir to MCP and LSP toolset configs
    simonferquel authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    15945f4 View commit details
    Browse the repository at this point in the history
  10. fix(#2457): retry MCP toolsets after tool calls within the same turn

    When an MCP server is configured but unavailable at session start, the
    agent now retries automatically after every tool-call batch — within the
    same user turn — without requiring a new user message.
    
    ## Core changes
    
    ### MCP double-watcher race (pkg/tools/mcp/mcp.go)
    Added watcherAlive bool to Toolset. Toolset.Start() only spawns
    go watchConnection(...) when !watcherAlive. The goroutine clears the
    flag on all exit paths via defer. This prevents reprobe() from spawning
    a second watcher while an existing one is mid-backoff (ts.started==false
    but goroutine alive), which would cause racing doStart() calls and unsafe
    close/recreate of ts.restarted.
    
    ### Failure deduplication + recovery notices (pkg/tools/startable.go)
    ShouldReportFailure() returns true exactly once per failure streak,
    suppressing repeated 'start failed' warnings on every retry.
    ConsumeRecovery() returns true exactly once when a previously-failed
    toolset successfully starts, triggering a 'now available' warning.
    Both surface via WarningEvent -> notification.WarningCmd() (persistent
    TUI notifications that stay until dismissed).
    
    ### Reprobe after each tool-call batch (pkg/runtime/loop.go)
    reprobe() is called after every tool-call batch. It re-runs
    ensureToolSetsAreStarted() without emitting MCPInitStarted/Finished
    events (no TUI spinner flicker), emits any pending warnings, and emits
    a ToolsetInfo event when new tools appear. The updated tool list is
    picked up by the top-of-loop getTools() on the next iteration, so the
    model sees new tools in its very next response within the same user turn.
    
    ### TUI (pkg/agent/agent.go, pkg/runtime/loop.go, pkg/runtime/event.go)
    DrainWarnings() now includes both failure and recovery messages.
    WarningEvent used for all toolset lifecycle notifications.
    
    ## Tests
    - pkg/tools/startable_test.go: ShouldReportFailure/ConsumeRecovery
      behaviour (one warning per streak, recovery fires once, Stop resets)
    - pkg/agent/agent_test.go: TestAgentReProbeEmitsWarningThenNotice,
      TestAgentNoDuplicateStartWarnings
    - pkg/runtime/runtime_test.go: TestReprobe_NewToolsAvailableAfterToolCall,
      TestReprobe_NoChangeMeansNoExtraEvents
    
    Fixes #2457
    
    Assisted-By: docker-agent
    simonferquel-clanker committed Apr 20, 2026
    Configuration menu
    Copy the full SHA
    0176f95 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #2466 from dgageot/dont-retry

    Don't retry SQLITE_CANTOPEN (14) errors
    dgageot authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    de2499b View commit details
    Browse the repository at this point in the history
  12. Merge pull request #2458 from simonferquel-clanker/fix/retry-missing-…

    …lsp-mcp-2457
    
    fix: retry LSP/MCP toolsets after tool calls, covering env-wrapped commands (fixes #2457)
    simonferquel authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    f41413d View commit details
    Browse the repository at this point in the history
Loading