Skip to content

feat: aid resume, and release 0.57.0 - #646

Merged
blooop merged 9 commits into
mainfrom
resume1
Sep 28, 2026
Merged

blooop merged 9 commits into
mainfrom
resume1

Conversation

@blooop

@blooop blooop commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

After a machine restart, getting back into an agent session took two steps: open the workspace, then start the agent with its resume flag by hand. aid resume does both in one command.

aid resume                      # pick a workspace, then pick a session in it
aid resume owner/repo@branch    # skip the workspace picker

With no workspace, aid opens dl's own picker. It then starts the agent the way a fresh aid launch does (full auto, Remote Control named after the workspace id), with the agent's resume words where the prompt would go:

  • claude: --resume, which opens its session picker
  • codex: resume, which opens its session picker
  • gemini: --resume, which reopens the latest session

The claude words were checked against claude --help. The codex and gemini words follow those CLIs' docs and were not run, and docs/cli.md says so.

aid asks for the pick itself, through a new dl::pick_workspace, instead of handing dl -- <command> a line with no workspace. The Remote Control session is named after the workspace id, and the id is not known until the pick is made.

A self-review fixed these before this PR was opened:

  • aid resume --stop opened the picker, and dl refused the flag only after the pick
  • aid resume --help opened the picker
  • with no terminal, the only output was "Select workspace", with no reason

Each fix has its own commit and test. Pty tests check that the picked row reaches the devpod command, and that a resume line opens no prompt editor.

The last commit is the 0.57.0 release. It is a minor bump because it adds a command, and it moves the version in the same four places as 0.56.0 did.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w

Summary by Sourcery

Add a one-command workflow for selecting a workspace and resuming its agent session after a restart.

New Features:

  • Add aid resume [<workspace>] to reopen agent sessions after a restart, with optional workspace selection and agent-specific resume behavior.

Bug Fixes:

  • Ensure resume help, picker failures, retired flags, and prompt arguments are handled without launching an unintended session or picker.

Enhancements:

  • Allow resume sessions to retain normal launch options, full-auto behavior, and workspace-based Remote Control naming.
  • Expose workspace selection for callers that need the selected workspace ID before building a launch command.

Build:

  • Bump the project version to 0.57.0 across package metadata and lock data.

Documentation:

  • Document the new resume command, supported agent behavior, usage examples, and version 0.57.0.

Tests:

  • Add unit, interactive PTY, and integration coverage for workspace picking, agent resume commands, validation, help, and no-terminal behavior.

Chores:

  • Update release notes and project version badges for 0.57.0.

After a restart the way back into an agent session was two steps: open
the workspace, then start the agent with its resume flag by hand.
`aid resume [<workspace>]` does both. With no workspace it opens dl's
picker, then starts the agent the way a fresh aid launch does (full
auto, Remote Control named after the workspace id) with the agent's own
resume words in place of a prompt: claude --resume, codex resume,
gemini --resume.

The pick happens in aid, through a new dl::pick_workspace, rather than
by handing `dl -- <command>` a line with no workspace, because the line
names the Remote Control session after the workspace id and the id is
not known until the pick is made.

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w
With no terminal, a bare aid resume printed only the picker's
invitation, "Select workspace (type to filter):", and exited 1. It
now says a terminal is missing and names the command that needs none:
aid resume <workspace>.

Adds boundary tests for both picker arms that end without a pick,
run with no controlling terminal: no terminal, and no workspaces.

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w
`aid resume --help` and `aid resume -h` fell through to the workspace
picker, because only argv[0] was checked for a help flag. A help flag
straight after `resume` now prints aid's help and exits 0.

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w
NonEmpty gains a first() accessor, so pick_one reads the one chosen
row directly instead of mapping an Option it can never see empty.

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w
Only the claude row was run against the CLI. Say so under the table,
the way the comment on Agent::resume already does.

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w
`aid resume [<workspace>]` reopens an agent session in one command. With
no workspace it opens the workspace picker, then starts the agent the way
a fresh aid launch does, with the agent's own resume words in place of a
prompt: claude --resume, codex resume, gemini --resume.

A new command is a feature, so this is a minor bump.

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

Claude-Session: https://claude.ai/code/session_01DiHLcVgAuJAMdsS4skh48w

@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 1 day and 14 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR adds aid resume, parsing it as a dedicated no-prompt task, optionally resolving a workspace through dl's picker before building the normal aid/devpod launch, and appending agent-specific resume arguments while preserving launch options and Remote Control behavior. It includes broad unit, integration, and PTY coverage, documentation, and the 0.57.0 release updates.

Sequence diagram for the aid resume workspace selection flow

sequenceDiagram
    actor User
    participant Aid
    participant DlPicker
    participant Devpod
    participant Agent

    User->>Aid: aid resume [workspace]
    alt workspace omitted
        Aid->>DlPicker: pick_workspace()
        DlPicker-->>Aid: workspace_id
    end
    Aid->>Aid: parse_aid_args()
    Aid->>Aid: build_resume_command()
    Aid->>Devpod: launch workspace with agent resume words
    Devpod->>Agent: start with Remote Control and resume arguments
    Agent-->>User: open agent session picker or latest session
Loading

Flow diagram for agent-specific resume arguments

flowchart LR
    A["aid resume workspace"] --> B{Agent}
    B -->|claude| C["claude --resume"]
    B -->|codex| D["codex resume"]
    B -->|gemini| E["gemini --resume"]
    C --> F["Agent session picker"]
    D --> F
    E --> G["Reopen latest session"]
Loading

File-Level Changes

Change Details Files
Add aid resume parsing and execution for reopening agent sessions.
  • Recognize resume only as the first positional verb and support optional workspace selection.
  • Represent resume lines separately so they cannot open the prompt editor or accept trailing prompt words.
  • Preserve agent selection, full-auto flags, Remote Control, --rm, and --no-remote behavior while appending agent-specific resume arguments.
  • Handle help, invalid combinations, retired flags, and no-workspace cases before launching.
rust/aid/src/main.rs
rust/aid/src/rewrite.rs
Implement workspace picking before constructing a resume launch command.
  • Expose a picker API that returns the selected workspace ID.
  • Reuse dl's workspace listing and picker rendering, with explicit errors for no terminal, no workspaces, or cancellation.
  • Use the selected workspace ID as the resume target and Remote Control session name.
rust/dl/src/commands.rs
rust/dl/src/lib.rs
rust/devlaunch-core/src/domain/workspace_state.rs
rust/devlaunch-core/public-api.rest.txt
Build agent-specific resume commands through the existing launch pipeline.
  • Add resume words for Claude, Codex, and Gemini to the agent definitions.
  • Share command construction between prompt launches and resume launches while retaining environment variables and agent flags.
  • Place resume arguments at the end of the agent command.
rust/aid/src/rewrite.rs
Add coverage for parsing, picker behavior, command generation, and interactive edge cases.
  • Test named and picked workspaces, agent-specific arguments, option placement, workspace names matching resume, and prompt rejection.
  • Add PTY coverage proving the selected row reaches devpod and resume does not open an editor.
  • Test help handling, detached-terminal messaging, empty workspace handling, and refusal before boot.
rust/aid/src/rewrite.rs
rust/aid/tests/interactive.rs
rust/aid/tests/rewrite.rs
Document and release the new command as version 0.57.0.
  • Document syntax, picker flow, agent resume semantics, limitations, and option behavior.
  • Update changelog, README examples/version badges, Cargo package versions, and lockfile metadata.
CHANGELOG.md
README.md
docs/cli.md
rust/Cargo.toml
rust/Cargo.lock

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

@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.83886% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.81%. Comparing base (e6f21c0) to head (ee3e89e).

Files with missing lines Patch % Lines
rust/dl/src/commands.rs 68.42% 6 Missing ⚠️
rust/aid/src/rewrite.rs 98.23% 3 Missing ⚠️
rust/devlaunch-core/src/domain/workspace_state.rs 0.00% 3 Missing ⚠️
rust/aid/src/main.rs 93.75% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
python 42.98% <ø> (ø)
rust 95.05% <93.83%> (-0.01%) ⬇️

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

Components Coverage Δ
shipped code (rust) 95.05% <93.83%> (-0.01%) ⬇️
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 35fa764 into main Sep 28, 2026
15 checks passed
@blooop
blooop deleted the resume1 branch September 28, 2026 20:17
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