Skip to content

Commit 1218555

Browse files
committed
release: prepare 1.2.2 for Codex 0.145
1 parent 7c47dda commit 1218555

17 files changed

Lines changed: 197 additions & 55 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Unreleased
44

5+
## 1.2.2 - 2026-07-22
6+
7+
- Validate Codex CLI 0.145.0 as the current reference while retaining 0.144.4
8+
as the compatibility floor; adopt its stable MultiAgent V2 schema by leaving
9+
nesting and concurrency to native Codex while preserving strict config,
10+
permission, hook, MCP, and role-model projection checks.
11+
- Restore the Head Manager's generated `export_dataset_csv` projection by
12+
registering its canonical MCP schema, role boundary, and export capability,
13+
with a generated-config-to-registry regression check.
514
- Stop automated GitHub Release notes at the next changelog heading so a
615
release contains only its matching version section.
716

‎docs/codex-native-orchestration.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ conflicts with Strategy.
8181

8282
## Delegation Contract
8383

84-
MultiAgent V2 exposes the generated role profiles with a depth-one boundary.
84+
MultiAgent V2 exposes the generated role profiles through native Codex
85+
delegation.
8586
Head Manager prefers an exact profile when its specialty is useful and passes a
8687
compact role-owned brief rather than the full root history. Role TOML supplies
8788
the direct fixed model settings; their values and fallback eligibility are owned
@@ -98,11 +99,15 @@ Use `followup_task` when a live child still owns a correction or clarification.
9899
Start another child for a new specialty, an unavailable session, or independent
99100
review. Apply the canonical fallback boundary in
100101
[Roles, Skills, And Workflows](roles-skills-and-workflows.md). A child cannot
101-
approve, execute, access a broker, or emulate Head Manager. Children never
102-
delegate recursively. Head Manager waits only while a live child has useful work
103-
and reports lifecycle events only from native tool and child-lifecycle results
104-
in the current run. Native wait is wait-any and may serialize with no explicit
105-
target list; that representation is not failure by itself.
102+
approve, execute, access a broker, or emulate Head Manager. Whether to delegate
103+
a distinct child-owned subtask further is a native Codex decision, not a
104+
TradingCodex workflow requirement. Every descendant remains subject to its
105+
selected projected role and the shared evidence, authority, and safety
106+
boundaries. Head Manager
107+
waits only while a live child has useful work and reports lifecycle events only
108+
from native tool and child-lifecycle results in the current run. Native wait is
109+
wait-any and may serialize with no explicit target list; that representation is
110+
not failure by itself.
106111

107112
When a Brain applies, the assignment contains the question Head Manager derived
108113
from it, not the Brain body or a delegation of Brain authority. Brain content is

‎docs/generated-workspaces.md‎

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ That explicit overlay rule applies to external skill procedures, not to
534534
read-only app, connector, MCP, or data tools used as evidence. A role whose
535535
assignment needs external data or preserves a user-named provider first checks
536536
the current task's callable tool surface and uses the runtime's available
537-
deferred-tool discovery surface when needed. The Codex 0.144.4 reference
537+
deferred-tool discovery surface when needed. The Codex 0.145.0 reference
538538
contract first resolves at most 12 names with
539539
`text(ALL_TOOLS.filter(x => x.name.includes("<provider-or-keyword>")).slice(0, 12).map(x => x.name))`.
540540
One supported query may combine one to four literal `name.includes`
@@ -586,14 +586,22 @@ runs, hard-failure checks, blind review, and resolved outcomes.
586586
Generated `.codex/config.toml` enables MultiAgent V2 with visible spawn
587587
metadata and the `agents` tool namespace. It keeps every
588588
`.codex/agents/*.toml` role discoverable while setting
589-
`features.multi_agent_v2.enabled = true` and `agents.max_depth = 1`. The
590-
V1-only `agents.max_threads` key is absent because Codex rejects it when V2 is
591-
enabled. Codex owns concurrency and scheduling. Head Manager chooses useful
592-
profiles and follows up with an owner when appropriate. Role eligibility and
593-
fallback are defined in [Roles, Skills, And Workflows](roles-skills-and-workflows.md).
594-
Children cannot recursively dispatch. Root model and reasoning settings are
595-
inherited, and direct fixed-role TOML model settings are projected, but `doctor`
596-
does not duplicate native model availability or lifecycle checks.
589+
`features.multi_agent_v2.enabled = true`. TradingCodex does not set
590+
`agents.max_depth`, `agents.max_threads`, or
591+
`agents.max_concurrent_threads_per_session`; Codex 0.145.0 ignores
592+
`agents.max_depth` for V2, retains `agents.max_threads` as a compatibility
593+
alias, and owns nesting, concurrency, and scheduling. Head Manager chooses
594+
useful profiles and follows up with an owner when appropriate. Role eligibility
595+
and fallback are defined in [Roles, Skills, And Workflows](roles-skills-and-workflows.md).
596+
Whether to delegate distinct child-owned work further is a native Codex
597+
decision, not a TradingCodex workflow requirement. Every descendant remains
598+
subject to its selected projected role and TradingCodex safety and service
599+
gates. Root model and reasoning settings are inherited, and direct fixed-role
600+
TOML model settings are projected, but `doctor` does not duplicate native model
601+
availability or lifecycle checks. Codex 0.145.0 exposes optional per-spawn model
602+
and reasoning overrides by default; TradingCodex neither disables nor requires
603+
them. A spawn without an explicit override follows native inheritance and role
604+
config resolution.
597605

598606
Workspace template modules are deployment projections. Agent and skill
599607
ownership comes from the Python agent registry and is projected
@@ -868,10 +876,11 @@ Generated root config sets `default_permissions = "trading-research"` and
868876
defines two custom profiles. It deliberately omits legacy `sandbox_mode` from
869877
the root and every fixed-role TOML because any loaded `sandbox_mode` overrides
870878
custom permission profiles in Codex. This contract requires Codex CLI 0.144.4
871-
or later on a locally supported platform. Version 0.144.4 is the current
879+
or later on a locally supported platform. Version 0.145.0 is the current
872880
release-validation reference for permission profiles, hooks, required MCP,
873-
deferred MCP calls, and the explicit V2 feature table. Older versions fail the
874-
Codex runtime doctor check. These remain version-sensitive
881+
deferred MCP calls, and the explicit V2 feature table. Versions below the
882+
compatibility floor fail the Codex runtime doctor check; compatible non-reference
883+
versions warn. These remain version-sensitive
875884
surfaces, so release validation includes strict config/feature inspection and
876885
a real native smoke.
877886
See the [Codex permissions reference](https://learn.chatgpt.com/docs/permissions).
@@ -1582,7 +1591,7 @@ Codex-native bootstrap verification:
15821591
workspace. The canonical workspace must
15831592
either be interactively trusted or receive the one-run `projects={...}` trust
15841593
override shown in `AGENTS.md`. A full fixed-role lifecycle smoke must use
1585-
persisted trust for all five generated project hooks. Codex 0.144.4 does not
1594+
persisted trust for all five generated project hooks. Codex 0.145.0 does not
15861595
carry the one-run `--dangerously-bypass-hook-trust` flag through the role
15871596
config reload used by an exact V2 child, so that flag may be used only for
15881597
root/config diagnostics and is not lifecycle acceptance. It also does not

‎docs/roles-skills-and-workflows.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,11 @@ Start a fresh child for a new specialty, an unavailable session, or independent
226226
review. The Dynamic Workflow fallback boundary applies here. A generic child
227227
retains the same research-only scope, evidence standard, no-secret boundary,
228228
and no-order boundary; it cannot approve, execute, access a broker, or act as
229-
Head Manager. Children never delegate recursively. Wait only while a live child
230-
has useful work. Native
229+
Head Manager. Whether to delegate a distinct child-owned subtask further is a
230+
native Codex decision, not a workflow requirement. Each descendant remains
231+
subject to its selected projected role and the shared evidence, authority, and
232+
safety boundaries. Wait only while a live child has useful work.
233+
Native
231234
wait-any may serialize without explicit targets; verify lifecycle through the
232235
native tool result and child session events rather than treating that as failure.
233236

@@ -260,7 +263,7 @@ same contract error repeats.
260263
The same bounded rule applies across role MCP use: a documented terminal
261264
outcome such as stored, updated, existing, reused, or prepared ends that call;
262265
an unchanged deterministic failure is never blindly resubmitted. Under the
263-
Codex 0.144.4 deferred-tool contract, unknown-provider resolution starts with
266+
Codex 0.145.0 deferred-tool contract, unknown-provider resolution starts with
264267
the canonical names-only query
265268
`text(ALL_TOOLS.filter(x => x.name.includes("<provider-or-keyword>")).slice(0, 12).map(x => x.name))`.
266269
One names-only query may combine at most four literal `name.includes`

‎docs/validation-and-test-plan.md‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ Smoke coverage should verify:
266266
Manager and role-owned live research for the six evidence producers without
267267
treating a host finance skill as a dependency
268268
- generated `.codex/config.toml` explicitly enables MultiAgent V2, reports it
269-
enabled through `codex features list`, leaves concurrency to Codex, and omits
270-
the incompatible V1 `agents.max_threads` key
269+
enabled through `codex features list`, leaves nesting and concurrency to
270+
Codex, and omits TradingCodex-owned `agents.max_depth`,
271+
`agents.max_threads`, and `agents.max_concurrent_threads_per_session`
271272
- skill/projection manifests identify the finite managed inventory, declare
272273
runtime discovery incomplete, and resolve exact root/role skill paths
273274
- two generated workspaces have different workspace ids
@@ -816,7 +817,7 @@ stop without an order, approval, execution, cancellation, broker mutation, or
816817
secret action. Record an unavailable Codex/auth blocker rather than replacing this with a
817818
claim based only on the fake subprocess test.
818819

819-
Reference acceptance uses Codex CLI 0.144.4. Run
820+
Reference acceptance uses Codex CLI 0.145.0. Run
820821
`python tests/codex_cli_contract.py --workspace <workspace>
821822
--require-reference --require-hook-trust` first, after opening the disposable
822823
workspace in interactive Codex and persistently trusting all five generated
@@ -826,7 +827,7 @@ configuration, readable sandbox settings, the expected enabled/disabled
826827
feature states, and trusted lifecycle hooks. Native `codex exec` smokes must
827828
also pass `--strict-config`, so a newly unknown or removed project key fails
828829
before model behavior is accepted. Do not use `--ignore-user-config` or
829-
`--dangerously-bypass-hook-trust` for lifecycle acceptance: in 0.144.4 the
830+
`--dangerously-bypass-hook-trust` for lifecycle acceptance: in 0.145.0 the
830831
one-run bypass is not inherited when a V2 child reloads an exact role config.
831832
On platforms where a temporary directory has a symlinked alias, resolve the
832833
workspace once with `realpath` or `Path.resolve()` and use that same physical
@@ -839,10 +840,13 @@ Run native CLI smokes that inspect observable tool calls and child lifecycle
839840
results from Codex. Cover the direct fast path, one exact profile, a same-owner
840841
`followup_task`, and a bounded evidence-role generic fallback when a profile is
841842
unavailable. Briefs must stay compact, generated TOML must retain the fixed
842-
model settings and the project-wide `trading-research` profile, and no child may
843-
recursively delegate. A missing independent risk or judgment profile must remain
844-
explicit rather than becoming a generic review. Run a sequential two-child smoke plus one artifact-to-synthesis
845-
workflow because lifecycle failures may appear only after the first child exits.
843+
model settings and the project-wide `trading-research` profile. When native
844+
Codex delegates a child-owned subtask further, inspect the descendant lifecycle
845+
and verify that its effective role, model, permission profile, MCP principal,
846+
evidence boundary, and no-order boundary match the selected role. A missing independent risk or judgment
847+
profile must remain explicit rather than becoming a generic review. Run a
848+
sequential two-child smoke plus one artifact-to-synthesis workflow because
849+
lifecycle failures may appear only after the first child exits.
846850

847851
For a full research smoke, inspect root and child JSONL as observable behavior,
848852
not private chain of thought. Require a compact bounded child brief; reject broad

‎installation.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ initialized is fine, as is an empty directory inside an existing parent
4949
worktree.
5050

5151
Use Codex CLI 0.144.4 or later on macOS, Linux, WSL, or native Windows. Version
52-
0.144.4 is the current TradingCodex reference for custom permission profiles,
52+
0.145.0 is the current TradingCodex reference for custom permission profiles,
5353
hooks, required MCP startup, and explicit MultiAgent V2 configuration. Verify
5454
with `codex --version`; `./tcx doctor --layer guidance` fails below the
5555
compatibility floor and warns when the installed CLI is older or newer than the
@@ -375,10 +375,10 @@ Generated root work inherits the user's active Codex model and reasoning
375375
settings. All nine fixed subagents use `gpt-5.6-terra` with `high` reasoning.
376376
Final execution is service-owned and runs no model.
377377
MultiAgent V2 exposes exact custom-role routing through the `agents` namespace;
378-
each task uses `fork_turns="none"` and a fresh role-bound child. The generated
379-
V2 table explicitly sets `enabled = true` and `max_depth = 1`; concurrency
380-
capacity remains owned by native Codex and user/host configuration rather than
381-
a projected V1 thread cap.
378+
exact custom-role dispatch uses `fork_turns="none"` so Codex applies the fresh
379+
role-bound config layer. The generated V2 table explicitly sets `enabled = true`
380+
but does not set nesting or concurrency controls; native Codex and user/host
381+
configuration own those choices.
382382
Inspect `.codex/config.toml`, `.codex/agents/`, and `./tcx doctor` after an
383383
update to verify the generated Codex contract. There is no model-policy
384384
manifest, runtime model fallback, or rollout control.

‎tests/test_codex_cli_compat.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
("0.144.0", False, False),
1515
("0.144.1", False, False),
1616
("0.144.2", False, False),
17-
("0.144.4", True, False),
18-
("0.145.0", True, True),
17+
("0.144.4", True, True),
18+
("0.144.5", True, True),
19+
("0.145.0", True, False),
20+
("0.145.1", True, True),
1921
],
2022
)
2123
def test_codex_cli_reference_version_check(
@@ -42,10 +44,12 @@ def test_codex_cli_reference_version_check(
4244
assert bool(result.get("warn")) is warn
4345
assert f"installed={installed}" in result["detail"]
4446
assert "required>=0.144.4" in result["detail"]
45-
assert "reference=0.144.4" in result["detail"]
47+
assert "reference=0.145.0" in result["detail"]
4648
if installed in {"0.144.1", "0.144.2"}:
4749
assert "older than required" in result["detail"]
48-
if installed == "0.145.0":
50+
if installed in {"0.144.4", "0.144.5"}:
51+
assert "older than reference" in result["detail"]
52+
if installed == "0.145.1":
4953
assert "newer client requires harness revalidation" in result["detail"]
5054

5155

‎tests/test_codex_native_orchestration.py‎

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ def test_generated_contract_inherits_root_model_and_keeps_role_profiles_optional
418418
assert '[features.multi_agent_v2]' in config
419419
assert 'enabled = true' in config
420420
assert "max_concurrent_threads_per_session" not in config
421-
assert "max_depth = 1" in config
422-
assert 'max_threads = 6' not in config
421+
assert "max_depth" not in config_values.get("agents", {})
422+
assert "max_threads" not in config_values.get("agents", {})
423423
assert "required = true" in config
424424
assert '"begin_analysis_run"' in config
425425
assert "record_workflow_plan" not in config
@@ -432,8 +432,8 @@ def test_generated_contract_inherits_root_model_and_keeps_role_profiles_optional
432432
assert "You are the `head-manager` agent" not in fixed_role
433433
assert "# Role And Safety" in fixed_role
434434
assert "authenticated TradingCodex MCP" in fixed_role
435-
assert "depth-1 child" in fixed_role
436-
assert "never spawn, coordinate" in fixed_role
435+
assert "Whether to delegate" not in fixed_role
436+
assert "All work performed on your behalf remains subject" in fixed_role
437437
assert "$tcx-source-gate" in fixed_role
438438
assert "Snapshot/Dataset/Artifact IDs" in fixed_role
439439
assert "do not duplicate or invent provider policy here" in fixed_role
@@ -484,6 +484,13 @@ def test_generated_contract_inherits_root_model_and_keeps_role_profiles_optional
484484
enabled_tools = set(role_config["mcp_servers"]["tradingcodex"]["enabled_tools"])
485485
assert role_config["model"] == "gpt-5.6-terra"
486486
assert role_config["model_reasoning_effort"] == "high"
487+
assert role_config.get("agents", {}).get("enabled") is not False
488+
assert (
489+
role_config.get("features", {})
490+
.get("multi_agent_v2", {})
491+
.get("enabled")
492+
is not False
493+
)
487494
assert "get_research_artifact" in enabled_tools
488495
assert ARTIFACT_DISCOVERY_TOOLS.isdisjoint(enabled_tools)
489496
assert role_config["model_instructions_file"] == FIXED_ROLE_MODEL_INSTRUCTIONS
@@ -494,6 +501,23 @@ def test_generated_contract_inherits_root_model_and_keeps_role_profiles_optional
494501
assert "Artifact handoff:" not in role_instructions
495502

496503

504+
def test_generated_mcp_allowlists_reference_only_registered_tools(workspace: Path) -> None:
505+
config_paths = [
506+
workspace / ".codex/config.toml",
507+
*(workspace / ".codex/agents").glob("*.toml"),
508+
]
509+
510+
for config_path in config_paths:
511+
config = tomllib.loads(config_path.read_text(encoding="utf-8"))
512+
enabled_tools = set(
513+
config["mcp_servers"]["tradingcodex"]["enabled_tools"]
514+
)
515+
assert enabled_tools <= TOOL_REGISTRY.keys(), (
516+
f"{config_path.relative_to(workspace)} references unregistered "
517+
f"TradingCodex MCP tools: {sorted(enabled_tools - TOOL_REGISTRY.keys())}"
518+
)
519+
520+
497521
def test_doctor_requires_fixed_role_base_and_per_role_override(workspace: Path) -> None:
498522
doctor = subprocess.run(
499523
[str(workspace / "tcx"), "doctor", "--verbose"],

0 commit comments

Comments
 (0)