-
Notifications
You must be signed in to change notification settings - Fork 164
feat(claude_code): per-agent reasoning effort via claudeConfig #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,3 +51,12 @@ class AgentProfile(BaseModel): | |
| # example one created by `hermes profile alias <profile>`). When omitted, | ||
| # the Hermes provider launches the default `hermes` command. | ||
| hermesProfile: Optional[str] = Field(default=None, min_length=1) | ||
|
|
||
| # Claude Code-only. Per-agent Claude Code knobs mapped to CLI flags at | ||
| # launch: {"effort": "<low|medium|high|xhigh>"} -> `--effort <level>` and | ||
| # {"fallback_model": "<model>"} -> `--fallback-model <model>`. Lets a | ||
| # profile set per-agent reasoning effort without relying on the | ||
| # machine-global `effortLevel` in ~/.claude/settings.json. This is the | ||
| # Claude analog of codexConfig for the codex provider; the top-level | ||
| # `model` field still maps to `--model`. | ||
|
Comment on lines
+55
to
+61
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For context: |
||
| claudeConfig: Optional[Dict[str, Any]] = None | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,6 +120,21 @@ def _build_claude_command(self) -> str: | |
| if profile.model: | ||
| command_parts.extend(["--model", profile.model]) | ||
|
|
||
| # Apply Claude Code-only per-agent knobs from claudeConfig: | ||
| # effort -> --effort <level> | ||
| # fallback_model -> --fallback-model <model> | ||
| # Claude analog of codexConfig: per-agent reasoning effort without | ||
| # depending on the machine-global effortLevel in | ||
| # ~/.claude/settings.json. | ||
|
Comment on lines
+123
to
+128
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For context: |
||
| claude_config = getattr(profile, "claudeConfig", None) | ||
| if isinstance(claude_config, dict): | ||
| effort = claude_config.get("effort") | ||
| if effort: | ||
| command_parts.extend(["--effort", str(effort)]) | ||
| fallback_model = claude_config.get("fallback_model") | ||
| if fallback_model: | ||
| command_parts.extend(["--fallback-model", str(fallback_model)]) | ||
|
|
||
| # Add system prompt - escape newlines to prevent tmux chunking issues | ||
| system_prompt = profile.system_prompt if profile.system_prompt is not None else "" | ||
| system_prompt = self._apply_skill_prompt(system_prompt) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context:
codexConfigis introduced by the sibling PR #278 (feat/codex-agent-config). These two are a pair — per-agent provider config:codexConfigfor the codex provider,claudeConfigforclaude_code— so the cross-reference is intentional and resolves once both land. If you'd prefer each PR to read as fully self-contained regardless of merge order, I'm happy to drop thecodexConfigmention here.