Skip to content

Codex skill injection should be additive with user-defined skills #90

@justinchoo93

Description

@justinchoo93

Context

When Freshell launches a Codex session, it injects orchestration skills via -c skills.config=[...]. This replaces the entire skills.config array, so any user-defined Codex skills in ~/.codex/config.toml are silently dropped.

The previous implementation (pre-#89) attempted additivity using high-index dotted keys (skills.config.400000.path=...), but that approach never worked — Codex's TOML parser rejects dotted keys on array fields, causing every Codex session to crash with Error loading config.toml: invalid type: map, expected a sequence.

Expected behavior

Freshell-injected skills should be merged with the user's existing skills.config entries, not replace them.

Suggested approach

  1. Read ~/.codex/config.toml at spawn time
  2. Parse existing skills.config entries (requires adding a TOML parser like smol-toml)
  3. Merge Freshell entries with user entries
  4. Emit the combined array via -c skills.config=[...]

Impact

Only affects users who maintain custom Codex skills in their config.toml. Currently low impact since Codex skill injection was completely broken before #89.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions