## TL;DR
Strip comments before you split statements: Trino information schema output with multiline comments breaks naive parsers that split on semicolons or read line by line, so parse the result set as rows from the driver instead of scraping formatted text. The output is not malformed; the text rendering contains comment text with characters the parser treats as structure. Structured rows from the driver have no such ambiguity.

```text
parser failed on trino information schema output with multiline comments error
```

## Use this when
- The check or run fails with this symptom: a parser fails on Trino information schema output with multiline comments.
- You are working on an agent workflow reading Trino information schema through CLI or text output and the failure repeats on the same data or configuration.
- You need the failing rows, rule, or stage isolated before changing thresholds or code.

## Not for this skill when
- Structured driver output that still fails, which points at a driver version issue rather than text parsing.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Reproduce the output and find the comment block that breaks the parse. Verify: the offending rows contain multiline comment text
2. Switch the read to the Trino driver or a JSON output format for the information schema query. Verify: rows arrive as typed values
3. If text output is unavoidable, strip block comments with a comment aware pass before splitting. Verify: the cleaned output parses without dropping data rows
4. Compare the parsed table and column counts against a direct count query. Verify: counts match exactly
5. Record the read method with the workflow. Verify: future runs use the structured path

## Variant phrasings
### parser failed trino information schema multiline comments
The shorter phrasing focused on the named failure.
### trino information schema output parse error agent
The symptom phrasing a searcher tries next.
### trino catalog output parsing fix
The variant naming the failing stage or tool directly.

Compatibility: Trino CLI and JDBC or Python drivers, information schema queries, agent parsing workflows

## Why it happens
CLI output is a human rendering: comments stored in the catalog are printed raw, including newlines and delimiters. Parsers that assume one row per line or semicolon termination break on real catalog content, which is why the same query works in a driver and fails as text.

## Edge cases / pitfalls
- Comments can contain the delimiter and the comment terminator in quoted form; a comment aware pass beats a regex for reliability.
- Prefer driver output for every catalog read an agent depends on; text scraping should be a last resort with a fallback check.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_QICYTQgaZJy1nqsh7v8l9A
