Summary
Background memory/skill review agents can ignore the active agent.reasoning_effort configuration because _spawn_background_review() creates a fresh AIAgent without passing reasoning_config.
On Codex Responses routes, that fresh review agent falls back to the transport default:
{
"reasoning": {
"effort": "medium",
"summary": "auto"
}
}
This can produce unexpected medium-effort upstream requests even when the user's main session is configured for a higher effort such as xhigh.
Why this matters
Recent background-review fixes already focus on runtime inheritance:
reasoning_config appears to be another runtime field that should be inherited by background review agents.
Current behavior
A main session configured like this:
agent:
reasoning_effort: xhigh
can still spawn a background memory/skill review run whose model request uses the Codex transport's default medium reasoning effort, because the review agent is constructed without reasoning_config.
The relevant path is _spawn_background_review() in run_agent.py, where the review agent is instantiated with fields such as:
review_agent = AIAgent(
model=self.model,
max_iterations=8,
quiet_mode=True,
platform=self.platform,
provider=self.provider,
api_mode=...,
base_url=...,
api_key=...,
parent_session_id=self.session_id,
enabled_toolsets=["memory", "skills"],
)
but no reasoning_config=....
Expected behavior
Background memory/skill review should use the same active reasoning configuration as the parent session unless a review-specific override is configured.
For example, if the parent session has:
agent:
reasoning_effort: xhigh
the spawned review agent should receive the parsed equivalent of:
reasoning_config={"enabled": True, "effort": "xhigh"}
and should not fall back to a transport-local medium default.
Suggested minimal fix
Pass the parent reasoning config when creating the background review agent:
review_agent = AIAgent(
...,
reasoning_config=self.reasoning_config,
)
It may also be worth preserving related runtime fields in the same clone path, for example service_tier and request_overrides, if those are expected to apply consistently across internal agent forks.
Suggested broader config improvement
Please consider adding a true global reasoning default in config.yaml, for example:
reasoning:
default_effort: xhigh
or:
runtime:
reasoning_effort: xhigh
That value could be used by every AIAgent construction path when an explicit reasoning_config is not provided. Subsystem-specific settings could still override it, e.g.:
agent:
reasoning_effort: xhigh
delegation:
reasoning_effort: high
auxiliary:
title_generation:
extra_body:
reasoning:
effort: low
memory:
review:
reasoning_effort: low
skills:
review:
reasoning_effort: low
This would reduce the risk of new internal agent forks or auxiliary paths silently returning to a transport-local medium default.
Acceptance criteria
- Background memory/skill review agents inherit the parent
reasoning_config by default.
- A session with
agent.reasoning_effort: xhigh does not generate medium-effort background review requests through Codex Responses unless explicitly configured that way.
- Tests cover
_spawn_background_review() cloning reasoning_config into the review AIAgent.
- Optional: a global reasoning default is available and used by bare
AIAgent creation paths when no explicit reasoning config is supplied.
Privacy note
This report intentionally omits local paths, session identifiers, timestamps, upstream request dump IDs, credentials, provider keys, and user-specific configuration values.
Summary
Background memory/skill review agents can ignore the active
agent.reasoning_effortconfiguration because_spawn_background_review()creates a freshAIAgentwithout passingreasoning_config.On Codex Responses routes, that fresh review agent falls back to the transport default:
{ "reasoning": { "effort": "medium", "summary": "auto" } }This can produce unexpected medium-effort upstream requests even when the user's main session is configured for a higher effort such as
xhigh.Why this matters
Recent background-review fixes already focus on runtime inheritance:
base_url,api_key, andapi_modewhen_spawn_background_review()forks a review agent.base_urlandapi_keyinto the background review agent.config.yamlreasoning config was loaded and passed intoAIAgent.reasoning_configappears to be another runtime field that should be inherited by background review agents.Current behavior
A main session configured like this:
can still spawn a background memory/skill review run whose model request uses the Codex transport's default medium reasoning effort, because the review agent is constructed without
reasoning_config.The relevant path is
_spawn_background_review()inrun_agent.py, where the review agent is instantiated with fields such as:but no
reasoning_config=....Expected behavior
Background memory/skill review should use the same active reasoning configuration as the parent session unless a review-specific override is configured.
For example, if the parent session has:
the spawned review agent should receive the parsed equivalent of:
and should not fall back to a transport-local
mediumdefault.Suggested minimal fix
Pass the parent reasoning config when creating the background review agent:
It may also be worth preserving related runtime fields in the same clone path, for example
service_tierandrequest_overrides, if those are expected to apply consistently across internal agent forks.Suggested broader config improvement
Please consider adding a true global reasoning default in
config.yaml, for example:or:
That value could be used by every
AIAgentconstruction path when an explicitreasoning_configis not provided. Subsystem-specific settings could still override it, e.g.:This would reduce the risk of new internal agent forks or auxiliary paths silently returning to a transport-local
mediumdefault.Acceptance criteria
reasoning_configby default.agent.reasoning_effort: xhighdoes not generate medium-effort background review requests through Codex Responses unless explicitly configured that way._spawn_background_review()cloningreasoning_configinto the reviewAIAgent.AIAgentcreation paths when no explicit reasoning config is supplied.Privacy note
This report intentionally omits local paths, session identifiers, timestamps, upstream request dump IDs, credentials, provider keys, and user-specific configuration values.