A Bubble Tea TUI for browsing and reopening AI coding sessions (Claude Code, OpenCode, Qwen, Codex).

If you want an AI agent to configure this tool for your machine, copy and paste this prompt:
You are configuring Agent Session Manager for this machine. Read the README section "AI Auto-Config Protocol" and execute exactly this workflow: detect platform/shell, run `agent-manager --doctor --json` (or fallback `go run ./cmd/session-manager --doctor --json` when running from source), propose minimal env/config changes only (no source code edits), apply them, then re-run doctor and report final status plus exact diffs.
How to use:
- Copy the prompt above.
- Paste it into your AI agent chat in this repository.
- Let the AI run the protocol, then review its reported diffs and doctor results.
This release is optimized for WSL-first workflows. The session restore path is:
- Open a new Windows Terminal tab/window
- Enter WSL shell
cdto the session project path- Run the restore command for the selected tool
Install once, run anywhere (GitHub source):
Stable release (recommended):
npm i -g github:RunMintOn/SessionLens#v0.1.3
agent-managerLatest default branch (bleeding edge, may be unstable):
npm i -g github:RunMintOn/SessionLens
agent-managerNo need to cd into this repo after install.
On first run, agent-manager auto-downloads the matching binary from GitHub Releases.
If npm is unavailable, use a prebuilt binary from GitHub Releases and place it in your PATH as agent-manager.
go build -o /tmp/session-manager-mvp ./cmd/session-manager
/tmp/session-manager-mvp/: enter search input modeEsc(in search mode): clear and exit searchTaborLeft/Right: switch panel focusUp/Downork/j: move cursorEnter(left panel): open selected project shell (double press within 2s)Enter(right panel): resume selected sessionh: hide selected sessionH: show hidden sessions overlay1..5: source filter (All, Claude, OpenCode, Qwen, Codex)q: quit
You can customize launcher behavior without changing source code.
ASM_TERMINAL_CMD(default:wt)ASM_TERMINAL_ARGS(default platform-dependent, space-separated)ASM_WSL_ENTRY_CMD(default:wsl.exe)ASM_WSL_SHELL(default:zsh -lic)ASM_HOST_SHELL_CMD(default platform-dependent, usuallysh)ASM_HOST_SHELL_ARGS(default platform-dependent, usually-lc)ASM_RESTORE_CMD_CLAUDE(default:claude -r {id})ASM_RESTORE_CMD_OPENCODE(default:opencode -s {id})ASM_RESTORE_CMD_QWEN(default:qwen -r {id})ASM_RESTORE_CMD_CODEX(default:codex resume {id})ASM_CONFIG_PATH(optional, override config file location)
Template placeholders:
{id}: session ID (shell-quoted){project}: project path (shell-quoted)
Example:
export ASM_WSL_SHELL="bash -lc"
export ASM_RESTORE_CMD_QWEN="qwen --resume {id}"Install/bootstrap-specific environment variables:
ASM_RELEASE_REPO(override GitHub release repo, formatOWNER/REPO)ASM_RELEASE_TAG(pin a release tag, e.g.v0.1.3)ASM_RELEASE_BASE_URL(use custom release mirror base URL)ASM_ALLOW_LATEST_FALLBACK=1(allow fallback to latest release when pinned tag download fails)ASM_SKIP_BOOTSTRAP=1(disable first-run binary download)
Default config file path:
- Linux/WSL/macOS:
~/.config/agent-session-manager/config.json - Or override with
ASM_CONFIG_PATH
Example config:
{
"terminal_cmd": "wt",
"terminal_args": [],
"wsl_entry_cmd": "wsl.exe",
"wsl_shell": "zsh -lic",
"host_shell_cmd": "sh",
"host_shell_args": ["-lc"],
"restore_cmd_claude": "claude -r {id}",
"restore_cmd_opencode": "opencode -s {id}",
"restore_cmd_qwen": "qwen -r {id}",
"restore_cmd_codex": "codex resume {id}"
}Priority:
ASM_*environment variables- Config file
- Built-in defaults
Run a quick environment and launcher configuration check:
agent-manager --doctor
# or (repo/dev mode): go run ./cmd/session-manager --doctorMachine-readable report:
agent-manager --doctor --json
# or (repo/dev mode): go run ./cmd/session-manager --doctor --jsonThe report includes:
- active launcher configuration
- config value sources (
env/file/default) - config file path
- WSL detection
- terminal binary discovery
- Windows interop status
- command availability for configured restore tools
- structured fix suggestions
Print current effective config (after default + file + env merge):
agent-manager --print-effective-config
# or (repo/dev mode): go run ./cmd/session-manager --print-effective-configGenerate starter config:
# dry-run (prints target path + JSON)
agent-manager --init-config
# write file
agent-manager --init-config --write
# overwrite existing file
agent-manager --init-config --write --forceUse this section if an AI agent should configure the tool for a user.
Scope constraints:
- Allowed: user shell/profile env vars and user config file.
- Not allowed: patching source code for per-user setup.
- Not allowed: unrelated system/package changes unless user confirms.
Inputs the AI must use:
- Platform/shell signals (
uname -a,$SHELL,$WSL_DISTRO_NAME). - Doctor outputs (
--doctorand--doctor --json). - Existing user config path and current env vars.
Steps:
- Detect platform and shell (
uname -a,$SHELL,echo $WSL_DISTRO_NAME). - Run doctor:
agent-manager --doctor agent-manager --doctor --json
- Decide minimal changes:
- Read JSON
checksandsuggestions. - If terminal missing, set
ASM_TERMINAL_CMD. - If tool command missing, update
ASM_RESTORE_CMD_*or user PATH. - If shell mismatch, set
ASM_WSL_SHELLorASM_HOST_SHELL_CMD/ARGS.
- Read JSON
- Initialize config template:
agent-manager --init-config
- Write config to either:
- shell profile (
~/.zshrc,~/.bashrc), or ~/.config/agent-session-manager/config.json
- shell profile (
- Re-run doctor and verify all required commands are
ok.
Required AI output contract:
- detected platform and shell
- chosen change path (env vars or config file)
- exact changes applied (before/after or patch-style diff)
- final doctor status (
ok/fail) and any remaining blockers
Success criteria:
- doctor reports terminal command and restore tool command as available.
- resuming a sample session works from the right panel.
wt not found: install Windows Terminal or setASM_TERMINAL_CMD.windows interop unavailable: WSL cannot spawn Windows processes in current environment.qwen: not found(or similar): ensure command is available in configured shell, or override restore command viaASM_RESTORE_CMD_*.bootstrap failedon first run: check network access to GitHub, or pin a valid release tag:ASM_RELEASE_TAG=v0.1.3 agent-managerASM_ALLOW_LATEST_FALLBACK=1 agent-manager(for bleeding-edge installs only)ASM_RELEASE_BASE_URL=<mirror-url> agent-manager
go test ./...This repo includes a tag-based release pipeline (.github/workflows/release.yml):
- Push a tag like
v0.1.3. - CI builds and uploads:
agent-manager-linux-amd64agent-manager-windows-amd64.exechecksums.txt
- Users can install:
- stable tag:
npm i -g github:RunMintOn/SessionLens#vX.Y.Z - latest default branch:
npm i -g github:RunMintOn/SessionLens
- stable tag: