worker-session-mine

Mines terminal agent sessions for mechanical thrash and files follow-up tasks.

18|5|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Neko-Catpital-Labs/Invoker --skill worker-session-mine-neko-catpital-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worker-session-mine
Source: https://github.com/Neko-Catpital-Labs/Invoker/tree/main/skills/worker-session-mine
Command: npx skills add https://github.com/Neko-Catpital-Labs/Invoker --skill worker-session-mine-neko-catpital-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Fire-and-forget agent sessions (Claude, Codex, OMP) often waste tokens on mechanical thrash — repeated commands, excessive turns, and runaway token consumption — without anyone noticing. This Skill detects that waste and files a follow-up so the underlying prompts or skills can be fixed. ## Core Features & Use Cases - Multi-harness session discovery: Resolves Claude, Codex, and OMP sessions via Invoker task inventory using agentSessionId and agentName. - Thrash detection: Flags sessions exceeding thresholds such as 40+ assistant turns, 10M+ total tokens, or the same bash command repeated 5+ times. - Routed follow-ups: Files findings to catstack for skill prose issues or to Invoker for harness prompt issues, with strict rate caps (one follow-up per session hash per week). - Use Case: An operator enables the worker on a DO1 owner, and it periodically scans completed agent sessions, filing a follow-up PR proposal when a session burned 12M tokens repeating the same failing command. ## Quick Start Enable the worker-session-mine desired state from the Workers UI or run invoker-cli worker toggles --enable worker-session-mine on the DO1 owner.

Frequently Asked Questions about worker-session-mine

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

FAQPage Schema
How do I enable the worker-session-mine worker in Invoker?

Enable it through the Workers UI by toggling desired state, or run invoker-cli worker toggles --enable worker-session-mine. It should only be enabled on the DO1 owner, not on Mac owners by default.

What counts as thrash in an agent session?

Thrash is flagged when a session has 40 or more assistant or Codex turns, 10M or more cache-read tokens, 10M or more total tokens, or the same bash argv repeated 5 or more times. The catstack token_audit.py script can also flag sessions when CATSTACK_ROOT is set.

Which agent harnesses does session mining support?

It supports Claude, Codex, and OMP sessions. Claude sessions resolve via CLAUDE_CONFIG_DIR or ~/.invoker/claude-worker/projects, Codex via ~/.invoker/agent-sessions/*.jsonl, and OMP via *.omp.txt files.

Where do follow-up findings get filed?

Findings about skill prose, methodology, or hooks go to catstack PRs only. Findings about the Invoker harness prompt or product go to Invoker PRs only. The worker never merges follow-up PRs itself.

What are the rate limits for follow-up filings?

The worker caps output at one follow-up per session hash per week, a maximum of one per tick, and two per day. This prevents duplicate or noisy follow-up filings.

Can worker-session-mine be used for interactive reflection?

No. Interactive /reflect stays in catstack and must not be vendored into this repo. This worker only handles off-by-default mining of terminal fire-and-forget sessions.