Problem
There's no way to bind a registered codebase to a specific conversation via chat. The AI router auto-selects projects per-message via /invoke-workflow --project, but doesn't persist the binding on the conversation record.
This is especially needed for Telegram Forum Topics where each topic should be permanently linked to a project. Currently users must mention the project name in every message.
Proposed Solution
Add a /setproject <name> deterministic command that:
- Looks up the codebase by name (case-insensitive, partial match like
findCodebaseByName)
- Updates
conversation.codebase_id in the database
- Updates
conversation.cwd to the codebase's default_cwd
- Returns confirmation: "Project set to {name}"
Context
Forum Topics support was added to the Telegram adapter (each topic gets a unique chatId:threadId conversation ID). But without /setproject, each topic conversation starts with codebase_id: null and the user must mention the project name explicitly.
Files to Change
packages/core/src/handlers/command-handler.ts — add setproject case
packages/core/src/orchestrator/orchestrator-agent.ts — add to deterministic command list
Problem
There's no way to bind a registered codebase to a specific conversation via chat. The AI router auto-selects projects per-message via
/invoke-workflow --project, but doesn't persist the binding on the conversation record.This is especially needed for Telegram Forum Topics where each topic should be permanently linked to a project. Currently users must mention the project name in every message.
Proposed Solution
Add a
/setproject <name>deterministic command that:findCodebaseByName)conversation.codebase_idin the databaseconversation.cwdto the codebase'sdefault_cwdContext
Forum Topics support was added to the Telegram adapter (each topic gets a unique
chatId:threadIdconversation ID). But without/setproject, each topic conversation starts withcodebase_id: nulland the user must mention the project name explicitly.Files to Change
packages/core/src/handlers/command-handler.ts— addsetprojectcasepackages/core/src/orchestrator/orchestrator-agent.ts— add to deterministic command list