Skip to content

python: handle invalid UTF-8 from local CLI - #97

Merged
luca-ctx merged 1 commit into
ctxrs:mainfrom
atharva-patill:fix/python-sdk-utf8-errors
Jul 8, 2026
Merged

python: handle invalid UTF-8 from local CLI#97
luca-ctx merged 1 commit into
ctxrs:mainfrom
atharva-patill:fix/python-sdk-utf8-errors

Conversation

@atharva-patill

Copy link
Copy Markdown
Contributor

Summary

The Python SDK currently lets UnicodeDecodeError escape when the local ctx CLI returns invalid UTF-8.

This maps that failure into CtxAgentHistoryProtocolError, matching the SDK's existing protocol error handling and keeping the behavior consistent with the other SDKs.

Testing

  • Added a regression test covering invalid UTF-8 from the local CLI.
  • Ran the Python SDK test suite.

@luca-ctx
luca-ctx force-pushed the fix/python-sdk-utf8-errors branch from 98df654 to 29437d8 Compare July 8, 2026 13:00
@luca-ctx
luca-ctx merged commit 08c7c25 into ctxrs:main Jul 8, 2026
luca-ctx pushed a commit to rNoz/ctx that referenced this pull request Aug 2, 2026
…rrors

python: handle invalid UTF-8 from local CLI
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