fix(code-mode): preserve recursive schema types with pctx 0.4.1 - #10572
Merged
Conversation
michaelneale
approved these changes
Jul 20, 2026
michaelneale
left a comment
Collaborator
There was a problem hiding this comment.
nice one.
@lifeizhou-ap would be curious how this impact binary size with new version of pctx
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. |
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade
pctx_code_modeto0.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
RetainOutputAnytypeRelated Issues
goose servecrashes with SIGABRT — unbounded recursion inpctx_codegenschema processing when MCP server returnsoutputSchema#10256 and fix(acp): break self-referential $ref cycles before Code Mode schema #10469