Skip to content

feat: add codex template support#86

Merged
neekolas merged 1 commit intoxmtplabs:mainfrom
xmtp-coder-agent:fix/issue-85
Apr 3, 2026
Merged

feat: add codex template support#86
neekolas merged 1 commit intoxmtplabs:mainfrom
xmtp-coder-agent:fix/issue-85

Conversation

@xmtp-coder-agent
Copy link
Copy Markdown
Collaborator

@xmtp-coder-agent xmtp-coder-agent commented Apr 3, 2026

Resolves #85

Summary

  • Adds coderTemplateNameCodex config option (env: CODER_TEMPLATE_NAME_CODEX, default: task-template-codex)
  • When creating a task, selects the codex template if the issue title contains "codex" (case insensitive) or has a "codex" label
  • Passes issue title and labels through the webhook router → dispatcher → handler pipeline

Changes

  • config.ts: New coderTemplateNameCodex field with default task-template-codex
  • schemas.ts: Added coderTemplateNameCodex to HandlerConfig
  • webhook-router.ts: Extract issueTitle and issueLabels from assigned issue payload
  • handler-dispatcher.ts: Pass new config and context fields through
  • handlers/create-task.ts: resolveTemplateName() selects codex template when appropriate
  • Tests: 4 new test cases covering title match, label match, case insensitivity, and default fallback

Test plan

  • All 191 tests pass
  • Typecheck passes
  • Lint + format pass
  • New tests cover: codex in title, codex label, case insensitive match, default template fallback

Note

Add Codex template selection to CreateTaskHandler based on issue title and labels

  • Introduces a coderTemplateNameCodex config field (env: CODER_TEMPLATE_NAME_CODEX, default: task-template-codex) alongside the existing coderTemplateName.
  • CreateTaskHandler gains a resolveTemplateName() method that picks the Codex template when the issue title contains "codex" (case-insensitive) or any label equals "codex"; otherwise falls back to coderTemplateName.
  • WebhookRouter.routeIssuesAssigned now populates issueTitle and issueLabels (normalized from label objects to strings) in the CreateTaskContext so the handler can inspect them.
  • HandlerConfig and the dispatcher are updated to propagate coderTemplateNameCodex and the new issue context fields through the handler pipeline.

Macroscope summarized c1d1acf.

When an issue title contains "codex" (case insensitive) or has a "codex"
label, use the configurable coderTemplateNameCodex template instead of the
default task-template. The new config defaults to "task-template-codex".

Resolves xmtplabs#85

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@neekolas neekolas marked this pull request as ready for review April 3, 2026 04:41
@neekolas neekolas merged commit 2ae2c78 into xmtplabs:main Apr 3, 2026
4 checks passed
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.

Add Codex Support

2 participants