Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
938d2dd
feat(install): add dasel installation function and update config merg…
35C4n0r May 23, 2026
77e2113
refactor(install): simplify variable assignments and improve config m…
35C4n0r May 23, 2026
7273758
fix(install): ensure config.toml is created if it doesn't exist or is…
35C4n0r May 23, 2026
3e21d6a
refactor(install): extract TOML merging logic into a dedicated function
35C4n0r May 23, 2026
dcea2fc
debug
35C4n0r May 23, 2026
eb9dd48
debug
35C4n0r May 23, 2026
ac7e1a8
debug
35C4n0r May 23, 2026
d4e6866
chore: remove debug logs
35C4n0r May 24, 2026
eaab5d5
test: add idempotent tests to preserve user edits in config
35C4n0r May 24, 2026
b486406
Merge branch 'main' into 35C4n0r/idempotent-codex-config
35C4n0r May 24, 2026
4aa448a
fix: update test assertions for dasel single-quote TOML output
35C4n0r May 24, 2026
fbee712
fix: compare runs 2 and 3 to avoid dasel PATH issue in test
35C4n0r May 24, 2026
5f5c6d1
docs(coder-labs/modules/codex): bump version to 5.0.1
35C4n0r May 24, 2026
1a52b2a
debug
35C4n0r May 25, 2026
b30f521
refactor(coder-labs/modules/codex): build config as JSON via jq, sing…
35C4n0r May 25, 2026
26ad896
fix(coder-labs/modules/codex): address deep-review findings
35C4n0r May 25, 2026
d100931
refactor(coder-labs/modules/codex): streamline config generation and …
35C4n0r May 25, 2026
4ce8186
refactor(coder-labs/modules/codex): restructure config assembly for u…
35C4n0r May 26, 2026
470ce50
refactor(coder-labs/modules/codex): enhance user content preservation…
35C4n0r May 26, 2026
f1064cd
fix(coder-labs/modules/codex): rename sed label to avoid typos-checke…
35C4n0r May 26, 2026
493582d
Merge branch 'main' into 35C4n0r/idempotent-codex-config
35C4n0r May 26, 2026
535e8a6
Merge branch 'main' into 35C4n0r/idempotent-codex-config
DevelopmentCats Jun 8, 2026
4841e17
Merge branch 'main' into 35C4n0r/idempotent-codex-config
35C4n0r Jun 16, 2026
220ffa9
fix(registry/coder-labs/modules/codex): guard missing MANAGED_END and…
35C4n0r Jun 16, 2026
3007099
fix(registry/coder-labs/modules/codex): overwrite config on first run…
35C4n0r Jun 17, 2026
c2360d0
fix(registry/coder-labs/modules/codex): address P2/P3 review findings
35C4n0r Jun 17, 2026
65afb82
fix(registry/coder-labs/modules/codex): stop backward-walk at blank l…
35C4n0r Jun 17, 2026
bde74e8
refactor(coder-labs/modules/codex): replace split/walk with user_befo…
35C4n0r Jun 17, 2026
7ac4bdc
fix(coder-labs/modules/codex): validate MANAGED_END in inputs and doc…
35C4n0r Jun 17, 2026
2f74de8
chore: minor version bump
Jun 18, 2026
5ce0fa5
Merge branch 'main' into 35C4n0r/idempotent-codex-config
35C4n0r Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions registry/coder-labs/modules/codex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Install and configure the [Codex CLI](https://github.com/openai/codex) in your w
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.1.1"
version = "5.2.0"
agent_id = coder_agent.main.id
openai_api_key = var.openai_api_key
}
Expand All @@ -33,7 +33,7 @@ locals {

module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.1.1"
version = "5.2.0"
agent_id = coder_agent.main.id
workdir = local.codex_workdir
openai_api_key = var.openai_api_key
Expand Down Expand Up @@ -64,7 +64,7 @@ resource "coder_app" "codex" {
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.1.1"
version = "5.2.0"
agent_id = coder_agent.main.id
workdir = "/home/coder/project"
enable_ai_gateway = true
Expand All @@ -88,7 +88,7 @@ When `enable_ai_gateway = true`, the module configures Codex to use the `aigatew
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.1.1"
version = "5.2.0"
agent_id = coder_agent.main.id
workdir = "/home/coder/project"
openai_api_key = var.openai_api_key
Expand Down Expand Up @@ -117,7 +117,7 @@ The module exposes the `scripts` output: an ordered list of `coder exp sync` nam
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.1.1"
version = "5.2.0"
agent_id = coder_agent.main.id
openai_api_key = var.openai_api_key
}
Expand All @@ -142,6 +142,28 @@ resource "coder_script" "post_codex" {

When no custom `base_config_toml` is provided, the module uses a minimal default with `preferred_auth_method = "apikey"`. For advanced options, see [Codex config docs](https://developers.openai.com/codex/config-advanced).

> [!NOTE]
> Content you add outside the managed block is preserved across workspace restarts. The module structures the file as:
>
> ```toml
> # bare keys you add above the managed block (root scope)
> my_flag = true
>
> # >>> coder-managed: codex module >>>
> preferred_auth_method = "apikey"
> # ... module-managed content ...
> # <<< coder-managed: codex module <<<
>
> # [sections] you add below the managed block
> [mcp_servers.my_tool]
> command = "my-tool"
> ```
>
> Two constraints to keep the TOML valid:
>
> - Bare keys you place **above** the managed block must not duplicate keys already inside it (duplicate keys are a TOML error).
> - `[section]` headers you place **below** the managed block must not duplicate a table name already defined inside it (same reason). Bare keys placed after the managed block will fall under whatever `[section]` preceded them — place bare keys above the block to keep them at root scope.

## Troubleshooting

Check the log files in `~/.coder-modules/coder-labs/codex/logs/` for detailed information.
Expand Down
Loading
Loading