What I'm trying to do
My task board starts agent sessions through POST /api/sessions, and its new-session dialog now lets me pick the model and the effort for each session. Two of those choices have no clean route through Codeman's API.
Claude's model
POST /api/sessions takes effort for one session, but it has no per-session model for Claude. The only field that sets one is modelOverride, and the route writes that into <workingDir>/.claude/settings.local.json. The model then stays in that file after the session ends. Every later claude run in that directory starts on it, including runs outside Codeman, until something rewrites the file. Picking a model for one session should not change what a plain claude does in my checkout next week.
The launch template already has a --model slot for Claude. The route fills it only from the app-wide default, because the registry marks Claude's model source as claude-settings-file.
Proposal: add an optional top-level model to CreateSessionSchema, checked against the same characters as the registry's model-claude pattern. When the CLI's model source is claude-settings-file, the route uses body.model first and falls back to the app-wide default. The value reaches the CLI as --model and nothing is written to disk. modelOverride keeps working as it does today for anyone who wants the model written into the case.
Codex's reasoning effort
codexConfig takes a model but no effort, so a session can't start at a particular reasoning effort. Codex sets one with --config model_reasoning_effort=<level>.
Proposal: add codexConfig.reasoningEffort, an enum of the levels codex accepts (none, minimal, low, medium, high, xhigh, max, ultra as of codex-cli 0.154.0). The registry's argv tokens can't splice a value into a literal, so the Codex entry would get one --config model_reasoning_effort=<level> literal per level, each gated on that enum value. Nothing new in the registry is needed, and a level the enum doesn't know emits nothing.
Branches
I have both changes working locally with tests, as two separate branches, since each one stands on its own. I'll open them as draft PRs that link here. Happy to reshape either one if you'd rather do it differently.
What I'm trying to do
My task board starts agent sessions through
POST /api/sessions, and its new-session dialog now lets me pick the model and the effort for each session. Two of those choices have no clean route through Codeman's API.Claude's model
POST /api/sessionstakeseffortfor one session, but it has no per-session model for Claude. The only field that sets one ismodelOverride, and the route writes that into<workingDir>/.claude/settings.local.json. The model then stays in that file after the session ends. Every laterclauderun in that directory starts on it, including runs outside Codeman, until something rewrites the file. Picking a model for one session should not change what a plainclaudedoes in my checkout next week.The launch template already has a
--modelslot for Claude. The route fills it only from the app-wide default, because the registry marks Claude's model source asclaude-settings-file.Proposal: add an optional top-level
modeltoCreateSessionSchema, checked against the same characters as the registry'smodel-claudepattern. When the CLI's model source isclaude-settings-file, the route usesbody.modelfirst and falls back to the app-wide default. The value reaches the CLI as--modeland nothing is written to disk.modelOverridekeeps working as it does today for anyone who wants the model written into the case.Codex's reasoning effort
codexConfigtakes amodelbut no effort, so a session can't start at a particular reasoning effort. Codex sets one with--config model_reasoning_effort=<level>.Proposal: add
codexConfig.reasoningEffort, an enum of the levels codex accepts (none,minimal,low,medium,high,xhigh,max,ultraas of codex-cli 0.154.0). The registry's argv tokens can't splice a value into a literal, so the Codex entry would get one--config model_reasoning_effort=<level>literal per level, each gated on that enum value. Nothing new in the registry is needed, and a level the enum doesn't know emits nothing.Branches
I have both changes working locally with tests, as two separate branches, since each one stands on its own. I'll open them as draft PRs that link here. Happy to reshape either one if you'd rather do it differently.