Skip to content

exec without explicit VM ID fails to resolve HEAD #175

@AlephNotation

Description

@AlephNotation

Bug

When using vers exec without an explicit VM ID (relying on HEAD), the first argument of the command gets parsed as a VM ID, causing a UUID parse error.

Repro

$ vers head
7ab376e8-9c15-4109-abd2-e14abe460429

$ vers exec echo hello
Error: exec: API error 400: Invalid URL: Cannot parse `vm_id` with value `echo`: UUID parsing failed...

$ vers exec -- echo hello    # also fails the same way

$ vers execute 7ab376e8-9c15-4109-abd2-e14abe460429 echo hello   # works
hello

Expected

When HEAD is set, vers exec <command> [args...] should use the HEAD VM, same as pause, resume, info, etc. The CLI should check whether the first positional arg is a valid UUID before treating it as a VM ID.

Impact

This is especially painful for agents/scripts — every exec call requires a preceding vers head call to get the VM ID, defeating the purpose of HEAD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions