feat(claude): implement agent configuration for workspace preparation#2243
feat(claude): implement agent configuration for workspace preparation#2243fbricon wants to merge 1 commit into
Conversation
…openkaiden#2169) Replaces the configurationFiles and preWorkspaceStart stubs with a real implementation, mirroring the Cursor extension pattern (openkaiden#2181). Configuration files: - .claude/settings.json: validates with zod, writes model label - .claude.json: skips onboarding (hasCompletedOnboarding, trust dialog for /sandbox), configures MCP servers (stdio for commands, sse for URL-based), mirroring kdn claude.go Both files preserve existing fields and reject invalid/non-object JSON. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Fred Bricon <fbricon@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (10)
🧰 Additional context used📓 Path-based instructions (4)extensions/*/package.json📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.spec.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
extensions/*/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (5)📚 Learning: 2026-05-06T11:29:33.170ZApplied to files:
📚 Learning: 2026-05-05T17:30:20.418ZApplied to files:
📚 Learning: 2026-05-05T17:44:50.991ZApplied to files:
📚 Learning: 2026-05-12T10:01:14.248ZApplied to files:
📚 Learning: 2026-05-12T17:14:02.153ZApplied to files:
🔇 Additional comments (8)
📝 WalkthroughWalkthroughThe Claude extension gains a concrete ChangesClaude workspace configuration lifecycle
Sequence Diagram(s)sequenceDiagram
participant WorkspaceOrchestrator
participant ClaudeExtension
participant SettingsFile as .claude/settings.json
participant ClaudeJsonFile as .claude.json
WorkspaceOrchestrator->>ClaudeExtension: preWorkspaceStart(AgentWorkspaceContext)
ClaudeExtension->>SettingsFile: read current content
SettingsFile-->>ClaudeExtension: raw JSON string
ClaudeExtension->>ClaudeExtension: ClaudeSettingsSchema.parse(content)
ClaudeExtension->>SettingsFile: update({ ...existing, model: context.model.label })
ClaudeExtension->>ClaudeJsonFile: read current content
ClaudeJsonFile-->>ClaudeExtension: raw JSON string
ClaudeExtension->>ClaudeExtension: ClaudeJsonSchema.parse(content)
ClaudeExtension->>ClaudeExtension: set hasCompletedOnboarding + hasTrustDialogAccepted
ClaudeExtension->>ClaudeExtension: map mcp.commands → stdio mcpServers
ClaudeExtension->>ClaudeExtension: map mcp.servers → sse mcpServers
ClaudeExtension->>ClaudeJsonFile: update(JSON.stringify(updatedConfig))
ClaudeExtension-->>WorkspaceOrchestrator: resolved
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |

Replaces the configurationFiles and preWorkspaceStart stubs with a real
implementation, mirroring the Cursor extension pattern (#2181).
Configuration files:
for /sandbox), configures MCP servers (stdio for commands, sse for
URL-based), mirroring kdn claude.go
Both files preserve existing fields and reject invalid/non-object JSON.
There are 2 caveats for now:
and .claude.json needs to look like
So we can't predict which value to approve. I tried storing "_ANTHROPIC_API_KEY" but it didn't work
Fixes #2169