Skip to content

fix: aid <workspace> goes straight to the prompt editor again - #666

Merged
blooop merged 5 commits into
mainfrom
fix/aid-pickers-bare-only
Oct 1, 2026
Merged

blooop merged 5 commits into
mainfrom
fix/aid-pickers-bare-only

Conversation

@blooop

@blooop blooop commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

0.59.0 (#662) put the agent, model and effort pickers in front of every promptless aid launch on a terminal. So aid owner/repo asked three questions before you could type the prompt.

Now only a line that names no workspace gets the pickers: a bare aid, or flags alone like aid --codex. That is the line that already went through dl's workspace picker. A line that names its workspace goes straight to the prompt editor and starts the agent on its defaults plus whatever flags the line gave, as 0.58.0 did. The pasting fixes from #662 stay.

How it works: run() knows which arm produced the line. Only the NoWorkspace arm, after dl::pick_workspace(), passes Pickers::Ask to collect_prompt(); every other arm passes Pickers::Skip, and settle() runs only under Ask. aid <ws> also never reads or writes aid-recent.tsv, so a model a bare aid remembered does not leak into it.

Tests (rust/aid/tests/interactive.rs, on a real pty):

  • a_named_workspace_goes_straight_to_the_editor_with_no_picker is new and failed before the fix.
  • a_choice_a_bare_aid_remembered_stays_out_of_aid_workspace is new.
  • The picker tests now start from a bare aid and take the workspace picker first. The editor tests drop their picker answers. The Esc-in-a-picker test uses a --stopped world so the boot still has an up to block on.

Docs: help text, README, docs/cli.md, CHANGELOG, plus two comments the change made false (one in the e2e test, which loses a picker branch that can no longer run).

Checked locally: cargo test -p aid, clippy, fmt, prek, and the non-e2e pytest suite all pass. Five pushed-by-URL lifecycle tests (four in devlaunch-core, one in dl/tests/lifecycle.rs) fail on this host on origin/main too, so they are not from this branch.

🤖 Generated with Claude Code

Summary by Sourcery

Restore the pre-0.59.0 interactive flow so explicitly targeted workspaces open directly in the prompt editor, while workspace-less launches retain the selection pickers.

Bug Fixes:

  • Restore direct prompt-editor access for aid commands that explicitly name a workspace, avoiding the agent, model, and effort pickers.
  • Prevent remembered picker choices from affecting launches that explicitly specify a workspace.

Enhancements:

  • Restrict the interactive agent, model, and effort pickers to workspace-less terminal launches while preserving workspace selection for bare aid commands.

Build:

  • Bump the project version to 0.59.1.

Documentation:

  • Update the changelog, README, and CLI documentation to describe the revised picker behavior and version.

Tests:

  • Add PTY coverage for direct editor access with named workspaces and isolation from remembered picker choices.
  • Update interactive tests to select a workspace before exercising picker behavior.

blooop added 4 commits October 1, 2026 11:18
0.59.0 (#662) put the agent, model and effort pickers in front of every
promptless launch on a terminal, so `aid owner/repo` asked three
questions before the prompt. The pickers now run only for a line that
names no workspace (a bare `aid`, or flags alone such as `aid --codex`),
which is the line that already went through dl's workspace picker. A
line that names its workspace gets the editor alone and the agent's
defaults, as 0.58.0 did.

The picker tests move to the bare form and take the workspace picker
first; the editor tests drop the picker answers.
The e2e test drives `aid <workspace>`, which now reaches the prompt
editor with no picker, so its picker-answering branch could never run.
Expect the editor directly and drop the unused `time` import. The
take_the_defaults doc in the pty tests said every launch meets the
pickers; only a line with no workspace does.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @blooop, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 8 hours and 10 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Reviewer's Guide

Restores the pre-0.59 behavior for named-workspace launches: only workspace-less interactive commands show the agent, model, and effort pickers, while named workspaces go directly to the prompt editor with defaults and line-provided flags. The implementation tracks the argument-parsing path through run() into prompt collection, adds PTY regressions for picker bypass and recent-choice isolation, and updates documentation and e2e expectations.

Sequence diagram for named-workspace prompt launch

sequenceDiagram
    participant User
    participant aid as aid.run
    participant Parser as rewrite.parse_aid_args
    participant Prompt as interactive.collect_prompt
    participant Editor as dl.read_prompt
    participant Agent

    User->>aid: aid workspace
    aid->>Parser: parse_aid_args
    Parser-->>aid: Line.Ready
    aid->>Prompt: collect_prompt(Pickers.Skip)
    Prompt->>Editor: read_prompt
    Editor-->>Prompt: prompt
    Prompt->>Agent: launch with defaults and line flags
Loading

Sequence diagram for workspace-less picker launch

sequenceDiagram
    participant User
    participant aid as aid.run
    participant Parser as rewrite.parse_aid_args
    participant Workspace as dl.pick_workspace
    participant Prompt as interactive.collect_prompt
    participant Pickers as settle
    participant Editor as dl.read_prompt

    User->>aid: aid or aid --codex
    aid->>Parser: parse_aid_args
    Parser-->>aid: UsageError.NoWorkspace
    aid->>Workspace: pick_workspace
    Workspace-->>aid: workspace_id
    aid->>Prompt: collect_prompt(Pickers.Ask)
    Prompt->>Pickers: settle
    Pickers-->>Prompt: selected settings
    Prompt->>Editor: read_prompt
Loading

Flow diagram for interactive aid picker selection

flowchart TD
    A[aid command line] --> B{parse_aid_args}
    B -->|Ready: workspace named| C[Pickers.Skip]
    B -->|NoWorkspace| D[dl.pick_workspace]
    D --> E[Pickers.Ask]
    C --> F[collect_prompt]
    E --> F
    F -->|Skip| G[Prompt editor]
    F -->|Ask| H[settle]
    H --> G
    G --> I[Start agent]
Loading

File-Level Changes

Change Details Files
Gate the interactive agent/model/effort pickers on whether the command entered through the no-workspace flow.
  • Introduce a Pickers mode passed from argument parsing into prompt collection.
  • Use Ask only after selecting a workspace for a workspace-less command; skip settle() for named-workspace and already-resolved commands.
  • Preserve default agent settings for aid <workspace> and prevent picker state from affecting that launch.
rust/aid/src/main.rs
rust/aid/src/interactive.rs
Update interactive PTY coverage to reflect the revised launch paths and state isolation.
  • Add regression coverage for named workspaces bypassing pickers and bare-aid choices not leaking into named-workspace launches.
  • Route picker-focused tests through the workspace picker and simplify named-workspace editor tests.
  • Adjust the Esc picker scenario to use a stopped workspace whose boot remains observable.
rust/aid/tests/interactive.rs
Align user-facing documentation and end-to-end test behavior with the new picker rules.
  • Document that bare aid or flags-only commands pick a workspace and then show configuration pickers.
  • Document that aid <workspace> opens the prompt editor directly using defaults and supplied flags.
  • Remove obsolete e2e picker handling and update comments describing the named-workspace flow.
README.md
docs/cli.md
CHANGELOG.md
test/e2e/test_interactive_session.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

All four copies of the version move together: Cargo.toml, Cargo.lock,
and the README conda badge and dl --version transcript.
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.52941% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.42%. Comparing base (5471bb6) to head (48d1d49).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
rust/aid/src/main.rs 30.00% 7 Missing ⚠️
rust/aid/src/interactive.rs 14.28% 6 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
python 42.98% <ø> (ø)
rust 94.64% <23.52%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
shipped code (rust) 94.64% <23.52%> (-0.02%) ⬇️
harness and tooling (python) 42.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blooop
blooop merged commit db5fec1 into main Oct 1, 2026
15 checks passed
@blooop
blooop deleted the fix/aid-pickers-bare-only branch October 1, 2026 10:43
@blooop blooop mentioned this pull request Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant