A zero-daemon, repo-local session-continuity protocol and CLI for coding agents.
Project description
Session Glue
Session Glue is a lightweight session-continuity protocol and CLI for coding agents.
Its goal is simple: when an agent session gets too long, create a compact local handoff that lets the next session resume without dragging the full chat history forward.
Status
Pre-MVP founding repository.
Product Boundary
Session Glue v1 is intentionally small:
- repo-local
.agent-history/handoffs - markdown handoff files with YAML frontmatter
LATEST.md, archived session files,INDEX.yaml, andRESUME_PROMPT.txt- lightweight Python CLI
- no daemon
- no MCP dependency
- no embeddings
- no vector database
- no file watcher
- no product UI
Planned CLI
Primary executable:
glue
Fallback executable:
session-glue
Planned commands:
glue create
glue validate
glue status
glue resume-prompt
glue install codex --dry-run
glue install claude --dry-run
glue install cursor --dry-run
glue install gemini --dry-run
glue create
glue create archives an agent-composed handoff into the repository-local
.agent-history/ directory. The agent writes the handoff document (YAML
frontmatter plus a narrative body — see the fixtures under
tests/fixtures/handoffs/); the CLI persists it:
glue create --input handoff.md # or pipe via stdin: glue create < handoff.md
glue create --input handoff.md --repo-root /path/to/project
It creates or updates:
.agent-history/sessions/<session>.md— the archived session.agent-history/LATEST.md— a copy of the newest handoff.agent-history/RESUME_PROMPT.txt— the copy-paste resume prompt.agent-history/INDEX.yaml— compact metadata and a session list
The handoff is validated first: a missing required field or a resume-mechanic
next_todo_items[0] is rejected before anything is written. glue create never
accesses the network or the OS clipboard.
glue validate
glue validate checks that an existing .agent-history/ is internally
consistent:
glue validate # validate ./.agent-history/
glue validate --repo-root /path/to/project
glue validate --sessions # also validate archived session files
It verifies that LATEST.md has valid frontmatter, that its next_todo_items[0]
is a productive action (not a resume mechanic such as "paste the prompt" or
"read LATEST.md"), that RESUME_PROMPT.txt exists, and that
INDEX.yaml.first_next_action matches LATEST.md's next_todo_items[0]. It
exits non-zero and prints each problem when validation fails. Like the rest of
the CLI, it never touches the network or an LLM.
glue status and glue resume-prompt
Two compact, read-only commands for orienting a new session:
glue status # latest session metadata + a cheap validation summary
glue resume-prompt # print .agent-history/RESUME_PROMPT.txt exactly
glue status reads INDEX.yaml and prints the latest session id, latest file,
current branch, head commit, and first next action, plus a one-line validation
summary. It deliberately does not print the full session narrative, so it
orients you without recreating context bloat, and it handles a missing
.agent-history/ gracefully. glue resume-prompt prints the exact contents of
.agent-history/RESUME_PROMPT.txt. Both are strictly read-only.
glue install <agent> --dry-run
glue install shows the managed instruction block Session Glue would add to a
coding agent's global instruction file, so agents know how to respond to
/glue, /freeze, /handoff, and /checkpoint:
glue install codex --dry-run
glue install claude --dry-run
glue install cursor --dry-run
glue install gemini --dry-run
glue install all --dry-run
It prints the target path and the proposed block (delimited by stable
<!-- BEGIN/END SESSION GLUE (managed) --> markers so a future updater can
replace it idempotently). Only --dry-run is supported — it never modifies
your home directory, and real installation is intentionally not implemented
(operator-gated). Running glue install <agent> without --dry-run exits with
an error.
Development
Keep the MVP small. Do not add daemons, background sync, retrieval services, or UI surfaces unless the project scope explicitly changes first.
Session Glue targets Python 3.10+ and has no required runtime dependencies — the CLI is built on the standard library so it can be installed and trusted immediately.
Local install
Create and activate a virtual environment, then install the package in editable mode with the development extras:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -e ".[dev]"
Verify the CLI
glue --help
glue --version
session-glue --help # fallback executable
python -m session_glue --help # module invocation
Run the tests
pytest
Lint (optional)
ruff check .
Contributing
Read CONTRIBUTING.md before opening issues or pull requests. All public content must avoid credentials, private logs, .env contents, and personal local paths.
For vulnerability reports, see SECURITY.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file session_glue-0.1.0.tar.gz.
File metadata
- Download URL: session_glue-0.1.0.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b1fe41a26f8d4eea73a1ad71edddf20247ee81cf1f0840fb1ac4566c0ea8f10
|
|
| MD5 |
dbbe4dce351f075ff6daf8f9d3e19791
|
|
| BLAKE2b-256 |
53a18bf31cae75fbf0a856feace102c50f139a1d20e0b143ad3fad0a6703e91b
|
File details
Details for the file session_glue-0.1.0-py3-none-any.whl.
File metadata
- Download URL: session_glue-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57ea91c48dfc97cb9f0c36b5c9dccaa4c0c67b5c5bd8689360c4908e0785fad9
|
|
| MD5 |
07aaf243885cc40d33cb8a54694b5506
|
|
| BLAKE2b-256 |
b325918ad89105f785eda19a5bcaee8df383a9cceac1caeb2b057c948d2a1f11
|