Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Session Logger

Extract the user-side prompt history from noisy Codex session JSONL files.

Session Logger preview

session-logger packages a Codex skill and a small Python extractor that turn a raw session archive into something you can actually reuse:

  • a clean Markdown prompt log
  • a machine-readable JSONL export
  • separate summaries for oversized prompts

It is useful when you want to reconstruct intent from a long agent session without digging through tool calls, wrappers, or assistant chatter.

Why This Exists

Most agent session archives are technically complete but practically unusable. The user intent is buried under:

  • tool call noise
  • AGENTS injections and environment wrappers
  • heartbeat and subagent markers
  • base64 image payloads
  • long prompts that are too big to skim quickly

This repo keeps the useful layer: what the user actually asked for, in order.

What It Produces

  • prompt-log.md: a chronological Markdown log of user prompts
  • prompt-log.jsonl: structured prompt records for scripts or follow-up analysis
  • long-prompts/: one summary file per oversized prompt

Each prompt record includes:

  • timestamp
  • original JSONL line number
  • word count
  • attached image count
  • detected file mentions

Quick Start

python3 scripts/extract_user_prompt_log.py \
  demo/demo-session.jsonl \
  --out-dir ./tmp/session-archive \
  --long-threshold 60 \
  --json

Then inspect:

  • tmp/session-archive/prompt-log.md
  • tmp/session-archive/prompt-log.jsonl
  • tmp/session-archive/long-prompts/

The bundled example output under examples/session-archive/ was generated with the same --long-threshold 60 setting.

Install As A Skill

  1. Copy this folder into your Codex skills directory as session-logger.
  2. Reload your Codex client if needed.
  3. Use session-logger when you need a reusable prompt archive from a raw session file.

Example:

Use session-logger on this Codex automation run and produce a compact prompt archive.

Repo Layout

  • SKILL.md: installable skill instructions
  • agents/openai.yaml: portable UI metadata
  • scripts/extract_user_prompt_log.py: extractor
  • demo/demo-session.jsonl: synthetic sample session input
  • examples/session-archive/: generated sample output from the demo input
  • assets/preview.png: truthful visual of the workflow and output shape

Demo Notes

The bundled demo uses synthetic prompts only. No real user sessions, browser state, personal notes, or private thread data are included.

Security And Privacy

  • no tokens, cookies, or credentials
  • no raw personal session exports
  • no browser profiles or synced notes
  • no private local machine paths in the bundled demo artifacts

The tool is intentionally conservative about what it copies forward from a session file.

License

Apache-2.0

About

Extract compact prompt logs from Codex session JSONL files.

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages