jjagent is a claude code plugin that tracks session changes as jj-vcs commits. It isolates edits from other sessions, improving code management for developers using Claude and Jujutsu.
git clone https://github.com/schpet/jjagent.gitjjagent is a Claude Code plugin that uses hooks to associate each Claude session's changes with a single, evolving Jujutsu commit. Unlike multiple scattered commits or git worktree approaches, jjagent keeps you and Claude working on the same working copy while maintaining clear attribution of who made what changes. A session ID stored in commit messages allows you to resume sessions, manage multiple concurrent Claude sessions with automatic locking, and prevent conflicts between your edits and Claude's changes. The tool works automatically once installed as a plugin, with optional status line integration to display your current session's commit information.
[{"step":"Install jjagent in your Claude Code environment by running: `claude code install jjagent` in your terminal. Ensure you have Jujutsu (jj) installed and configured (`jj --version` should work).","tip":"If jj is not installed, follow the [official installation guide](https://github.com/martinvonz/jj) for your OS. jjagent requires jj v0.16.0 or later."},{"step":"Navigate to your project directory (`cd /path/to/your/project`) and initialize jjagent for the session by running: `jjagent --session [SESSION_NAME]`. Replace [SESSION_NAME] with a descriptive name (e.g., `feature/user-profile`).","tip":"Use hyphens or underscores in session names (e.g., `bugfix/login-flow`). Avoid spaces or special characters to prevent issues with shell commands."},{"step":"Start editing files in your project. jjagent will automatically track changes and commit them to jj-vcs with a message prefixed by `Claude session [SESSION_NAME]:`.","tip":"Commit messages are auto-generated, but you can override them by editing the commit message in `jj commit` after changes are staged."},{"step":"Review session-specific commits by running `jj log -r 'desc(\"Claude session\")'`. Use `jj diff -r [COMMIT_HASH]` to inspect changes from a specific session.","tip":"To switch sessions, run `jjagent --session [NEW_SESSION_NAME]` in the same project directory. This creates a new commit chain for the new session."},{"step":"When finished, stop tracking by running `jjagent --stop` or simply close your Claude session. Your changes will remain committed in jj-vcs.","tip":"If you encounter conflicts or unwanted commits, use `jj undo` to revert the last commit and adjust your session tracking."}]
Isolating Claude Code edits from your own changes in a shared repository
Running multiple concurrent Claude sessions while keeping work synchronized
Resuming previous Claude coding sessions by tracking them in commit messages
Preventing merge conflicts between your edits and Claude's file modifications
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/schpet/jjagentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up jjagent for [PROJECT_PATH] to automatically track changes in [SESSION_NAME] as jj-vcs commits. Ensure edits are isolated from other sessions and review the commit history to verify tracking accuracy.
I’ve configured jjagent for your project at `/home/user/my-react-app` under the session name `feature/dashboard-redesign`. The plugin detected 12 file changes across `src/components/Dashboard.tsx`, `src/utils/api.ts`, and `public/index.html`. These were automatically committed as a new jj-vcs change with the message: "Claude session [feature/dashboard-redesign]: Updated dashboard components and API utility functions."
The commit hash is `q5z9v2m` and can be viewed with `jj log -r q5z9v2m`. To verify isolation, I checked the parent commit (`r12p4x7`) and confirmed no unrelated session edits were included. You can now continue editing in this session, and jjagent will track new changes as separate commits.
To review all session-specific commits, run:
```bash
jj log -r 'desc("Claude session")'
```
Tip: If you switch to another session (e.g., `bugfix/auth-issue`), jjagent will create a new commit chain for that session, keeping edits neatly separated.AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan