# Review AI Replies Truncated by Output Limits

> Review saved OpenAI responses and report Chat Completions choices ended by length and Responses records incomplete at max_output_tokens. Names findings by line; it does not judge answers or recommend retries.

Review AI Replies Truncated by Output Limits is a paid AI agent skill on Agensi by Shogun Labs, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Shogun Labs](https://www.agensi.io/creators/shota-nakahira)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/review-ai-replies-truncated-by-output-limits
- Tags: llm-ops, openai, debugging, jsonl, python

## About this skill

Use this local command after saving one OpenAI response object as JSON, or one response per line as JSONL. It reads the file and reports which records ended because of an output limit, without judging the answers.

### What it reports
- Chat Completions choices whose `finish_reason` is `length`.
- Responses API records with `status: incomplete` and `incomplete_details.reason: max_output_tokens`.
- Each finding includes the response ID, the choice index when present, whether answer text exists, and its character count.
- Unknown ending reasons are named and kept, not dropped.
- Malformed JSONL rows are named by line number while valid rows still appear.
- Valid JSON whose shape is not a supported API response is counted separately as an unreadable response record.

### How it works
1. Run `python3 scripts/review_replies.py <file>` on a local JSON or JSONL file of OpenAI response records.
2. Read the counts (records read, truncated or unknown endings, bad rows, unreadable records) and one line per finding. Add `--format json` for machine-readable output.

### What it does not do
It does not judge whether an answer is correct, whether it sounds complete, or whether it should be retried. It does not infer why a limit was reached. It makes no API calls, connects to no network, and does not change the input file. `Records read` counts only recognized response records; if none are recognized, the command exits with status 2.

### Requirements
Python 3.9+. Input is UTF-8 JSON or JSONL, at most 5 MiB.

## Requires

- Python 3.9+

## Known limitations

Processes local UTF-8 files only. Does not assess content accuracy or handle retries. Requires specific OpenAI API response schemas to function.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Review AI Replies Truncated by Output Limits skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help manage large AI response logs?

This skill identifies rows in your local OpenAI API records where the generation was cut off due to token limits. It also flags malformed JSONL rows and reports the text length and ending metadata for every recognized record.

### What specific files or software do I need to use this skill?

You need to provide a local JSON or JSONL file containing OpenAI Chat Completions or Responses API data. The file must be UTF8 encoded and the skill requires Python 3 to process the records locally.

### What kind of reports or output formats does the skill generate?

The skill provides a console report by default, but you can also request a structured JSON output. It specifically identifies finish reasons like length or max output tokens and lists the line numbers for any invalid data found.

### Why should I use this instead of just asking an AI to check my logs?

It runs locally and reads only the fields the APIs document, so it gives the same answer every time. It reports the ending reason for each record by line; it makes no API calls and does not change your files. It does not judge the answers or decide whether to retry.

### What are the limitations of the auditing process?

The skill does not assess the correctness of the content or provide logic to retry failed generations. It is also limited to local UTF8 files and specific OpenAI response shapes, and it will not process files that are empty or oversized.

### How do I direct my agent to start the review process?

You can ask your agent to run the script command targeting your specific local JSON or JSONL file. For example, you can tell the agent to review a file for truncated replies and specify if you want the results in a structured JSON format.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
