coleam00/Archon · error
Failed to set up GitHub conversation - please try again
Error message
Failed to set up GitHub conversation - please try again
What it means
GitHubAdapter setup throws this when linking an existing conversation to its codebase fails with ConversationNotFoundError, meaning the conversation ID referenced during GitHub conversation setup no longer exists in the store. The adapter intentionally re-throws as a generic retryable message because conversation-to-codebase linking is a critical setup step that cannot proceed without it.
Source
Thrown at packages/adapters/src/forge/github/adapter.ts:1127
repoPath,
isNew: isNewCodebase,
} = await this.getOrCreateCodebaseForRepo(owner, repo);
// 6b. Link conversation to codebase (fixes #97)
if (isNewConversation) {
try {
await db.updateConversation(existingConv.id, {
codebase_id: codebase.id,
cwd: repoPath,
});
} catch (updateError) {
if (updateError instanceof ConversationNotFoundError) {
getLog().error(
{ conversationId: existingConv.id, codebaseId: codebase.id },
'github.conversation_codebase_link_failed'
);
// Re-throw as this is a critical setup step
throw new Error('Failed to set up GitHub conversation - please try again');
}
throw updateError;
}
}
// 7. Get default branch
let defaultBranch: string;
try {
const { data: repoData } = await this.withTokenRefresh(owner, repo, octokit =>
octokit.rest.repos.get({ owner, repo })
);
defaultBranch = repoData.default_branch;
} catch (error) {
const err = toError(error);
getLog().error({ err, owner, repo, conversationId }, 'github.repo_metadata_fetch_failed');
try {
const userMessage = classifyAndFormatError(err);
await this.sendMessage(conversationId, userMessage);View on GitHub (pinned to 0773b97458)
Solutions
- Retry the action as the message suggests — if the conversation was transiently missing it may be recreated.
- Start a fresh conversation/thread for the repository instead of reusing the stale one.
- Verify the server is connected to the same database where the conversation was created (no env drift between instances).
- Check for retention/cleanup jobs that delete conversations and inspect logs tagged 'github.conversation_codebase_link_failed' for the conversationId.
Example fix
// before: resuming with stale conversation id from a wiped DB
adapter.setup({ conversationId: 'conv_deleted' })
// after: create a new conversation first
const conv = await store.createConversation({ codebaseId });
adapter.setup({ conversationId: conv.id }) Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the conversation exists before setup
const conv = await store.getConversation(conversationId);
if (!conv) throw new Error(`Conversation ${conversationId} missing; create a new one`); Try / catch
try {
await adapter.setup({ conversationId, codebaseId });
} catch (err) {
if (err instanceof Error && err.message === 'Failed to set up GitHub conversation - please try again') {
// recreate the conversation and retry setup once
}
} Prevention
- Pin all components to the same database (avoid env drift).
- Re-create conversations after DB resets instead of reusing cached IDs.
- Check retention/cleanup jobs before reusing old conversation IDs.
- Lookup the conversation in the store before adapter setup.
When it happens
Trigger: During GitHubAdapter setup, updateConversation is called to attach the codebase to the existing conversation and rejects with ConversationNotFoundError — the conversation was deleted, pruned, or belongs to a different store/database.
Common situations: Stale conversation ID after database reset or cleanup job; run resumed against a wiped database; concurrent process deleted the conversation; pointing the adapter at a different ARCHON database than the one that created the conversation.
Related errors
- Repository ${owner}/${repo} not found or is private. Check r
- Authentication failed for ${owner}/${repo}. ${authHint}
- Failed to clone ${owner}/${repo}: ${'message' in cloneResult
- Detached workflow owner has no resolved run ID
- Cannot resume workflow '${workflowName}': failed to load pri
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/0a8a3740bcace984.
Report an issue: GitHub.