Relationships
#2813 model method run draws an empty report box when a report returns no markdown
Opened by skunk-ape · 9/30/2026· Shipped 10/1/2026
A model type's report runs after every method. The type-level reports field is a plain string[] (src/domain/models/model.ts:860), so a report can't be limited to certain methods. A report that has nothing to say for a method returns empty markdown.
model method run renders it anyway (src/presentation/renderers/model_method_run.ts:150-164). It prints the Report gutter line, a ── Report: <name> ─── header rule, the rendered empty markdown, and a closing rule.
For @swamp/gatorwalk-factory's work-item type, this puts an empty boxed report after every status, advance, dispatch and record_* call. The type attaches its summary report (work_item.ts:66), and the report returns { markdown: "" } for every method except summary (work_item_summary_report.ts:85). Driving agents end up grep-filtering every call, and in the gatorwalk trial on 2026-09-29 this helped cause a status read to be cut short.
Repro: any extension model type whose report returns { markdown: "", json: {} } for a method. Run swamp model method run <type> <method> ... and an empty report frame is printed.
Fix: in report_completed, skip rendering when e.markdown.trim() is empty. The report's JSON is still stored as it is today.
A possible follow-up, not needed for this fix: allow method scoping on model-type reports, reports: [{ name, methods: [...] }], mirroring the definition-level reports.require shape in src/domain/reports/report_selection.ts:26-32.
Done when: a report with empty markdown prints nothing in model method run output, a test covers it, and reports with content render as before.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.