# Session control

> Session control is an open-source agent skill for developer tools. Switches a /work session between resume and fork, recording state in session files. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/main/skills/session-control
- **Repository:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **GitHub stars:** 42
- **License:** MIT
- **Skill name:** session-control
- **Collection:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill handles the session side of the /work command in a Claude Code research workflow. When the command is run with a resume or fork flag, the skill changes the active session state to match, writing the outcome to a session.json file and appending entries to a session.events.jsonl log.

The skill is described as internal workflow tooling and is set so the model cannot invoke it on its own and it is not user-invocable. Its listed steps are to read the variables passed in from the workflow, run a session control shell script with the matching arguments, and then check that both session files were updated. The folder includes a reference document that explains the resume and fork behaviour in more detail.

It expects the surrounding /work workflow to supply the flags and file locations, and it is limited to reading, writing and editing files plus running shell commands. Its frontmatter states it should not be used for general user session handling, login state or application state.

## When your agent uses it

> Controls session resume/fork(branch) for /work based on --resume/--fork flags. Updates session.json and session.events.jsonl. Internal workflow use only. Do NOT load for: user session management, login state, app state handling.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/session-control)
- [Asks for: Read, Bash, Write, Edit](https://github.com/maxwell2732/claudecode-research-harness-workflow/blob/HEAD/skills/session-control/SKILL.md)
- [License: MIT](https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/session-control)

## Features

- **Resume and fork switching:** Changes the active session to either resume an existing one or branch into a fork based on the flag passed to /work.
- **Session state file updates:** Keeps the session.json file in step with the chosen resume or fork action.
- **Session event logging:** Records each session change as an entry in a session.events.jsonl log.
- **Scripted execution step:** Runs a shell script with the workflow's arguments to perform the session update.
- **Post-update verification:** Checks that both session.json and session.events.jsonl reflect the change after the script runs.
- **Scoped internal use:** Explicitly limited to workflow session control, excluding user accounts, login and app state.

## Good for

- Resume the previous research session when running /work with the resume flag
- Branch off a new session from an existing one using the fork flag
- Check that session state files were updated after a /work switch
- Review the session event log for a workflow run

## Install

### Claude Code

This skill ships in the `claudecode-research-harness-workflow` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add maxwell2732/claudecode-research-harness-workflow
/plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow
```

Or copy only this skill to `~/.claude/skills/session-control`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/session-control &&
cp -R "$tmp/skills/session-control" ~/.claude/skills/session-control &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/session-control` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/session-control` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/session-control &&
cp -R "$tmp/skills/session-control" ~/.agents/skills/session-control &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/session-control` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/session-control` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/session-control &&
cp -R "$tmp/skills/session-control" ~/.cursor/skills/session-control &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/session-control` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/maxwell2732/claudecode-research-harness-workflow.git --path skills/session-control
```

Or copy the folder to `~/.gemini/skills/session-control` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/session-control`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/session-control &&
cp -R "$tmp/skills/session-control" ~/.copilot/skills/session-control &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/session-control` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git
```

Then copy `claudecode-research-harness-workflow/skills/session-control` into your agent's skills folder as `session-control`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Session control trigger?

It is tied to the /work command's --resume and --fork flags. It is marked as internal and is not meant for general session or login management.

### What files does Session control change?

It updates session.json and appends to session.events.jsonl.

### Does Session control need any special tools?

Its allowed tools are Read, Bash, Write and Edit.

### Is Session control available for other AI clients?

The content ties it to Claude Code and the Claude Code plugin marketplace, so no other clients are confirmed.

### How do I install Session control in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/session-control to use it in all your projects, or to .claude/skills/session-control in one project. Or install the claudecode-research-harness-workflow plugin, which includes it: /plugin marketplace add maxwell2732/claudecode-research-harness-workflow, then /plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow.

### Does Session control run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Session control?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Session control?

The closest alternatives to Session control are Session state, Session, Ck, Scan sessions and learn and Session init.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Session state](https://ai-powered.com/skills/session-state): Session state is an open-source agent skill for developer tools.
- [Session](https://ai-powered.com/skills/session-maxwell2732): Session is an open-source agent skill for developer tools.
- [Ck](https://ai-powered.com/skills/ck): Ck is an open-source agent skill for developer tools.
- [Scan sessions and learn](https://ai-powered.com/skills/scan-sessions-and-learn): Scan sessions and learn is an open-source agent skill for developer tools.
- [Session init](https://ai-powered.com/skills/session-init): Session init is an open-source agent skill for developer tools.
- [Desk open](https://ai-powered.com/skills/desk-open): Desk open is an open-source agent skill for developer tools.
- [Take over resume](https://ai-powered.com/skills/take-over-resume): Take over resume is an open-source agent skill for developer tools.
- [Session hardening](https://ai-powered.com/skills/session-hardening): Session hardening is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/session-control
