casp

Spawn codex app-server and emit JSONL events over stdio.

66|2|Updated Feb 18, 2015
One-click install
npx skills add https://github.com/tkersey/dotfiles --skill casp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: casp
Source: https://github.com/tkersey/dotfiles/tree/main/codex/skills/casp
Command: npx skills add https://github.com/tkersey/dotfiles --skill casp

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a deterministic JSONL proxy that spawns codex app-server and exposes an orchestration-friendly event stream. It enables programmatic control of Codex workflows, auto-handling approvals, forwarding tool calls, and mining sessions across multiple threads.

Core Features & Use Cases

  • Spawns and manages codex app-server as a subprocess, with a handshake (initialize -> initialized) and an experimentalApi: true flag.
  • Reads and writes JSONL messages over stdin/stdout to drive Codex and stream events in a structured, routeable form.
  • Auto-accepts approvals and forwards server-initiated tool requests to the orchestrator, returning responses deterministically.
  • Useful for orchestrating multi-threaded Codex experiments, automating tool calls, and building reproducible sessions via thread/turn metadata.

Quick Start

Use the casp skill to start the proxy and drive Codex:

  • Start: node scripts/casp_proxy.mjs from the casp skill directory (example: node ~/.dotfiles/codex/skills/casp/scripts/casp_proxy.mjs).
  • Optional: pass --cwd /path/to/workspace to control where codex app-server runs and where .casp/state.json is written.
  • Wait for a casp/ready event.

Frequently Asked Questions about casp

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

FAQPage Schema
How do I orchestrate codex app-server programmatically with auto-approval?

Use a JSONL proxy to spawn codex app-server, perform the initialize handshake with experimentalApi enabled, and auto-accept approvals while forwarding tool requests to your orchestrator for deterministic execution.

What is a JSONL proxy for codex app-server and how does it work?

A JSONL proxy is a Node-based subprocess manager that starts codex app-server, handles the initialize/initialized handshake, forwards stdin/stdout messages, and emits structured casp events over stdio for programmatic control.

Can I run multi-threaded Codex workflows and mine session data via thread APIs?

Yes, the proxy supports multi-threaded Codex workflows by routing requests through thread/* APIs, capturing thread/turn metadata, and emitting structured events to mine sessions across multiple concurrent threads.

How do I start the codex app-server proxy and control the working directory?

Run node scripts/casp_proxy.mjs from the skill directory, optionally passing --cwd /path/to/workspace to set where codex app-server executes and where the .casp/state.json file is written, then wait for the casp/ready event.

Does codex app-server require an experimental API flag for tool-forwarding?

Yes, the proxy performs the initialize handshake with experimentalApi set to true, which enables server-initiated tool requests to be forwarded to the orchestrator and responses returned deterministically over the JSONL stream.

Why are my codex app-server events not structured for orchestration?

Without a deterministic JSONL proxy, codex app-server does not emit routeable casp events; the proxy wraps the subprocess to structure approvals, tool calls, and session metadata into an orchestration-friendly event stream.