Analyze every entry of a huge JSONL file with Claude Code subagents
- Posted
- by Sean Moriarity (@sean_moriarity)
- Last checked
- Method:
- How we verify
Evidence: Described by posterThe person describes what happened in words, without screenshots or video.
Outcome
Claude Code previewed the data, trimmed fields, defined a schema and ran hundreds of Haiku subagents over ~45 minutes so every entry in a large JSONL file was analyzed.
Agent
Prompt Recreated prompt
The source didn't share its exact prompt, so we wrote this from what it describes.
This JSONL file is too big to read by hand, but I want an agent to look at every entry. Define a common schema in a JSONL file to answer these questions: [QUESTIONS]. Test the schema on a small sample first and show me, then complete the analysis. Done when: every entry has a row in the output file, and the row count matches the input.
Try this in:
This prompt has blanks to fill in, like [QUESTIONS]. We'll copy it instead of filling it in, so you can edit it before you send.
The source used Claude Code, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.
Opens in a new tab. We don't see what you send.
These links are only a shortcut. We're not affiliated with OpenAI, Google or xAI, and your results may not match the source.
Optional stronger version
Our rewrite with extra checks. The poster didn't test it.
Goal: Analyze every entry of a huge JSONL file with subagents using a shared schema. Inputs (fill in or confirm): - The file - Questions to answer - Output location - Size of the file and machine limits Rules: - Define the schema first and confirm it. - Split the file into chunks; each subagent writes schema rows. - Validate every output row. - Aggregate results with counts. - Keep chunk size small enough that each subagent reads every line of its chunk. - Make each output row include the original line number so results can be traced. - Log failures with the line number and reason. - Answer each question from the aggregated rows, with counts and examples. - Save results per chunk so a crash doesn't lose work. - Spot-check 20 results by hand. - Report total lines processed vs file size. - Report run time and how many subagents ran. - Estimate time and cost before starting the full run. If you get stuck: If a chunk fails, retry it alone. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords. Verify before you finish: Check total rows processed equals entries. Output: Schema file, results JSONL and summary. Done when: every entry is analyzed and counted.
Source
https://x.com/sean_moriarity/status/2012220803023073539
Related cases
- Compare Claude Code, Codex and Gemini CLI on a 97k-message chat datasetRecreated promptEvidence: Described by poster
The poster gave the same 97k-message WeChat dataset to Claude Code, Codex and Gemini CLI as analysts and published results with an evaluation table.
Claude Code, OpenAI Codex CLI, Gemini CLI · Data · Source date:
- Find smarter buying patterns in office supply order history with Claude CodeRecreated promptEvidence: Described by poster
Alex Hillman had Claude Code go through Indy Hall's paper products order history to suggest buying patterns that avoid costly last-minute orders.
Claude Code · Data · Source date:
- Let a whole team self-serve data via an agent-written schema guideRecreated promptEvidence: Described by poster
Claude Code wrote a markdown guide to the company's data model and business terms from SQLMesh context and past queries; Hex's agent now handles the team's data requests. The team had posted a data analyst role, and the poster now thinks the role is 'completely dead'.
Claude Code, Hex agent · Data · Source date: