{"id":50949972,"url":"https://github.com/scottconverse/claude-code-handoff-cowork","last_synced_at":"2026-06-18T00:30:52.050Z","repository":{"id":364153010,"uuid":"1236991829","full_name":"scottconverse/claude-code-handoff-cowork","owner":"scottconverse","description":"Cowork-installable port of Sting25/claude-code-handoff (MIT, Christopher Chadwick). Adds plugin/marketplace manifests, hooks.json wiring, mkdir-lock + Perl JSON::PP shims to remove jq/flock deps.","archived":false,"fork":false,"pushed_at":"2026-06-11T20:34:22.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T22:14:53.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://scottconverse.github.io/claude-code-handoff-cowork/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottconverse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T19:15:05.000Z","updated_at":"2026-06-11T20:34:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/scottconverse/claude-code-handoff-cowork","commit_stats":null,"previous_names":["scottconverse/claude-code-handoff-cowork"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/scottconverse/claude-code-handoff-cowork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottconverse%2Fclaude-code-handoff-cowork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottconverse%2Fclaude-code-handoff-cowork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottconverse%2Fclaude-code-handoff-cowork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottconverse%2Fclaude-code-handoff-cowork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottconverse","download_url":"https://codeload.github.com/scottconverse/claude-code-handoff-cowork/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottconverse%2Fclaude-code-handoff-cowork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34471638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T00:30:51.920Z","updated_at":"2026-06-18T00:30:52.006Z","avatar_url":"https://github.com/scottconverse.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-code-handoff-cowork\n\n\u003e **A Cowork-installable port of [Sting25/claude-code-handoff](https://github.com/Sting25/claude-code-handoff) by Christopher Chadwick.**\n\u003e\n\u003e The original tool — the snapshot logic, the transcript appender, the `/handoff` skill spec — is **his** work, used here under MIT. This repo packages it for the Claude Cowork desktop app and replaces two host-side dependencies (`jq`, `flock`) with portable equivalents so it runs on Windows MSYS Git Bash without extra installs.\n\n---\n\n## The problem this solves\n\nClaude Code sessions hit a context limit. When they do, the next session starts blind — you re-explain the project, the in-flight track, the decisions you made twenty minutes ago, all from memory. The model has no continuity. You become the continuity.\n\nChristopher Chadwick wrote `claude-code-handoff` to fix this:\n\n- **`SessionEnd` hook** snapshots `HEAD`, branch, recent commits, working-tree state, and in-flight `.md` docs to `\u003crepo\u003e/.claude/handoff_current.md`.\n- **`SessionStart` hook** in the next session reads that file and injects it as context. No prompt to remember.\n- **`Stop` hook** after every turn appends the new transcript lines to a raw-dump backup. Saturated-context restart-from-thin-curated-notes failure mode goes away.\n- **`/handoff` slash command** lets you trigger a snapshot manually at clean boundaries with a curated `## Notes from this session` block and a loud banner telling you to actually start a new session.\n\nThe next session is no longer blind. That's the whole pitch.\n\n## What this repo adds\n\nThe upstream project installs via `git clone + ./install.sh`, which patches your `~/.claude/settings.json` with `jq` and uses `flock` for Stop-hook serialization. That's correct for the standalone Claude Code CLI on Linux/macOS. It doesn't fit two real-world surfaces:\n\n1. **The Cowork desktop app.** Users install plugins through Customize → Browse plugins, not by running shell scripts. The Cowork app's plugin loader reads `.claude-plugin/plugin.json` and `hooks/hooks.json`, not patched user settings.\n2. **Windows MSYS Git Bash.** The shell that runs hook commands inside Cowork's Code tab. Neither `jq` nor `flock` ships there by default.\n\nThis port:\n\n- Packages the upstream code as a single-plugin **marketplace** (`.claude-plugin/marketplace.json`) installable through the Cowork app's UI.\n- Replaces `jq` with **`bin/handoff_turn_format.pl`** — a Perl helper using only `JSON::PP` (a core module since 5.14). Same per-line parse, same output shape.\n- Replaces `flock` with an atomic **`mkdir`-based lock**. Same serialization guarantees, works on every platform.\n- Adds a **three-tier fallback** for resolving the active session and transcript path: JSON stdin payload (upstream contract) → `CLAUDE_ENV_FILE` path-parse → `CLAUDE_PROJECT_DIR` → encoded `~/.claude/projects/\u003cencoded\u003e/\u003csid\u003e.jsonl`. This makes the plugin work in headless `claude -p` mode (where stdin is empty) as well as interactive mode.\n- Adds **`CLAUDE_PROJECT_DIR`-preferred repo resolution** in both scripts. The Cowork app's Code-tab sessions root the shell at `C:\\Users\\scott\\.klodock`, not the user's project; `git rev-parse` from pwd doesn't work, but `CLAUDE_PROJECT_DIR` does.\n- Adds **`bin/probe_hook.sh`** — a diagnostic env-logger wired ahead of each real hook. Writes to `~/handoff_probe.log` for troubleshooting.\n\nThat's it. Snapshot semantics, output formats, skill triggers, `HANDOFF_*` configuration env vars — all unchanged from upstream.\n\n## Verified\n\nEnd-to-end on Windows 11 + MSYS Git Bash + Claude Code 2.1.87 (real `claude -p` headless run, real Anthropic API turn): all three hooks fired, both artifacts written, the raw dump contained the actual model conversation. Full receipts including probe-log captures and exact commit SHAs in **[`docs/VERIFICATION.md`](docs/VERIFICATION.md)**.\n\n## Install\n\nIn the Cowork desktop app:\n\n1. **Customize → Browse plugins → Add marketplace.**\n2. Paste `https://github.com/scottconverse/claude-code-handoff-cowork`.\n3. Install **claude-code-handoff** from the marketplace.\n4. Start a fresh Code-tab session in any git repo. The `/handoff` skill appears in the `/` menu.\n\nFor file-level install (when the UI doesn't help) and full daily-use guidance: **[`USER-MANUAL.md`](USER-MANUAL.md)**.\n\n## Tab support matrix\n\n| Cowork tab | `/handoff` skill | `SessionStart` auto-load | `SessionEnd` auto-write | `Stop` per-turn dump |\n|------------|------------------|--------------------------|-------------------------|----------------------|\n| **Chat**   | ✗ (no shell)     | ✗                        | ✗                       | ✗                    |\n| **Cowork** | ✓                | ✗ (known bug)            | ✗                       | ✗                    |\n| **Code**   | ✓                | ✓                        | ✓                       | ✓                    |\n\nThe Cowork-VM tab hooks-don't-fire issue is upstream Anthropic bugs [#27398](https://github.com/anthropics/claude-code/issues/27398) and [#40495](https://github.com/anthropics/claude-code/issues/40495), not a port issue — affects every marketplace plugin with hooks. The `/handoff` skill itself loads fine there; use it manually.\n\n## Documentation\n\n- **[USER-MANUAL.md](USER-MANUAL.md)** — install, daily use, env vars, troubleshooting.\n- **[ARCHITECTURE.md](ARCHITECTURE.md)** — hook lifecycle, cwd-resolution decision tree, fallback chain, manifest schemas.\n- **[CHANGELOG.md](CHANGELOG.md)** — what shipped in 0.1.0.\n- **[CONTRIBUTING.md](CONTRIBUTING.md)** — where bug reports and PRs should go (upstream vs here).\n- **[CREDITS.md](CREDITS.md)** — per-file attribution.\n- **[docs/VERIFICATION.md](docs/VERIFICATION.md)** — end-to-end test receipts.\n\n## Bug reports\n\n- **Plugin / Cowork-install / MSYS-portability** issues → [this repo's Issues](https://github.com/scottconverse/claude-code-handoff-cowork/issues).\n- **Snapshot logic / skill spec / output format** issues → [upstream's Issues](https://github.com/Sting25/claude-code-handoff/issues). That's Christopher's domain; the logic is unchanged here.\n- **Cowork app / Claude Code CLI** issues (hooks not firing, etc.) → [anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues).\n\n## Discuss\n\n[GitHub Discussions](https://github.com/scottconverse/claude-code-handoff-cowork/discussions) — questions, showcase, ideas.\n\n## Credit\n\n**Christopher Chadwick** ([@Sting25](https://github.com/Sting25)) is the author of [claude-code-handoff](https://github.com/Sting25/claude-code-handoff). The snapshot script, the transcript appender, the `/handoff` skill, the substrate pattern, the entire idea — all his work. This port stands on his shoulders. If this is useful to you, [his repo](https://github.com/Sting25/claude-code-handoff) is the place to go for context, upstream development, and credit.\n\n**Scott Converse** ([@scottconverse](https://github.com/scottconverse)) packaged Christopher's work for the Cowork app, wrote the MSYS portability shims, and added the env-fallback chain for headless mode.\n\n## License\n\n[MIT](LICENSE). Copyright (c) 2026 Christopher Chadwick, preserved verbatim from upstream. The port additions are under the same license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottconverse%2Fclaude-code-handoff-cowork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottconverse%2Fclaude-code-handoff-cowork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottconverse%2Fclaude-code-handoff-cowork/lists"}