foolery: Skill for Codex

.agents/skills/investigate-foolery-leases/SKILL.md

investigate-foolery-leases is a skill for Codex from acartine/foolery. It costs 79 tokens per session (931 once invoked), scanned A, original, MIT.

A troubleshooting guide for investigating Foolery lease, session, and server logs. A lease is a temporary claim that lets an agent use a resource or continue a task.

In plain words
What is it for?
Use it to inspect recent logs, trace lease activity, compare the development and installed servers, and find likely causes of failed or incomplete agent turns.
Why use it?
It helps explain why an agent task stopped, rolled back, became stuck, left a lease open, or used the wrong runtime.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is acartine/foolery's own configuration. It tells Codex how to work on foolery itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything foolery configures →

Reuse

Borrowing it

Nothing to install: this file belongs to acartine/foolery. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/acartine/foolery/main/.agents/skills/investigate-foolery-leases/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/acartine/foolery

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for investigate-foolery-leases

README.md
[![agentmods](https://agentmods.dev/badge/skills/acartine/foolery/investigate-foolery-leases/github.svg)](https://agentmods.dev/skills/acartine/foolery/investigate-foolery-leases)
Your own site
<a href="https://agentmods.dev/skills/acartine/foolery/investigate-foolery-leases"><img src="https://agentmods.dev/badge/skills/acartine/foolery/investigate-foolery-leases/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for investigate-foolery-leases

Your own site · 80×15
<a href="https://agentmods.dev/skills/acartine/foolery/investigate-foolery-leases"><img src="https://agentmods.dev/badge/skills/acartine/foolery/investigate-foolery-leases.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 931 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00079 $0.00931
Opus 5 $0.00039 $0.00465
Sonnet 5 $0.00016 $0.00186
Haiku 4.5 $0.00008 $0.00093

Measured 12d ago against content hash 5320d3e73ef9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

investigate-foolery-leases 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 12d 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.

.agents/skills/investigate-foolery-leases/SKILL.md · 111 lines

How it starts

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

Investigate Foolery Leases

Use this skill to trace Foolery runtime behavior across lease lifecycle logs, interaction/session logs, and server logs.

When To Use It

  • The user asks whether a step type uses leases.
  • The user wants recent examples from the last 24-48 hours.
  • The user asks which agent ended a turn without calling next or rollback.
  • The user suspects a hung turn, dangling lease, or runtime mismatch between port 3000 and port 3210.
  • The user wants likely causes, not just raw log lines.

Log Roots

Use lsof -nP -iTCP:3000 -sTCP:LISTEN and lsof -nP -iTCP:3210 -sTCP:LISTEN only to confirm which process is live. The authoritative evidence is in the log roots.

Workflow

  1. Confirm the target repo slug and time window.
  2. Read _leases/*/leases.jsonl* for lease lifecycle events.
  3. Read per-session *.jsonl* interaction logs for session_start, beat_state, response, and session_end.
  4. If needed, read _server/*/console.log and server.jsonl* for child close, post-close beat state, retry, and invariant handling.
  5. Correlate by sessionId, beatId, knotsLeaseId, and timestamps.
  6. Produce findings with concrete examples and likely causes.

Core Checks

1. Lease Coverage

  • Find which interaction types and steps emit lease_create_*, lease_claim_binding_check, prompt_delivered, and lease_terminate_*.
  • Do not assume every step or interaction uses leases. Verify by code and logs.

2. Hung Or Open Turns

Flag sessions with:

  • prompt_delivered but no matching lease_terminate_succeeded
  • no session_end
  • continued response traffic after the last lease event

3. Completed Turns Without Progress

For each completed session with exitCode: 0:

  • compare beat_state.phase == "before_prompt" with the matching after_prompt
  • resolve the claimed step
  • verify the post-exit state moved to the expected next queue state or a prior queue state

Read the full file on GitHub · 111 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 111 lines · 79 tokens per session scan A 5320d3e73ef9

Subscribe to this mod's changes

investigate-foolery-leases is a skill published in the GitHub repository acartine/foolery (56 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 931 once invoked, about $0.0004 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-30.