Skip to content

fix(omo): prevent duplicate Orca-mirrored agent roles - #151

Closed
glen-tl wants to merge 3 commits into
code-yeongyu:mainfrom
glen-tl:lazycodex/bug-fix-orca-agent-duplicates
Closed

fix(omo): prevent duplicate Orca-mirrored agent roles#151
glen-tl wants to merge 3 commits into
code-yeongyu:mainfrom
glen-tl:lazycodex/bug-fix-orca-agent-duplicates

Conversation

@glen-tl

@glen-tl glen-tl commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • skip materializing bundled agent TOMLs when Orca already registers the role from a foreign runtime path
  • remove only previously LazyCodex-managed local copies whose contents still match the previous staged TOML
  • preserve user-owned or user-modified same-name agent files
  • keep the shipped dist/cli.js behavior in sync with the TypeScript source

Root cause

Orca mirrors [agents.<name>] entries into its runtime CODEX_HOME/config.toml, pointing at another runtime's agent file. LazyCodex's bootstrap filtered the config update but still copied the same bundled TOML into the active CODEX_HOME/agents/ directory. Codex then auto-discovered both paths and reported duplicate agent roles.

Validation

  • node --test plugins/omo/test/bootstrap-*.test.mjs: 51 passed
  • node --check plugins/omo/components/bootstrap/dist/cli.js: passed
  • shipped CLI QA: managed copy removed; replaced user file preserved; unmanaged user file preserved
  • node components/bootstrap/scripts/build.mjs: exit 0; this sparse checkout emits pre-existing unresolved sibling-import warnings and retains the existing bundled dist

Fixes #150
Related: #149


Summary by cubic

Prevents duplicate agent roles when Orca mirrors agents into config.toml. We now skip staging mirrored roles, remove only previously managed copies, and preserve user files.

  • Bug Fixes
    • Skip staging bundled *.toml when config.toml already points to a foreign runtime path.
    • Remove only LazyCodex-managed copies that still match previously staged content; leave user-owned or modified files.
    • Track installed agents via .installed-agents.json to safely prune only managed duplicates.
    • Keep plugins/omo/components/bootstrap/dist/cli.js in sync with the TypeScript source and add tests for idempotent runs and user-file preservation.

Written for commit 5651d0e. Summary will update on new commits.

Review in cubic

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! Changes to LazyCodex land through oh-my-openagent — could you open this against omo-codex over there instead? PRs in this repository can't be merged.

If you're working with a coding agent, prompt it like this:

I opened #151 ("fix(omo): prevent duplicate Orca-mirrored agent roles") against code-yeongyu/lazycodex, but changes there land through code-yeongyu/oh-my-openagent, where the Codex implementation lives under packages/omo-codex. Read my original PR, then open an equivalent PR against code-yeongyu/oh-my-openagent. In the new PR body, link the original PR (#151), explain that it was first opened against lazycodex, and describe in detail what that PR changed and why.

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.

Fix duplicate agent roles in Orca-managed Codex homes

1 participant