From f53c6d2980177c388827bc6b301dc5855f074329 Mon Sep 17 00:00:00 2001 From: Paul O'Reilly Date: Mon, 26 Oct 2026 00:39:32 +1300 Subject: [PATCH] end-session: 2026-10-26 log, context, README Claude-Session: https://claude.ai/code/session_01JXneLTuvb5Gxim3DTN2tQa --- CONTEXT.md | 2 +- README.md | 2 +- memory/log/2026-10-26.003911.md | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 memory/log/2026-10-26.003911.md diff --git a/CONTEXT.md b/CONTEXT.md index 5e701b7..523d951 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -4,7 +4,7 @@ Current work focus and active tasks. Used by `context-load` to orient agents at ## Recent -- `claude-sessions` (2026-10-26): menu "new" now offers a folder browser (zenity or terminal, with new-folder), a topic prompt (defaults to folder name, must be unique among live sessions), and a Location column in the list. Uncommitted; not yet tried live from the menu. +- `claude-sessions` (2026-10-26): menu "new" offers a folder browser (zenity or terminal, with new-folder), a topic prompt (defaults to folder name, must be unique among live sessions), and a Location column. New `spawn --headless [--create]` (exit 2 = topic in use); `/spawn-session` skill uses it. Pushed (c32ea46, d237789; skill a5b82a2). Headless path tested live ("Migration" session). Next: try the menu `n` -> `b` flow by hand and check the Location column. - `claude-sessions` (2026-10-13): new session defaults to cwd's CLAUDE.md project; new and resumed sessions attach (recover attaches only when one session is selected). Pushed (11ee50e). Not yet tried live end-to-end from the menu. - Sonnet driver in `small-scripts/scripts/claude-profile` now `claude-sonnet-5-5`; other drivers (haiku, opus, fable) still on older IDs. - Untracked, left alone: `insights-claude-md-profile-PLAN.md`, `scripts/__pycache__/` (consider gitignoring). diff --git a/README.md b/README.md index e542459..a8e70b3 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,6 @@ rm .pre-lint | `scripts/set-topic.sh` | Set the session topic: `set-topic.sh "topic text"` | | `scripts/extract-transcripts.py` | Transcript backup tracking — register backups, list unprocessed, extract conversation text, mark processed | | `scripts/list-transcripts-here.sh` | Wrapper calling `extract-transcripts.py --list $(pwd)` — used in `/log` skill pre-gathered context | -| `scripts/claude-sessions` | Session lifecycle manager — registry, interactive menu (new session defaults to cwd project; new/resume land you in tmux), recover after restart, gc. Symlinked to `~/sbin/` | +| `scripts/claude-sessions` | Session lifecycle manager — registry, interactive menu (new session: folder browser, unique topic, Location column; new/resume land you in tmux), `spawn --headless` for scripts and `/spawn-session`, recover after restart, gc. Symlinked to `~/sbin/` | | `scripts/claude-sessions-shutdown` | Graceful shutdown — sends `/exit-session` to all Claude tmux sessions, waits, force-kills. Called by systemd | | `scripts/install-systemd.sh` | Install `config/systemd/user/claude-sessions-save.service` to `~/.config/systemd/user/`, enable and start | diff --git a/memory/log/2026-10-26.003911.md b/memory/log/2026-10-26.003911.md new file mode 100644 index 0000000..908fd5b --- /dev/null +++ b/memory/log/2026-10-26.003911.md @@ -0,0 +1,27 @@ +# Session Log -- 2026-10-26 + +## Summary +Added a folder browser, unique-topic prompt and Location column to the `claude-sessions` menu, then added a `--headless` spawn mode and moved the `/spawn-session` skill onto it. Tested live by spawning a "Migration" session. + +## Decisions +- Decision: Folder picker uses `zenity` when a display exists, otherwise a built-in terminal browser -- Rationale: sessions are often driven over SSH/tmux where no GUI is available; both support creating a folder. +- Decision: Topic = tmux session name = Remote Control name, defaulting to the Title-Cased folder name; "in use" means a live tmux session only -- Rationale: resumable registry entries do not occupy a tmux name. +- Decision: Headless mode fails (exit 2) on a taken topic instead of adding `#N` -- Rationale: callers (the skill) must ask the user for a real topic so all sessions have meaningful names. +- Decision: `--create` only accepts absolute paths -- Rationale: avoids creating folders in an unexpected cwd. + +## Gotchas Discovered +- **[editing]** Symptom: a Python patch script replaced the wrong region of `claude-sessions` and deleted ~450 lines -- Fix: `git checkout` the file and re-apply with the Edit tool. Cause: `s.index('elif raw == "n":')` matched the first occurrence, which was inside newly inserted helper code, not `cmd_menu`. Anchor slice searches after a unique function marker (`s.index(..., s.index("def cmd_menu"))`). +- **[tmux]** Symptom: `tmux capture-pane -t "=Name"` returns "can't find pane" -- Fix: use the bare session name for pane targets; `=` exact-match works only for session targets (`has-session`, `attach`, `switch-client`). +- **[tmux]** tmux rewrites `.` and `:` in session names to `_`, so topic checks compare the rewritten form and reject those characters. + +## Open Questions +- Menu path not yet exercised by hand end to end (`n` -> `b` -> topic -> attach). Only helper functions and the menu listing were tested. +- Does the Location column look right for the new "Migration" session in the live menu? + +## Key Context +- Script: `projects/claude-foundations/scripts/claude-sessions`; commits `c32ea46` (menu) and `d237789` (headless). Skill: `custom-claude-skills/skills/spawn-session`, commit `a5b82a2`. +- Headless: `claude-sessions spawn --headless [--name topic] [--create]`; exit 1 = folder missing, exit 2 = topic in use. +- Live test: skill spawned "Migration" in `~/dev/claude/projects/migration`; Remote Control active. + +## Process Notes +- Script docs rule followed: new `memory/script-claude-sessions.md` plus MEMORY.md index line; `skill-spawn-session.md` updated.