Skip to content

feat(phai): Add --claudeCodeConfig to agent server#1232

Merged
skoob13 merged 1 commit intomainfrom
georgiy/agent-server-claude-code-config
Mar 16, 2026
Merged

feat(phai): Add --claudeCodeConfig to agent server#1232
skoob13 merged 1 commit intomainfrom
georgiy/agent-server-claude-code-config

Conversation

@skoob13
Copy link
Contributor

@skoob13 skoob13 commented Mar 13, 2026

Problem

The agent server had no way to pass Claude Code-specific configuration (system prompt, plugins). These options were either hardcoded or missing entirely. As we add support for other agent backends (e.g. Codex), we need provider-specific config scoped separately from agent-agnostic config.

Changes

  • Add --claudeCodeConfig <json> CLI flag accepting a JSON object with systemPrompt and plugins fields, matching the Claude Code SDK schema
  • Add ClaudeCodeConfig type and claudeCodeConfigSchema Zod validator
  • Add buildSessionSystemPrompt() that merges user-provided system prompt with cloud task instructions
  • Pass configured plugins through to Claude Code sessions via _meta.claudeCode.options.plugins
  • Extract reusable parseJsonOption helper, deduplicating the JSON parse + Zod validate pattern previously inlined for --mcpServers

How did you test this code?

Verified no new typecheck errors introduced (all failures are pre-existing bigint/missing module issues on main).

Publish to changelog?

no

🤖 LLM context

Co-authored with Claude Code.

Adds a --claudeCodeConfig JSON flag to the agent server CLI for
Claude Code-specific options (systemPrompt, plugins), scoped
separately from agent-agnostic config. Schema mirrors the Claude
Code SDK types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@skoob13 skoob13 requested review from sortafreel and tatoalo March 13, 2026 17:37
@skoob13 skoob13 merged commit 98b7a73 into main Mar 16, 2026
14 checks passed
@skoob13 skoob13 deleted the georgiy/agent-server-claude-code-config branch March 16, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants