Hmbown/CodeWhale · error
Compaction lifecycle task ended before acknowledgement
Error message
Compaction lifecycle task ended before acknowledgement
What it means
Sentinel from acceptance_rx.await.map_err in trigger_compaction: the spawned compaction lifecycle task (permit claim + Op::CompactContext send + spawn_claimed_turn_monitor) exited before writing its acknowledgement to the channel. Receiver-side failure means the producer task died — panic, abort, or shutdown — so the compaction was never dispatched to the engine.
Source
Thrown at crates/tui/src/runtime_threads.rs:6487
current_thread.allow_shell,
current_thread.trust_mode,
policy.auto_approve(),
policy.permission,
configured_sandbox_mode,
);
let _sender = permit.send(op);
touch_lru(&mut active.lru, thread_id);
self.spawn_claimed_turn_monitor(
turn.clone(),
None,
engine.clone(),
ClaimedTurnKind::Compaction,
)
};
acceptance_rx
.await
.map_err(|_| anyhow!("Compaction lifecycle task ended before acknowledgement"))?
.map_err(anyhow::Error::msg)
}
#[cfg(test)]
pub fn events_since(
&self,
thread_id: &str,
since_seq: Option<u64>,
) -> Result<Vec<RuntimeEventRecord>> {
self.store.events_since(thread_id, since_seq)
}
pub(crate) async fn events_since_async(
&self,
thread_id: &str,
since_seq: Option<u64>,
) -> Result<Vec<RuntimeEventRecord>> {
let store = self.store.clone();View on GitHub (pinned to 0c42157ee5)
Solutions
- Look for a panic or early return in the compaction dispatch closure in the logs
- Confirm the engine op channel is open and the permit machinery is healthy
- Re-trigger the compaction after the root cause is fixed; the unacknowledged turn should have been cleaned up
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/tui/src/runtime_threads.rs:6487 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/ea3e6c8ee3aca6dd.
Report an issue: GitHub.