Skip to content

Conversation

@mhamel
Copy link

@mhamel mhamel commented Jan 8, 2026

This commit addresses three critical issues:

  1. Windows Compatibility: Added explicit UTF-8 encoding to subprocess calls in claude.py and codex.py to ensure proper execution on Windows systems where the default encoding may differ.

  2. Telegram Special Characters: Fixed encoding issues with special characters (accents, emojis, etc.) in Telegram messages by:

    • Adding UTF-8 encoding to subprocess calls
    • Implementing fallback mechanism in telegram.py to retry without parse_mode when markdown parsing fails with special characters
  3. Codex Session Control: Added TELECODE_CODEX_PERSIST_SESSION configuration option to control whether Codex sessions are persisted across messages:

    • Default: enabled (1) - maintains backward compatibility
    • Set to 0 to disable session persistence (fresh context each message)
    • Added startup debug output to show current configuration
    • Updated README.md and CLAUDE.md documentation

Breaking Changes: None - all changes are backward compatible.

Fixes issues with non-ASCII characters and provides better control over AI session management.

mathieu hamel added 3 commits January 8, 2026 13:31
This commit addresses three critical issues:

1. **Windows Compatibility**: Added explicit UTF-8 encoding to subprocess calls in
   claude.py and codex.py to ensure proper execution on Windows systems where the
   default encoding may differ.

2. **Telegram Special Characters**: Fixed encoding issues with special characters
   (accents, emojis, etc.) in Telegram messages by:
   - Adding UTF-8 encoding to subprocess calls
   - Implementing fallback mechanism in telegram.py to retry without parse_mode
     when markdown parsing fails with special characters

3. **Codex Session Control**: Added TELECODE_CODEX_PERSIST_SESSION configuration
   option to control whether Codex sessions are persisted across messages:
   - Default: enabled (1) - maintains backward compatibility
   - Set to 0 to disable session persistence (fresh context each message)
   - Added startup debug output to show current configuration
   - Updated README.md and CLAUDE.md documentation

Breaking Changes: None - all changes are backward compatible.

Fixes issues with non-ASCII characters and provides better control over AI
session management.
The previous implementation used 'claude.cmd' on Windows, but the actual
installed binary is 'claude.exe'. Simplifying to just 'claude' works
across all platforms since Windows automatically resolves to .exe files
in PATH.
- Added support for both /new (Codex) and /clear (Claude) commands
- Both commands clear the current engine's session ID
- Single menu entry shows '/clear or /new' to indicate both work
- Provides user feedback confirming session reset
Copy link
Owner

@polinom polinom left a comment

Choose a reason for hiding this comment

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

Thanks for fixing staff. I'd be happy to merge it in if you raise PR 👍

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