tinyhumansai/openhuman · error · anyhow::Error
first non-empty line of
Error message
first non-empty line of {} (line {}) is not a valid _meta object: {err} What it means
Transcript replay (Phase A append-only log) requires the first non-empty line of a .jsonl session file to be the `_meta` header object. That line failed to parse as a valid `_meta` JSON object, so the file is not a well-formed transcript — usually a truncated, hand-edited, or pre-Phase-A format file.
Solutions
- Inspect the flagged line in the transcript file and fix or remove the malformed `_meta` header
- Restore the file from a backup or earlier session snapshot if it is truncated
- Start a fresh transcript if the history is unrecoverable and the old file is not needed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/agent/harness/session/transcript.rs:1005 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/468d588ce733be66.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/harness/session/transcript.rs:1005
let mut messages: Vec<ChatMessage> = Vec::new();
let mut compactions_replayed = 0usize;
let mut interrupted_skipped = 0usize;
// Append-only log replay (Phase A): the first non-empty line MUST be the
// `_meta` header; subsequent lines are messages, `compaction` records
// (which *replace* the accumulated context), interrupted partials (skipped
// for the model-context path), or refreshed `_meta` lines (last wins).
let mut seen_first = false;
for (line_no, line) in raw.lines().enumerate() {
let line = line.trim();
if line.is_empty() {
continue;
}
if !seen_first {
seen_first = true;
let ml: MetaLine = serde_json::from_str(line).map_err(|err| {
anyhow::anyhow!(
"first non-empty line of {} (line {}) is not a valid _meta object: {err}",
path.display(),
line_no + 1,
)
})?;
meta = Some(meta_from_payload(ml.meta));
continue;
}
match classify_line(line) {
Ok(LineKind::Meta(ml)) => {
// Refreshed cumulative meta — last one wins.
meta = Some(meta_from_payload(ml.meta));
}
Ok(LineKind::Compaction(cl)) => {
// Reduction record: the reduced context REPLACES everything
// accumulated so far, exactly reproducing the old full-rewrite.
let replacement: Vec<ChatMessage> =View on GitHub (pinned to 7491200858)