session-processes

Technical guidance for managing the worker processes behind coding-agent sessions. These workers run in Docker containers and manage the agent command line, terminal, file watching, and event updates.

In plain words
What is it for?
Starting, interrupting, or stopping the agent; sending input; opening a terminal; watching files; scanning the file tree; receiving events; and checking worker health.
Why use it?
It gives developers the project-specific endpoints and behavior needed to control sessions reliably. It also clarifies which services belong to session workers and which run separately.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nikzlabs/shipit/session-processes
Any agent
npx skills add nikzlabs/shipit --skill session-processes
Clone the repo
git clone --depth 1 https://github.com/nikzlabs/shipit

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.01613
Opus 5 $0.00033 $0.00807
Sonnet 5 $0.00013 $0.00323
Haiku 4.5 $0.00007 $0.00161

Measured 2d ago against content hash 034683bfdcda, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-processes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/session-processes/SKILL.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Worker Processes

Each session runs in a Docker container with a Fastify server (port 9100) that manages the agent CLI, file watcher, and terminal. Preview/dev servers are not among them — they moved to Docker Compose under the orchestrator's ServiceManager. The orchestrator communicates with session workers via HTTP (commands) and SSE (events).

Session Worker

src/server/session/session-worker.ts — Fastify server running inside each container.

Endpoints

Method Path Purpose
POST /agent/start Start Claude with prompt, images, system prompt
POST /agent/interrupt Graceful interrupt (Ctrl+C)
POST /agent/kill Force terminate
POST /agent/stdin Write to agent stdin (answer questions)
POST /terminal/start Start interactive shell
POST /terminal/input Write to terminal
POST /terminal/resize Resize terminal
POST /files/watch Start file watcher (idempotent)
POST /files/unwatch Stop file watcher
GET /files/tree Scan file tree
GET /events SSE event stream
GET /health Health check

SSE Event Stream

The /events endpoint is a long-lived SSE connection. The worker broadcasts events from all managed processes:

Event Source Data
agent_event Claude CLI Parsed NDJSON agent events
agent_done Claude CLI Exit code
agent_error Claude CLI Error message
agent_auth_required Claude CLI Auth URL
agent_log Claude CLI Non-JSON output lines
terminal_data Terminal Output data
terminal_exit Terminal Exit code
file_changes FileWatcher Changed file paths

On SSE connect (or reconnect), the worker replays current state:

  • If terminal is alive -> sends empty terminal_data signal

Note: Preview/dev servers are now managed by Docker Compose via ServiceManager in the orchestrator, not inside the session worker. See service-manager.ts and compose-generator.ts.

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 159 lines · 66 tokens per session scan A 034683bfdcda

Subscribe to this mod's changes

session-processes is a skill published in the GitHub repository nikzlabs/shipit (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,613 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

lanes-sessions

Use when managing Lanes issues or driving Claude Code sessions through the lanes MCP tools — creating issues, starting/stopping/inspecting sessions, batch-launching work across worktrees, reading terminal output, attaching labels and components by UUID, or moving issues across the backlog/todo/in-progress/done…

lanes-sh/app · 99 tokens

lanes-forms

Use when the user wants a form backend or contact form set up (a live POST endpoint that captures submissions and emails them), OR wants an agent to fill in / submit to a form on their behalf. Lanes Forms creates and manages hosted form endpoints from Claude Code. Triggers on "set up a contact form", "provision a…

lanes-sh/app · 105 tokens

github-lanes-bridge

Use when bridging GitHub and Lanes — importing GitHub issues into Lanes for local Claude Code execution, batch-spawning sessions per ticket, decomposing one GitHub issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, follow-up issues) back to GitHub. Triggers on…

lanes-sh/app · 161 tokens

linear-lanes-bridge

Use when bridging Linear and Lanes — importing Linear issues into Lanes for local Claude Code execution, batch-spawning sessions per Linear ticket, decomposing one Linear issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, status updates) back to Linear. Triggers on…

lanes-sh/app · 142 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

trellis-brainstorm

Guides collaborative requirements discovery before implementation. Creates task directory, seeds PRD, asks high-value questions one at a time, researches technical choices, and converges on MVP scope. Use when requirements are unclear, there are multiple valid approaches, or the user describes a new feature or complex…

mindfold-ai/Trellis · 65 tokens