agent-session
v0.2.2
Published
Rehydrate a workflow session from a handoff file and launch an interactive agent CLI
Readme
agent-session
Workflow touchpoint launcher — rehydrate sessions and spawn fresh agent CLI sessions with lean context.
Usage (via npx — no install needed)
npx -y agent-session --help
npx -y agent-session start 'github:mararn1618/memoria-letzte-worte@feature/45-foo::docs/stories/45-foo/02_handoff.yml'Published on npm as agent-session. npx -y downloads and runs it on the fly without prompting to install the package.
Local development
cd agent/session
npm install
npm link # makes `agent-session` available globallyAfter linking, agent-session is on your PATH from any directory. To remove it later: npm unlink -g agent-session.
Commands
start
Rehydrate a prepared handoff and spawn an interactive Claude Code session in the matching workspace.
npx -y agent-session start 'github:mararn1618/memoria-letzte-worte@feature/45-foo::docs/stories/45-foo/02_handoff.yml'Options:
| Flag | Description |
|------|-------------|
| --adapter <name> | Agent CLI adapter — only claude is implemented (default) |
The command clones/updates the workspace, assembles the prompt + context files, and execs claude with the resulting prompt.
Session Ref Syntax
Two compact forms are accepted:
Legacy compact form for paths beginning with .agent/:
github:<owner>/<repo>@<branch>:<path-to-session.yml>Example:
github:mararn1618/memoria-letzte-worte@improve-agent-harness:.agent/sessions/collab-2-improve-agent-harness/session.ymlExplicit compact form for story-folder handoffs:
github:<owner>/<repo>@<branch>::<path-to-handoff.yml>Example:
github:mararn1618/memoria-letzte-worte@feature/45-foo::docs/stories/45-foo/02_handoff.ymlGitHub blob URLs are also accepted when the path contains a .agent/ segment.
Handoff Schema
The orchestrator writes handoffs to docs/stories/<story>/NN_handoff.yml and commits them on the branch that owns the touchpoint.
repo: mararn1618/memoria-letzte-worte
branch: feature/45-foo
step: 2
prompt: agent/workflow/02_COLLAB_discussion.md
context:
- docs/stories/45-foo/00_manifest.md
- docs/stories/45-foo/01_current-solution.mdLimitations
- Claude Code only — adapter layer is pluggable, but no other agent CLI (Codex, Gemini, etc.) is implemented.
- Local execution only —
startruns the agent CLI on your machine; no remote runner integration. - Start only — handoff creation is owned by
agent/orchestrator/run.sh; this package only rehydrates and starts a session.
Development
npm run dev -- --help # run CLI from source via tsx
npm run build # compile TypeScript to dist/
npm test # run vitest onceSee test/smoke.md for the manual end-to-end checklist.
