Skip to content

Hijack agent-shell-resume-session to use the session picker#11

Draft
timvisher wants to merge 1 commit into
mainfrom
resume-session-picker
Draft

Hijack agent-shell-resume-session to use the session picker#11
timvisher wants to merge 1 commit into
mainfrom
resume-session-picker

Conversation

@timvisher
Copy link
Copy Markdown
Collaborator

M-x agent-shell-resume-session used to read a session ID string from the minibuffer — a UX that only worked if you already had the exact ID in your clipboard. The picker that agent-shell-session-strategy = 'prompt opens is strictly more useful: it lists known sessions and lets the completion framework do fuzzy matching. So this branch repurposes agent-shell-resume-session to call agent-shell--start with :session-strategy 'prompt, dropping the ID-prompt path entirely.

Users who do have a session ID in hand aren't worse off — the picker now force-shows session IDs (overriding agent-shell-show-session-id buffer-locally) so the ID is part of the candidate text that vertico/ivy/etc. will match against. That's done via a new :show-session-id keyword on agent-shell--start that sets the variable buffer-locally on the new shell, mirroring how :session-strategy is already plumbed through.

No tests added — this is a single dispatch change on an interactive entry point with no new logic to regress against. README features list updated.

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature. N/A (tracked in private bd)
  • I'm making visual changes, so I'm including screenshots so you can view and discuss. N/A
  • I've added tests where applicable. N/A
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

Repurpose agent-shell-resume-session from an ID-prompt command into a
session-picker entry point that calls agent-shell--start with
:session-strategy 'prompt. Add a :show-session-id keyword to
agent-shell--start that buffer-locally sets agent-shell-show-session-id,
so users with an ID in hand can find it via their completion framework's
fuzzy matching even when the variable is off globally.

Closes agent-shell-ufm.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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