Summary
The coder-labs/codex module currently depends on the agentapi module for script orchestration, task reporting, boundary networking, and session management. This couples the module to runtime concerns (start scripts, session tracking, AgentAPI integration) that should live outside the install module.
PR #861 refactored coder/claude-code to use coder-utils for script orchestration and dropped the agentapi dependency. The codex module should follow the same pattern.
Changes needed
- Replace
module "agentapi" with module "coder_utils"
- Replace
scripts/install.sh with scripts/install.sh.tftpl (templatefile)
- Delete
scripts/start.sh
- Remove AgentAPI, boundary, and start-script-only variables (
order, group, report_tasks, subdomain, cli_app, web_app_display_name, cli_app_display_name, install_agentapi, agentapi_version, ai_prompt, continue, enable_state_persistence, codex_system_prompt, enable_boundary, boundary_*, compile_boundary_from_source, use_boundary_directly)
- Rename
enable_aibridge to enable_ai_gateway
- Make
workdir optional (default = null)
- Output
scripts list instead of task_app_id
- Simplify default
config.toml generation (remove sandbox/approval/model_migrations defaults)
- Update tests and README
Summary
The
coder-labs/codexmodule currently depends on theagentapimodule for script orchestration, task reporting, boundary networking, and session management. This couples the module to runtime concerns (start scripts, session tracking, AgentAPI integration) that should live outside the install module.PR #861 refactored
coder/claude-codeto usecoder-utilsfor script orchestration and dropped theagentapidependency. The codex module should follow the same pattern.Changes needed
module "agentapi"withmodule "coder_utils"scripts/install.shwithscripts/install.sh.tftpl(templatefile)scripts/start.shorder,group,report_tasks,subdomain,cli_app,web_app_display_name,cli_app_display_name,install_agentapi,agentapi_version,ai_prompt,continue,enable_state_persistence,codex_system_prompt,enable_boundary,boundary_*,compile_boundary_from_source,use_boundary_directly)enable_aibridgetoenable_ai_gatewayworkdiroptional (default = null)scriptslist instead oftask_app_idconfig.tomlgeneration (remove sandbox/approval/model_migrations defaults)