feat: multi backend cli and oauth features and fixes#2
feat: multi backend cli and oauth features and fixes#2conoremclaughlin merged 3 commits intomainfrom
Conversation
Add backend column (claude, codex, gemini) to agent_identities table so the CLI can auto-resolve which tool to launch per agent. Backfilled existing agents (wren/benson/myra/echo → claude, lumen → codex). Also unified workspace create flag from -i/--identity to -a/--agent for consistency with the root sb -a flag. Co-Authored-By: Wren <noreply@anthropic.com>
Agents with SB identities should co-author as themselves, not as model names. You are Wren, not Claude Opus 4.6. Co-Authored-By: Wren <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for tracking which AI backend an agent identity uses, aligns workspace CLI flags with the broader CLI’s --agent naming, and updates agent documentation to include the new Codex-based identity.
Changes:
- Add
backendcolumn toagent_identitiesandagent_identity_history, and extend archive trigger functions to persist it. - Rename
sb ws createoption from--identity/-ito--agent/-aand thread it through workspace identity creation. - Document the new
lumenagent identity and add guidance on co-author attribution.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| supabase/migrations/009_add_agent_backend.sql | Adds backend columns and updates archive trigger functions to include the new field. |
| packages/cli/src/commands/workspace.ts | Renames workspace creation flag to --agent and uses it when writing .pcp/identity.json. |
| AGENTS.md | Adds the lumen identity and expands contributor/identity guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $$ LANGUAGE plpgsql; | ||
|
|
||
| -- ===================================================== | ||
| -- Backfill existing agents with known backends |
There was a problem hiding this comment.
The migration section header says it will "Backfill existing agents with known backends", but no backfill statement is present (only a column comment). Either add the intended UPDATE/INSERT backfill, or remove/rename the section to avoid misleading future readers/operators.
| -- Backfill existing agents with known backends | |
| -- Document backend column |
| ws.command('create <name>') | ||
| .description('Create a new workspace with git worktree') | ||
| .option('-i, --identity <agent>', 'Agent ID for this workspace', 'wren') | ||
| .option('-a, --agent <agent>', 'Agent ID for this workspace', 'wren') | ||
| .option('-p, --purpose <desc>', 'Description/purpose of the workspace') |
There was a problem hiding this comment.
Changing the workspace create flag from --identity/-i to --agent/-a is a breaking CLI interface change (and the repo docs still reference --identity). Consider supporting --identity as a deprecated alias (mapping it to the same option) for backward compatibility, or clearly documenting the breaking change and updating all references in the same PR.
…pping in post-approval (by Wren) Two bugs from Lumen's PR #242 review: 1. --max-turns called update_session_phase without sessionId, which could update the wrong active session. Now passes runtime.sessionId explicitly. 2. Post-approval policy re-check used the raw tool name (with mcp__pcp__ prefix) instead of the stripped name. A promptable prefixed tool would get blocked after user approval. Now uses policyToolName consistently. Blocker #2 (re-injection after eviction) deferred to next PR as a feature enhancement — tracked as PCP task. Co-Authored-By: Wren <noreply@anthropic.com>
No description provided.