microsoft / microsoft/vscode

Codex customizations should publish writable migration destinations

Open
#334,950 0 comments 0 reactions 1 assignee Claimed by @Giuspepe View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Problem
For the customization dialog to know what folders can be used as target for new files and for the migrations to work, we require the agent to return `DirectoryCustomization` with `writable: true` for all folders that are valid customization folders, for example `.codex/skills`.
That should happen even if the folder does not (yet) exist or is empty.

Codex currently does not publish usable writable directory records for all of its valid file-based customization destinations:

- Workspace agents: `discoverCodexWorkspaceAgents` omits `.github/agents` unless it already exists and contains discoverable agent files.
- Instructions: `discoverCodexWorkspaceInstructions` represents an existing root `AGENTS.md` using a non-writable directory record.
- Skills: `codexSkillsToContainers` projects the effective skills catalog into synthetic `codex-skills:` records, all non-writable, and omits empty scopes.

Consequently `provideSourceFolders` returns no compatible destinations and `CustomizationMigrationService` filters every migration candidate out.

## Requested change

Have the Codex harness always publish `DirectoryCustomization` records for **all valid writable Codex customization destinations**, including empty destinations. This lets the existing shared `provideSourceFolders` implementation expose all valid workspace and user destinations without special-casing Codex in the migration service.

The published records should:

- use the real writable destination URI (not a synthetic effective-catalog URI);
- set the corresponding `contents` value (`Agent`, `Rule`, or `Skill`);
- be available for both supported workspace and user scopes; and
- be present even before the directory contains an existing Codex customization.

The instruction destination needs an explicit representation compatible with this directory-based contract, since Codex uses `AGENTS.md` as a file destination.

## Expected result

A fresh Codex chat in the reproduction workspace should report the eight workspace and one user files that could be migrated, and the three migration views should offer each candidate to an actual Codex-supported writable destination.

Related: #334938 fixed the narrower equivalent issue for Claude.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.