Skip to content

Add per-launch agent, model, and yolo overrides for open and new#299

Merged
jongio merged 3 commits into
mainfrom
idea/open-new-launch-overrides
Jul 14, 2026
Merged

Add per-launch agent, model, and yolo overrides for open and new#299
jongio merged 3 commits into
mainfrom
idea/open-new-launch-overrides

Conversation

@jongio

@jongio jongio commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Closes #294

Summary

Adds --agent, --model, and --yolo flags to the open and new subcommands so a single launch can override the saved config values without editing config first.

  • --agent <name> and --model <name> accept both --flag value and --flag=value forms.
  • --yolo enables yolo mode for the launch; --yolo=true / --yolo=false set it explicitly.
  • Overrides are applied to the freshly loaded config before the resume command is built, so they reach every launch mode (inplace, tab, window, pane) and --print. They are never written back to the config file.

Shell completion (bash, zsh, fish, powershell), dispatch help, and the README document the new flags.

Verification

  • go build ./...
  • go test ./...
  • go vet ./...
  • golangci-lint run (0 issues)
  • mage deadcode (OK)

New tests cover flag parsing for both subcommands, the apply step, and an end-to-end open --print run confirming the overrides reach the resume config. This change also fixes a latent deadlock in TestPrintUsage_Output, which drained its stdout pipe only after printUsage returned; the longer usage text passed the Windows pipe buffer size, so the test now drains the pipe from a goroutine.

Add --agent, --model, and --yolo flags to the open and new subcommands so a
single launch can override the saved config values without editing config
first. The overrides apply to every launch mode and to --print, and are never
written back to the config file.

Also fix a latent deadlock in TestPrintUsage_Output. It wrote printUsage
output to an os.Pipe and only drained it after the call returned, which blocks
once the text passes the Windows pipe buffer size. The new usage lines pushed
it over that limit, so the test now drains the pipe from a goroutine.

Closes #294

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 12, 2026
@jongio jongio self-assigned this Jul 12, 2026
jongio added 2 commits July 14, 2026 06:06
…overrides

# Conflicts:
#	cmd/dispatch/cli.go
#	cmd/dispatch/main.go
#	cmd/dispatch/open.go
#	cmd/dispatch/open_test.go
@jongio jongio merged commit a934443 into main Jul 14, 2026
1 of 2 checks passed
@jongio jongio deleted the idea/open-new-launch-overrides branch July 14, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add per-launch agent, model, and yolo overrides to open and new

1 participant