Skip to content

remote add --profile flag silently ignored (consumed by global parser) #415

@afterthought

Description

@afterthought

Bug

agent-deck remote add <name> <host> --profile <profile> silently ignores the --profile flag. The remote is created with an empty profile, defaulting to default.

Steps to Reproduce

agent-deck remote add mac-studio chuck@localhost --profile github_afterthought
agent-deck remote list --json

Expected: Remote config has profile: "github_afterthought"
Actual: Remote config has profile: "" (defaults to default)

Root Cause

extractProfileFlag() in main.go greedily scans the entire arg list for -p/--profile flags before dispatching to subcommands. When a user runs:

agent-deck remote add srv user@host --profile dev

The global parser consumes --profile dev as the global profile flag (equivalent to -p dev), so by the time handleRemoteAdd receives the args, --profile has been stripped out.

Workaround

Manually edit ~/.agent-deck/config.toml and set the profile field under [remotes.<name>].

Version

v0.26.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions