@@ -58,6 +58,9 @@ export async function validateLoop({
5858 'state.md' ,
5959 'dependencies.md' ,
6060 'agents/openai.yaml' ,
61+ 'agents/echo-ui-pr-reviewer.toml' ,
62+ 'agents/echo-ui-review-adjudicator.toml' ,
63+ 'agents/echo-ui-loop-evolver.toml' ,
6164 'review/REVIEW.md' ,
6265 'review/response-policy.md' ,
6366 'review/result.schema.json' ,
@@ -240,12 +243,14 @@ export async function validateLoop({
240243 path . resolve ( loopRoot , '..' , '..' , '.codex' , 'config.toml' ) ,
241244 'utf8' ,
242245 )
243- for ( const role of [
244- 'echo_ui_pr_reviewer' ,
245- 'echo_ui_review_adjudicator' ,
246- 'echo_ui_loop_evolver' ,
247- ] ) {
248- if ( ! codexConfig . includes ( `[agents.${ role } ]` ) || ! codexConfig . includes ( 'config_file =' ) ) {
246+ const roleRegistrations = {
247+ echo_ui_pr_reviewer : 'echo-ui-pr-reviewer.toml' ,
248+ echo_ui_review_adjudicator : 'echo-ui-review-adjudicator.toml' ,
249+ echo_ui_loop_evolver : 'echo-ui-loop-evolver.toml' ,
250+ }
251+ for ( const [ role , roleFile ] of Object . entries ( roleRegistrations ) ) {
252+ const registration = `config_file = "../loops/issue-dev-loop/agents/${ roleFile } "`
253+ if ( ! codexConfig . includes ( `[agents.${ role } ]` ) || ! codexConfig . includes ( registration ) ) {
249254 throw new Error ( `Codex role is not registered through config_file: ${ role } ` )
250255 }
251256 }
@@ -254,7 +259,7 @@ export async function validateLoop({
254259 'echo-ui-review-adjudicator.toml' ,
255260 ] ) {
256261 const roleSource = await readFile (
257- path . resolve ( loopRoot , '..' , '..' , '.codex' , ' agents', roleFile ) ,
262+ path . resolve ( loopRoot , 'agents' , roleFile ) ,
258263 'utf8' ,
259264 )
260265 if (
0 commit comments