Skip to content

[BUG] run_command tool call produces undefined as command argument (glm-5.2 model) #205

Description

@maxwell-feng

▎ ┃ ▼ Thought · 0.0s
▎ ┃ (run_command missing arguments — model bug)
▎ $ undefined
▎ /bin/sh: 1: undefined: not found
▎ This repeats multiple times as the model fails to self-correct.

▎ Steps to Reproduce

▎ 1. Use supercode with glm-5.2 model
▎ 2. Trigger a scenario where the model attempts to run a command
▎ 3. Observe undefined being passed as the command

▎ Expected Behavior

▎ The tool should validate that required arguments are present before executing. If the model fails to provide arguments, supercode should either retry or show a clear error
▎ message rather than executing undefined in the shell.

▎ Suggested Fix

▎ - Add argument validation for run_command before shell execution
▎ - If a required argument is missing/undefined, reject the tool call and return an error to the model so it can retry
▎ - Optionally: block undefined from being executed as a shell command

▎ Environment

▎ - supercode version: 0.1.65
▎ - Model: glm-5.2
▎ - OS: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions