Skip to content

Project registration falls back to Claude instead of configured Pi provider #1580

@b1skit

Description

@b1skit

Summary

  • What broke: Project registration can store claude as the project AI provider even when the intended/default provider is pi. The orchestrator then injects AI Provider: claude into the project context, causing the chat agent to believe Claude is configured for the project.
  • When it started (if known): Unknown.
  • Severity: major

Steps to Reproduce

  1. Configure Archon so the intended/default assistant provider is pi.
  2. Register or clone a project that does not contain .codex/ or .claude/ provider-specific directories.
  3. Open the project in the Web chat and ask the agent to inspect or audit the project configuration.
  4. Observe that the orchestrator prompt/project context reports AI Provider: claude.

Expected vs Actual

  • Expected: A project registered in a Pi-configured Archon instance should be registered with ai_assistant_type = pi, or project registration should explicitly ask/select a provider instead of silently falling back to Claude.
  • Actual: The project is registered with ai_assistant_type = claude. The orchestrator prompt includes AI Provider: claude, and the chat agent treats that as authoritative project configuration.

User Flow

  User                   Archon                   AI Client
  ────                   ──────                   ─────────
  configures Pi ───────▶ DEFAULT_AI_ASSISTANT=pi
  registers project ───▶ detects no .codex/.claude folder
                         falls back to first built-in provider
                         stores ai_assistant_type=claude [X]
  opens Web chat ──────▶ builds orchestrator prompt
                         injects "AI Provider: claude"
                         sends prompt ───────────▶ believes project uses Claude
  asks config question ◀────────────────────────── says Claude is configured

Environment

  • Platform: Web
  • Database: SQLite / PostgreSQL
  • Running in worktree? No
  • OS: Linux / Docker

Logs

Example visible symptom from chat output:

Configuration Assessment
The project is registered in Archon with:

Directory: <project path>
AI Provider: claude

When challenged, the agent attributed this to the Registered Projects section of its prompt rather than anything found in the repository.

Impact

  • Affected workflows/commands: Project registration, clone/register flow, Web chat orchestration, any workflow selection or routing that relies on remote_agent_codebases.ai_assistant_type.
  • Reproduction rate: Always, when a project is registered without .codex/ or .claude/ and the intended provider is Pi.
  • Workaround available? Manually update the project row in remote_agent_codebases.ai_assistant_type to pi, then reset/recreate affected conversations/sessions so stale provider state is not reused.
  • Data loss risk? No

Scope

  • Package(s) likely involved: core|server|web
  • Module (if known): core:handlers/clone, core:db/codebases, core:orchestrator/prompt-builder, providers:registry

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions