Hmbown/CodeWhale · error · Error
Codewhale session produced no inspectable events.
Error message
Codewhale session produced no inspectable events.
What it means
After converting all source entries to timeline events, the importer checks that at least one event was produced. If conversion yielded zero events — e.g. every entry lacked usable text/blocks or was skipped — the session is deemed not inspectable and the import fails. This prevents rendering an empty timeline from a non-empty-looking snapshot.
Solutions
- Inspect entries in the session file and confirm each has text, message.text, or non-empty message.content blocks.
- Re-export the session with a compatible Codewhale version so fields match the importer's expected schema.
- Remove empty placeholder entries and re-import.
- Check for format drift: diff an old working export against the failing one.
Example fix
// before (entry converts to nothing)
{ "id": "e1", "kind": "user", "message": { "role": "user", "content": [] } }
// after
{ "id": "e1", "kind": "user", "message": { "role": "user", "content": [] }, "text": "hello" } Defensive patterns
Strategy: validation
Validate before calling
const hasConvertible = (s) => (s.journal?.entries ?? []).some(e => e.text || e.message?.text || (e.message?.content ?? []).length > 0);
Type guard
const hasText = (e) => typeof e?.text === 'string' || typeof e?.message?.text === 'string' || Array.isArray(e?.message?.content);
Try / catch
try { importSession(s); } catch (e) { if (e.message.includes('no inspectable events')) reportUnconvertibleSession(s); else throw e; } Prevention
- Ensure entries carry text or message.content blocks.
- Re-export after upgrading Codewhale to avoid schema drift.
- Avoid hand-editing session files; use the exporter.
- Dry-run parse and check for zero-entry results before import.
When it happens
Trigger: Importing a session whose journal entries/messages all fail conversion: entries with no id-derived event payload, no text, no message content blocks, or only entry kinds the converter ignores.
Common situations: Journal entries present but structurally empty (messages with empty content arrays and no text field); a snapshot written by an older/newer format where fields were renamed; hand-edited session files with blank entries.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Import exceeds the event limit.
- Import exceeds the event limit.
- Import exceeds the event limit.
- A managed, project or plugin connector already uses this…
- Antigravity import requires an agy_cli grant, not
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/2275e6696234254b.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tui/pet_watch/pet-native.js:2151
else {
const text = str(block.text) ?? '';
const operate = text.includes('codewhale:runtime_event');
const user = role === 'user' || role === 'User';
pushEvent(events, {
schemaVersion: 1, id: idBase, traceId: sessionId, parentId: parentEventId,
startTime: t.start, endTime: t.start, agentId,
name: operate ? 'operate_contract' : user ? 'user_message' : 'assistant_message',
category: operate ? 'orchestration' : user ? 'human' : 'communication',
model, provider, status: 'success',
attributes: { 'codewhale.entry_id': entryId, 'codewhale.seq': seq, role: role ?? 'unknown' },
payload: { text: clip(text) }, raw,
});
}
seq += 1;
}
}
if (!events.length)
throw new Error('Codewhale session produced no inspectable events.');
for (const event of events) {
if (event.openEnded && event.tool)
warnings.push(`Tool ${event.id} has no matching tool_result in this snapshot; duration remains unknown.`);
}
const base = events.reduce((m, e) => Math.min(m, e.startTime), events[0].startTime);
for (const event of events) {
event.startTime -= base;
event.endTime -= base;
}
const cost = obj(metadata.cost);
const sessionCost = num(cost.session_cost_usd);
const duration = Math.max(1, events.reduce((m, e) => Math.max(m, e.endTime, e.startTime), 0));
const uniqueWarnings = [...new Set(warnings)];
return {
id: sessionId,
name: titleOfSession(metadata, filename),
events,
duration,View on GitHub (pinned to 73e0f67d83)