Skip to content

feat: codex qol updates #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

feat: codex qol updates #348

wants to merge 18 commits into from

Conversation

DevelopmentCats
Copy link
Contributor

Description

  • Removed variables for hardcoded configuration options, and replaced with variables for base config, and additional mcp servers.
  • Set module defaults so that this will run with minimal module configuration for tasks, while allowing further configuration if needed by the user for codex through the base configuration.
  • Updated tests for expected responses and new configuration options.
  • Move all codex related files outside of project folder.

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder-labs/modules/codex
New version: v1.1.0
Breaking change: [X] Yes [ ] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 01:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Codex module for better usability and configuration management. It simplifies variable names, improves defaults, and consolidates configuration files outside the project directory.

  • Replaced granular configuration variables with base_config_toml and additional_mcp_servers for more flexible configuration
  • Set secure defaults to enable minimal configuration while supporting advanced customization
  • Moved all Codex-related files from the project directory to the ~/.codex directory

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
main.tf Consolidated configuration variables and updated variable descriptions with better defaults
scripts/install.sh Refactored configuration generation logic and moved AGENTS.md to ~/.codex directory
scripts/start.sh Improved logging output formatting and updated comments for clarity
main.test.ts Updated tests to reflect new configuration structure and file locations
README.md Updated documentation to reflect new configuration approach and examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

matifali
matifali previously approved these changes Aug 21, 2025
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions and LGTM.

}
```

> [!WARNING]
> **Security Notice**: This module configures Codex with a `workspace-write` sandbox that allows AI tasks to read/write files in the specified folder. While the sandbox provides security boundaries, Codex can still modify files within the workspace. Use this module in trusted environments and be aware of the security implications.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? We do prefer GFM style alerts.

@@ -150,6 +140,6 @@ module "codex" {

## References

- [OpenAI API Documentation](https://platform.openai.com/docs)
- [Codex CLI Documentation](https://github.com/openai/codex)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@matifali matifali enabled auto-merge (squash) August 21, 2025 04:09
@matifali matifali disabled auto-merge August 21, 2025 04:09
Co-authored-by: Atif Ali <[email protected]>
DevelopmentCats and others added 3 commits August 20, 2025 23:17
Co-authored-by: Atif Ali <[email protected]>
Co-authored-by: Atif Ali <[email protected]>
Co-authored-by: Atif Ali <[email protected]>
@@ -53,41 +53,21 @@ variable "codex_version" {
default = "" # empty string means the latest available version
}

variable "extra_codex_settings_toml" {
variable "base_config_toml" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevelopmentCats, are these breaking changes? We are changing the input names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants