Skip to content

Script tool args with type: number are interpolated as %s #2169

@dvdksn

Description

@dvdksn

Describe the bug

Script tool args with type: number are interpolated using %s verb, producing %!s(float64=42) instead of 42 in shell commands.

Version affected

docker-agent version v1.33.0

How To Reproduce

# agent.yml
agents:
  root:
    model: sonnet
    description: Minimal reproducer for number arg interpolation bug
    instruction: |
      Run echo_number with num set to 42.
    toolsets:
      - type: script
        shell:
          echo_number:
            cmd: echo "$num"
            description: Echoes a number
            args:
              num:
                type: number
                description: A number
            required: [num]
    commands:
      run: Run echo_number with num=$1.

models:
  sonnet:
    provider: anthropic
    model: claude-sonnet-4-5
$ docker agent run --yolo --exec ./agent.yml 42

--- Agent: root ---

Calling echo_number(num: 42)

echo_number response → "%!s(float64=42)\n"

Additional context

Workaround: use type: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions