Repository navigation
feat(chat): automatically select Claude, Codex or Copilot - #104
Merged
Merged
Conversation
Pin conversations to their provider, retain broker tool approvals, and exclude internal sessions by provider identity. Closes #103.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
Chat and
driga askcan use an installed Claude Code, Codex or GitHub Copilot CLI. Selection is lazy, defaults to automatic, and stays pinned for each conversation. CLI overrides apply to new conversations through an already-running service; UI and TUI identify the answering provider.Closes #103
Why
Users may have only one assistant installed. Separate adapters preserve each CLI's protocol while the existing broker retains command authorization, cancellation and capture policy. The design and supported-provider limits are recorded in
docs/specs/2026-11-10-assistant-providers.md.Evidence
After: fake-provider tests cover ordered automatic selection, explicit overrides through the service, pinned resume after restart, provider-ID collisions and hook/spool self-exclusion.
docs/specs/2026-11-10-provider-review.md.Real provider/authentication/model turns were not used in tests. Copilot fails before sending a question unless protocol 3, explicit safety acknowledgments and an exact Driga-only catalog are accepted. Codex is limited to the verified 0.167.0 build and default OpenAI configuration; its adapter supports reads/panels and broker-gated commands, with dashboard writes unavailable. Direct MCP cleanup, acknowledgment, jumps, delegated prompts and summary actions remain Claude-only. Project summaries retain their Claude model/budget contract.
Risk and rollout
No schema migration or agent-settings edits. New Chat conversations can send permitted context through the chosen CLI's existing vendor connection. Capture policy and fleet sharing are unchanged. Process commands continue through the broker's human approval and identity checks.
CLI overrides affect only new conversations. Desktop Chat uses the collector preference; restart the service after changing that configuration. Existing conversations remain bound to their original provider; turn/authentication/quota errors never cause cross-provider replay.
Contract changes
Adds
assistant.provider = "auto" | "claude" | "codex" | "copilot"andDRIGA_ASSISTANT_PROVIDER. Adds an optional authenticated conversation-create preference; an empty request retains the daemon default. Existing conversation storage already records the provider, so no migration is needed.Merge Danger
Door: two-way
Code rollback is straightforward. Conversation provider IDs remain stored and require the corresponding adapter to resume.
Blast Radius: Chat
Collector session exclusion also changes to provider-qualified identities. Unsupported CLIs fail closed; vendor-native execution is disabled and all local commands remain broker-gated.
Verified
go test ./...; focused race checks on chat, llm, collector, config, store and TUI.