diff --git a/src/activity_core/rules/executor.py b/src/activity_core/rules/executor.py index a9ecf0a..159bde1 100644 --- a/src/activity_core/rules/executor.py +++ b/src/activity_core/rules/executor.py @@ -156,9 +156,13 @@ def _execute( raw_output = llm_client.complete(retry_prompt, model=instr.model, config=llm_config) task_specs, report, error = _validate_output(raw_output, instr) if error: + # Truncate to keep log volume bounded but long enough to see the + # actual JSON shape mismatch (typical reports are <2KB). + preview = (raw_output or "")[:2000] logger.warning( - "instruction_output_error: instruction=%r, prompt_hash=%s, error=%s", - instr.id, prompt_hash, error, + "instruction_output_error: instruction=%r, prompt_hash=%s, " + "error=%s, raw_output_preview=%r", + instr.id, prompt_hash, error, preview, ) return _empty_result(instr, prompt_hash=prompt_hash)