Skip to content

feat(resume): ask Claude to find a session (S, agentctl -p) — 0.13.0 - #14

Merged
roypadina merged 2 commits into
mainfrom
feat/ai-find
Oct 29, 2026
Merged

roypadina merged 2 commits into
mainfrom
feat/ai-find

Conversation

@roypadina

Copy link
Copy Markdown
Owner
  • Ask Claude to find a session. S on Resume opens an ask box: describe the session from memory ("the one where we deployed the WAF last week"). Claude picks the matches from session metadata (name, original title, cwd, ClaudWork folder, labels, note, first prompt, cached recap); they list like full-text search hits (↵ resume, p peek). Follow-ups continue the same conversation; ⇥ flips between the ask box and the results.
  • agentctl -p "<question>" opens Resume already asking; with stdout piped it prints the matches (exit 1 when none).
  • Isolated run: claude -p --json-schema with no tools, plugins, MCP servers, hooks or saved transcript, in an empty ~/.config/agentctl/find/ (haiku, ~10 s; AGENTCTL_FIND_MODEL overrides). Without isolation one call loaded the whole user setup ($0.75 / 32 s vs $0.0003 / 3 s).
  • Core: src/core/find.ts (catalog, output parsing with id validation + control-char stripping, DI'd spawn), spawnRun takes cwd + abort signal, SessionRecord.firstPrompt, listSessions skips the finder's project dir.
  • CLI: root options are now positional so resume <id> -p <profile> keeps working next to root -p.
  • Tests: tests/core/find.test.ts, TUI smoke tests (ask → resume, follow-up history, typing during a late answer, Esc ladder, 30-row fit), CLI -p with a fake claude, resume -p regression.
  • Bump 0.13.0 + CHANGELOG.

🤖 Generated with Claude Code

https://claude.ai/code/session_014uzkEWLKvSif6FeM2LZdnQ

Describe a session from memory ("the one where we deployed the WAF last
week") and Claude picks the matches from a metadata catalog (name, title,
cwd, ClaudWork folder, labels, note, first prompt, cached recap). Results
list like full-text search hits (enter resumes, p peeks); follow-ups keep
the same conversation, tab flips between the ask box and the results.

- core/find.ts: catalog + history -> isolated `claude -p --json-schema`
  (no tools, plugins, MCP, hooks or saved transcript; haiku, ~10 s;
  AGENTCTL_FIND_MODEL overrides). Ids validated against known sessions,
  control characters stripped from model text.
- `agentctl -p "<question>"` opens Resume already asking; piped stdout
  prints the matches. Root options are now positional so `resume -p
  <profile>` keeps working.
- spawnRun takes cwd + abort signal; listSessions skips the finder dir.
@roypadina
roypadina merged commit 4554589 into main Oct 29, 2026
1 of 2 checks passed
@roypadina
roypadina deleted the feat/ai-find branch October 29, 2026 16:35
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