Skip to content

fix(core): break skill import cycle#37479

Open
armancharan wants to merge 1 commit into
anomalyco:v2from
armancharan:fix/skill-import-cycle
Open

fix(core): break skill import cycle#37479
armancharan wants to merge 1 commit into
anomalyco:v2from
armancharan:fix/skill-import-cycle

Conversation

@armancharan

@armancharan armancharan commented Jul 17, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #37424

#37424

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Importing @opencode-ai/core/skill first crashed on a cycle through permission and session. SkillNotFoundError was reading SkillV2.ID before that module finished loading.

Use Skill.ID from the schema package for the error and skill input type instead. Same ID schema, no init-order dependency.

How did you verify your code works?

  • Reproduced the crash on v2, then confirmed the import exits 0 after the change
  • bun test test/public-import.test.ts
  • bun run typecheck in packages/core

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

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.

1 participant