coleam00/Archon · error

Project "${projectName}" could not be updated — it appears t

Error message

Project "${projectName}" could not be updated — it appears to have been removed. Use /register-project to re-create it.

What it means

Returned when updating a project's path fails because the project row no longer exists: CodebaseNotFoundError was thrown, meaning the codebase was deleted between the initial fetch and the UPDATE (logged as project.update_failed). The message directs the user to re-register the project with /register-project; this is deliberately the only case labeled 'removed' — DB operational errors get a different message.

Source

Thrown at packages/core/src/orchestrator/orchestrator-agent.ts:3462

  }

  // Find existing codebase by name
  const existing = await codebaseDb.listCodebases();
  const codebase = existing.find(c => c.name.toLowerCase() === projectName.toLowerCase());

  if (!codebase) {
    return `Project "${projectName}" not found. Use /register-project to create it.`;
  }

  try {
    await codebaseDb.updateCodebase(codebase.id, { default_cwd: newPath });
  } catch (err) {
    getLog().warn({ err: err as Error, codebaseId: codebase.id, newPath }, 'project.update_failed');
    // Row gone (deleted between the fetch above and the UPDATE) is the only
    // case where "removed" is the honest answer; anything else is an
    // operational DB failure and should say so instead of blaming data state.
    if (err instanceof codebaseDb.CodebaseNotFoundError) {
      return `Project "${projectName}" could not be updated — it appears to have been removed. Use /register-project to re-create it.`;
    }
    return `Project "${projectName}" could not be updated — database error. Please try again.`;
  }
  getLog().info(
    { name: projectName, oldPath: codebase.default_cwd, newPath, id: codebase.id },
    'project.update_completed'
  );
  return `Project "${projectName}" updated.\nOld path: ${codebase.default_cwd}\nNew path: ${newPath}`;
}

/**
 * Handle /remove-project command.
 * Deletes a registered project from the database.
 */
async function handleRemoveProject(message: string): Promise<string> {
  const { args } = commandHandler.parseCommand(message);
  if (args.length < 1) {
    return 'Usage: /remove-project <name>';

View on GitHub (pinned to 0773b97458)

Solutions

  1. Re-create the project with `/register-project` pointing at the new path.
  2. Confirm the project was intentionally removed (`/list-projects` or equivalent) before re-registering.
  3. Coordinate with other operators to avoid concurrent register/unregister and update operations on the same project.

Example fix

// before
/update-project myapp /new/path   # row deleted mid-update
// after
/register-project myapp /new/path
Defensive patterns

Strategy: try-catch

Validate before calling

// Before updating, re-fetch and confirm the row still exists:
const codebase = await codebaseDb.getCodebaseById(id);
if (!codebase) console.warn(`Project '${name}' was removed; re-register with /register-project`);

Try / catch

try {
  await updateProjectPath(id, newPath);
} catch (err) {
  if (err instanceof codebaseDb.CodebaseNotFoundError) {
    console.warn(`Project removed — re-register it with /register-project at ${newPath}`);
  } else throw err;
}

Prevention

When it happens

Trigger: An orchestrator command (via the orchestrator agent) moves/updates a project's default_cwd while, concurrently, the codebase row is deleted (unregister-project, another operator, or a cleanup job), so the UPDATE hits a missing row.

Common situations: Two operators managing the same project simultaneously; a cleanup/unregister workflow racing a path update; deleting the project in another session while an update is in flight.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/ffbb6bce217377b5. Report an issue: GitHub.