coleam00/Archon · error
Cannot access repository at ${repoPath}: ${err.code ?? err.m
Error message
Cannot access repository at ${repoPath}: ${err.code ?? err.message}. Check permissions and disk health. What it means
resolveRunOverrideSpec parses a run-level model override given as a string. If the string is empty or only whitespace after trimming, there is no model to resolve, so it throws immediately. This guards against blank values arriving from environment variables or YAML mappings.
Source
Thrown at packages/adapters/src/community/forge/gitea/adapter.ts:506
*/
private async ensureRepoReady(
owner: string,
repo: string,
defaultBranch: string,
repoPath: string,
shouldSync: boolean
): Promise<void> {
// Check if directory exists
let directoryExists = false;
try {
await access(repoPath);
directoryExists = true;
} catch (error) {
const err = error as NodeJS.ErrnoException;
if (err.code !== 'ENOENT') {
// Real error - permission denied, I/O failure, etc.
getLog().error({ repoPath, errorCode: err.code, err }, 'repo_path_access_failed');
throw new Error(
`Cannot access repository at ${repoPath}: ${err.code ?? err.message}. ` +
'Check permissions and disk health.'
);
}
// ENOENT means directory doesn't exist - we'll clone below
}
if (directoryExists) {
if (shouldSync) {
getLog().info({ repoPath, defaultBranch }, 'repo_syncing');
const syncResult = await syncRepository(toRepoPath(repoPath), toBranchName(defaultBranch));
if (!syncResult.ok) {
getLog().error({ repoPath, defaultBranch }, 'repo_sync_failed');
throw new Error(
`Failed to sync repository to ${defaultBranch}. ` +
'Try /reset or check if the branch exists.'
);
}View on GitHub (pinned to 0773b97458)
Solutions
- Set the override to a non-empty value: a tier name, '@alias', or 'provider/model' string.
- Remove the empty override entry entirely so no override is applied for that tier.
- Check where the value comes from (env var, YAML, template) and fix the source that produced the blank.
- Guard at the call site: skip overrides whose trimmed value is empty.
Example fix
# before (YAML) modelOverrides: fast: "" # after modelOverrides: fast: "anthropic/claude-haiku-4"
Defensive patterns
Strategy: validation
Validate before calling
const entries = Object.entries(rawOverrides).filter(([, v]) => typeof v === 'string' && v.trim().length > 0); resolveRunModelOverrides(profile, Object.fromEntries(entries));
Try / catch
try {
resolveRunModelOverrides(profile, overrides);
} catch (e) {
if (e instanceof Error && e.message.includes('has an empty spec')) {
console.error('An override value is blank; unset it or give it a value.', e.message);
} else throw e;
} Prevention
- Filter out empty/whitespace override values before calling the API
- In CI, fail fast on env overrides that are set but empty
- In YAML, delete the key rather than leaving an empty value
- When templating configs, assert interpolated values are non-empty
When it happens
Trigger: Passing '' or ' ' as the rawSpec value in resolveRunModelOverrides — typically an unset-but-present env var (MODEL_OVERRIDE_fast=) or an empty YAML value like `fast:` with nothing after it.
Common situations: Environment variable defined with no value in shell profile or CI; YAML key left with an empty value after editing; templated config where a variable failed to interpolate, leaving an empty string.
Related errors
- Failed to sync repository to ${defaultBranch}. Try /reset or
- No chat in context
- Gitea API error: ${String(response.status)} ${response.statu
- Gitea API error: ${String(response.status)}
- Failed to read version: package.json is malformed
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/5b6f10a4651a0e92.
Report an issue: GitHub.