Skip to content

fix(code-mode): preserve recursive schema types with pctx 0.4.1 - #10572

Merged
lifeizhou-ap merged 2 commits into
mainfrom
lifei/update-pctx
Jul 20, 2026
Merged

fix(code-mode): preserve recursive schema types with pctx 0.4.1#10572
lifeizhou-ap merged 2 commits into
mainfrom
lifei/update-pctx

Conversation

@lifeizhou-ap

@lifeizhou-ap lifeizhou-ap commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Upgrade pctx_code_mode to 0.4.1, which safely supports recursive schemas.

This removes Goose’s temporary schema sanitizer from #10469. Schemas now pass directly to pctx, preserving recursive TypeScript types instead of replacing references with {}.

Also updates the pctx API usage and strengthens the recursive-schema regression test.

Testing

  • Recursive-schema regression test passes
  • Manually verified with a local MCP server:
    • Goose does not crash
    • Code Mode generates the recursive RetainOutputAny type

Related Issues

@lifeizhou-ap lifeizhou-ap changed the title updated pctx version to include the fix of recursive schema bug fix fix(code-mode): preserve recursive schema types with pctx 0.4.1 Jul 20, 2026

@michaelneale michaelneale left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one.

@lifeizhou-ap would be curious how this impact binary size with new version of pctx

@lifeizhou-ap

lifeizhou-ap commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @michaelneale,

We have not introduced any new crates in this PR, and the pctx packages are only about 1.9 KB larger in total.

Is there a particular binary-size impact you're concerned about? It would be helpful to understand so we can investigate it.

Otherwise, we can compare equivalent canary binaries afterward.

@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 7f9bd27 Jul 20, 2026
33 of 34 checks passed
@lifeizhou-ap
lifeizhou-ap deleted the lifei/update-pctx branch July 20, 2026 23:18
michaelneale added a commit that referenced this pull request Jul 21, 2026
* origin/main:
  fix(code-mode): preserve recursive schema types with pctx 0.4.1 (#10572)
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.

2 participants