Hmbown/CodeWhale · error
continual harness has no entry `{id}`
Error message
continual harness has no entry `{id}` What it means
Thrown by `continual_harness::remove` (crates/tui/src/continual_harness.rs:147). The function trims the id, loads the workspace harness state under a cross-process write lock, and searches `entries` for an exact id match. When no entry carries that id it bails before any mutation, so the state file and journal are untouched. Entry ids are `h_<uuid>` strings minted by `refine`.
Source
Thrown at crates/tui/src/continual_harness.rs:147
Ok(entry)
})
}
/// Remove one exact entry. Returning the removed entry makes deletion
/// receipts useful without re-reading the state file.
pub fn remove(workspace: &Path, id: &str) -> Result<HarnessEntry> {
let id = id.trim();
if id.is_empty() {
bail!("continual harness entry id cannot be empty");
}
let path = state_path_for_write(workspace)?;
with_write_lock(&path, || {
let mut state = load_state(&path)?;
let index = state
.entries
.iter()
.position(|entry| entry.id == id)
.ok_or_else(|| anyhow!("continual harness has no entry `{id}`"))?;
let removed = state.entries.remove(index);
state.schema_version = SCHEMA_VERSION;
save_state(&path, &state)?;
// Removal is the edit most worth recording: the entry is gone from
// state, so the journal is the only place its content survives.
append_journal(&path, "remove", &removed)?;
Ok(removed)
})
}
/// Render the bounded, lower-authority state that follows the stable prompt
/// prefix. Broken or future-version state is intentionally omitted rather
/// than becoming a prompt-injection path.
#[must_use]
pub fn prompt_block(workspace: &Path) -> Option<String> {
let overview = overview(workspace).ok()?;
if overview.entries.is_empty() {
return None;View on GitHub (pinned to 8880682c63)
Solutions
- Call `continual_harness::overview(workspace)` and pass an id that exists in `entries` right now
- If removal should be idempotent, treat this specific error as success by matching the 'continual harness has no entry' message before propagating
- Check the harness journal to confirm the entry was not already removed under the same id
Example fix
// before
let removed = continual_harness::remove(&workspace, &id)?;
// after
match continual_harness::remove(&workspace, &id) {
Ok(entry) => { /* use removal receipt */ }
Err(err) if err.to_string().contains("continual harness has no entry") => {
// already removed; treat as success
}
Err(err) => return Err(err),
} Defensive patterns
Strategy: validation
Validate before calling
let overview = continual_harness::overview(&workspace)?;
let id = id.trim();
if !overview.entries.iter().any(|entry| entry.id == id) {
anyhow::bail!("refusing to remove unknown harness id {id}");
}
continual_harness::remove(&workspace, id)?; Type guard
fn harness_entry_exists(
overview: &continual_harness::HarnessOverview,
id: &str,
) -> bool {
overview.entries.iter().any(|entry| entry.id == id.trim())
} Try / catch
match continual_harness::remove(&workspace, &id) {
Ok(entry) => { /* removal receipt */ }
Err(err) if err.to_string().contains("continual harness has no entry") => {
// idempotent no-op: entry already gone
}
Err(err) => return Err(err),
} Prevention
- Re-run overview() immediately before remove(); ids go stale when sessions share a workspace
- Trim ids before use and expect the `h_<uuid>` shape
- Design removal flows to be idempotent so a double-remove is harmless
When it happens
Trigger: Calling `remove(workspace, id)` twice with the same id (the first call already deleted it); passing an id taken from an older `overview()` snapshot that another session or process has since removed; a typo'd or differently-cased id.
Common situations: A harness tool/UI retries removal after a timeout; two Codewhale sessions share one workspace state file; a cleanup script replays recorded ids against state that has changed.
Related errors
- DSH is not connected; run `{CLI_COMMAND} connect`
- DSH is not connected; run `{CLI_COMMAND} connect` first
- overlay is stale; run `{CLI_COMMAND} update` before install-
- no bundle is installed
- ${name} is unavailable in Workflow scripts: runs must be det
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/576684fb878a0342.
Report an issue: GitHub.