coleam00/Archon · error
Project "${projectName}" could not be updated — database err
Error message
Project "${projectName}" could not be updated — database error. Please try again. What it means
The fallback message when a project path update fails for any reason other than the row being missing — i.e. an operational database error (connection failure, constraint violation, timeout) during the UPDATE in the orchestrator agent. It is intentionally distinct from the 'removed' message so operational DB problems are not misreported as data-state problems.
Source
Thrown at packages/core/src/orchestrator/orchestrator-agent.ts:3464
// 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
- Retry the update as the message suggests — transient DB failures often resolve on retry.
- Check the structured log event project.update_failed (with the error object) for the actual DB error.
- Verify database connectivity and health (is the server up? connection limits? locks?).
- If schema-related, run pending migrations/checks, then retry.
Example fix
// before pg_isready -h localhost -p 5432 # no response // after systemctl start postgresql # or restore connectivity /update-project myapp /new/path
Defensive patterns
Strategy: retry
Validate before calling
import { execSync } from 'node:child_process';
// cheap health probe before issuing the update:
try { execSync('pg_isready', { stdio: 'pipe' }); } catch { throw new Error('Database unreachable; fix connectivity before updating the project'); } Try / catch
let lastErr: unknown;
for (let attempt = 0; attempt < 3; attempt++) {
try { await updateProjectPath(id, newPath); return; }
catch (err) {
if (err instanceof codebaseDb.CodebaseNotFoundError) throw err;
lastErr = err;
await sleep(2 ** attempt * 250);
}
}
throw lastErr; Prevention
- Verify database health (pg_isready, connection limits) before project mutations.
- Keep retry-with-backoff around transient DB operations.
- Monitor project.update_failed log events for recurring DB errors.
- Keep schema migrations current on the database the instance points at.
When it happens
Trigger: The UPDATE of the codebase's default_cwd throws any error that is not CodebaseNotFoundError: database unreachable, connection pool exhausted, SQLite lock contention, schema/constraint failure, or transient network partition to PostgreSQL.
Common situations: Database server restarted or unreachable mid-command; another process holding a write lock on the codebases table; disk full on the database host; running against a stale schema missing a newly added column.
Related errors
- Project "${projectName}" could not be updated — it appears t
- Cannot create worktree: database lookup failed. Error: ${res
- Cannot create worktree: repository registration failed. Erro
- Failed to access database: ${err.message} Hint: Check that D
- Failed to create the workflow run: ${(error as Error).messag
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/6a2f544786179b56.
Report an issue: GitHub.