session-control

Apply resume or fork flags to update session.json and session.events.jsonl files.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/lane2077/claude-code-harness-zh --skill session-control-lane2077
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-control
Source: https://github.com/lane2077/claude-code-harness-zh/tree/main/codex/.codex/skills/session-control
Command: npx skills add https://github.com/lane2077/claude-code-harness-zh --skill session-control-lane2077

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates the management of /work sessions by applying resume and fork flags and updating local session state files so that workflow progress stays consistent.

Core Features & Use Cases

  • Resume the latest /work session and switch to it.
  • Fork a new /work session from an existing one with an optional reason.
  • Update session.json and session.events.jsonl to reflect the current state.

Quick Start

Trigger the skill in your workflow to apply --resume or --fork and have session.json and session.events.jsonl updated accordingly.

Frequently Asked Questions about session-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resume a coding session and update its state files in bash workflows?

To resume a coding session, use the --resume flag to switch to the latest /work session. This updates session.json and session.events.jsonl files to reflect the current state, ensuring workflow progress stays consistent.

Can I fork a new work session from an existing one with a specific reason?

Yes, you can fork a new work session from an existing one by applying the --fork flag. The workflow supports an optional --reason argument to document the context, updating session state files accordingly.

What is the best way to automate state management for /work sessions?

Automating /work session state management is best handled by executing bash scripts that parse workflow variables and apply resume or fork flags. This writes updated JSON state files to keep session progress consistent.

Does session-control require any external dependencies to manage workflow state?

No, session-control has zero external dependencies. It operates internally by reading workflow variables and executing a bash script to update session.json and session.events.jsonl directly.

Why are my workflow session state files not updating when I resume coding?

Workflow session state files fail to update when the bash script lacks proper arguments or encounters execution errors. The skill reports these errors to stderr, preventing inconsistent state in session.json.