Skip to content

feat: add OpenAI Codex CLI support#51

Merged
troylar merged 1 commit into
mainfrom
issue-37-codex-support
Feb 15, 2026
Merged

feat: add OpenAI Codex CLI support#51
troylar merged 1 commit into
mainfrom
issue-37-codex-support

Conversation

@troylar
Copy link
Copy Markdown
Owner

@troylar troylar commented Feb 15, 2026

Summary

  • Add CodexTool that manages instruction sections in a single AGENTS.md file using HTML comment markers (<!-- devsync:start:name --> / <!-- devsync:end:name -->)
  • Register Codex in detector, capability registry, component detector, and models
  • 23 unit tests covering install, append, overwrite, uninstall, and edge cases
  • Update README, CHANGELOG, CLAUDE.md with Codex support documentation
  • Bump version to 0.8.0

Closes #37

Test plan

  • pytest tests/unit/test_ai_tools_codex.py -v — all 23 tests pass
  • pytest tests/unit/test_ai_tools_detector.py -v — detector tests pass with 8 tools
  • pytest tests/ -q — full suite passes (1567 passed)
  • invoke quality — lint, format, typecheck all pass
  • CI/CD pipeline passes on GitHub Actions

Closes #37

Add CodexTool with section-based AGENTS.md management using HTML comment
markers for install/uninstall of individual instructions. Includes IDE
capability registry entry, component detector support, and 23 unit tests.
Bump version to 0.8.0.
@github-actions
Copy link
Copy Markdown

📊 Code Quality Report

Linting Issues

All checks passed!

@github-actions
Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  devsync/ai_tools
  codex.py 132-133, 175, 208, 218-219
  detector.py
  devsync/core
  component_detector.py
  models.py
Project Total  

This report was generated by python-coverage-comment-action

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 15, 2026

Codecov Report

❌ Patch coverage is 92.68293% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.58%. Comparing base (3481b94) to head (0448466).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
devsync/ai_tools/codex.py 92.40% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   75.39%   75.58%   +0.19%     
==========================================
  Files          68       69       +1     
  Lines        7176     7257      +81     
==========================================
+ Hits         5410     5485      +75     
- Misses       1766     1772       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@troylar troylar merged commit 1f49266 into main Feb 15, 2026
19 of 24 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04484661fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread devsync/ai_tools/codex.py
)
if project_root is None:
raise ValueError("project_root is required for PROJECT scope")
return project_root / "AGENTS.md"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route Codex instruction changes through section APIs

This tool now maps every instruction to the same file (AGENTS.md), but the main install/uninstall paths still treat installed_path as one-file-per-instruction (install_new._perform_installation writes the full file directly, and cli/uninstall.py unlinks it). In practice, installing multiple Codex instructions causes later installs to conflict/overwrite the whole file, and uninstalling one instruction can delete all Codex/manual content from AGENTS.md; this should use CodexTool.install_instruction/uninstall_instruction section logic instead of raw file writes/deletes.

Useful? React with 👍 / 👎.

Comment thread devsync/ai_tools/codex.py
if not overwrite:
raise FileExistsError(f"Instruction already exists in AGENTS.md: {instruction.name}")
pattern = SECTION_PATTERN.format(name=re.escape(instruction.name))
content = re.sub(pattern, section, content, flags=re.DOTALL)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Escape Codex overwrite replacement content

re.sub(pattern, section, content, flags=re.DOTALL) treats backslashes in section as backreferences, so overwrite fails or corrupts output when instruction content includes sequences like \1 (for example regex docs or Windows-style text), raising re.error: invalid group reference in real usage. Use a literal replacement strategy (e.g., function replacement) so instruction text is written verbatim.

Useful? React with 👍 / 👎.

@troylar troylar deleted the issue-37-codex-support branch February 22, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add OpenAI Codex CLI support (AGENTS.md)

1 participant