Add error recovery hooks and PyInstaller frozen build recipes#1388
Open
tilakpatell wants to merge 2 commits intogithub:stagedfrom
Open
Add error recovery hooks and PyInstaller frozen build recipes#1388tilakpatell wants to merge 2 commits intogithub:stagedfrom
tilakpatell wants to merge 2 commits intogithub:stagedfrom
Conversation
aaronpowell
requested changes
Apr 14, 2026
Contributor
aaronpowell
left a comment
There was a problem hiding this comment.
Minor spelling issue with datas in one of the markdown files. Either change it to data or if it has to be datas then we'll need to update the codespell file to allow it.
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.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.stagedbranch for this pull request.Description
Adds two new Python cookbook recipes for the Copilot SDK:
on_post_tool_useandon_error_occurredhooks to classify tool failures (shell errors, permission denials, transient/non-recoverable SDK errors) and append continuation instructions so the LLM keeps investigating instead of giving up._MEIPASS, SSL certificate injection withcertifi, and restoring execute permissions on Unix.Each recipe includes a markdown write-up (
cookbook/copilot-sdk/python/) and a runnable example (cookbook/copilot-sdk/python/recipe/). Both READMEs are updated accordingly.Type of Contribution
Additional Notes
Files added:
cookbook/copilot-sdk/python/error-recovery-hooks.mdcookbook/copilot-sdk/python/recipe/error_recovery_hooks.pycookbook/copilot-sdk/python/pyinstaller-frozen-build.mdcookbook/copilot-sdk/python/recipe/pyinstaller_frozen_build.pyFiles updated:
cookbook/copilot-sdk/python/README.mdcookbook/copilot-sdk/python/recipe/README.mdBy submitting this pull request, I confirm that my contribution abides by the [Code of Conduct](../CODE_OF_CONDUCT.md) and will be licensed under the MIT License.