Hmbown/CodeWhale · error
Compaction summary response was unusable: a placeholder was…
Error message
Compaction summary response was unusable: a placeholder was returned.
What it means
Compaction asks the model to summarize the session history, then validates the summary before replacing history. This error means the model's summary response matched a known placeholder pattern (e.g. "n/a", "i cannot provide a summary"), so it carries no usable content. The library refuses to overwrite session history with a placeholder.
Solutions
- Inspect the raw provider response for the summary request to confirm the model actually returned a refusal/placeholder.
- Retry compaction — transient model confusion often resolves on a second request.
- Strengthen or fix the summary prompt so the model produces a real summary (clear instruction to summarize the conversation).
- Switch to a model that reliably follows the summary instruction.
- Report/persist the original conversation — this error intentionally leaves history untouched.
Example fix
// model returned a placeholder summary let summary = "I can't provide a summary"; // after: prompt asks for an explicit structured summary "Summarize the conversation above in 5-10 sentences. Do not refuse or reply with a placeholder."
Defensive patterns
Strategy: validation
Validate before calling
fn is_placeholder_summary(t: &str) -> bool {
matches!(t.trim().to_lowercase().as_str(), "na" | "n/a" | "not available" | "i cannot provide a summary" | "i can't provide a summary" | "unable to provide a summary")
} Type guard
if is_placeholder_summary(&summary_text) { /* treat as unusable */ } Try / catch
match compaction::summarize(&history) {
Err(e) if e.to_string().contains("placeholder was returned") => retry_with_stronger_prompt(),
Err(e) => return Err(e),
Ok(summary) => apply(summary),
} Prevention
- Use a model known to follow summary instructions
- Include an explicit 'do not refuse' clause in the summary prompt
- Log the raw summary response for diagnosis
- Keep the original conversation intact until the summary validates
When it happens
Trigger: A compaction/summary request completes and the returned text, lowercased and trimmed, equals one of the placeholder strings such as "na", "not available", or "i cannot/can't/unable to provide a summary".
Common situations: A small or heavily quantized local model fails to follow the summary prompt and answers with a refusal or empty placeholder; a provider router strips the real content; a prompt template change makes the summary instruction unclear so the model declines.
Related errors
- Compaction returned a tool call instead of a completed…
- Compaction coverage floor: a last-round user message was…
- Compaction coverage floor: checkpoint receipt was dropped…
- Compaction coverage floor
- Compaction coverage floor: last-round assistant output was…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/aee4326a6a60dab6.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/compaction.rs:1536
.to_ascii_lowercase();
if normalized.is_empty() {
anyhow::bail!(
"Compaction summary response was unusable: only whitespace or punctuation was returned."
);
}
if matches!(
normalized.as_str(),
"no summary available"
| "summary unavailable"
| "no summary"
| "n/a"
| "na"
| "not available"
| "i cannot provide a summary"
| "i can't provide a summary"
| "unable to provide a summary"
) {
anyhow::bail!("Compaction summary response was unusable: a placeholder was returned.");
}
Ok(())
}
/// Drop the oldest history message before retrying an over-window summary
/// request (Codex parity: `history.remove_first_item()`), plus any tool
/// results the removal orphans — strict providers reject unpaired results.
fn drop_oldest_history_messages(messages: &mut Vec<Message>) {
if messages.len() <= 1 {
return;
}
messages.remove(0);
while messages.len() > 1
&& messages[0]
.content
.iter()
.any(|block| matches!(block, ContentBlock::ToolResult { .. }))
{View on GitHub (pinned to 73e0f67d83)