fix: /new command now cancels running processes (#222)#223
Merged
Nathan Schram (nathanschram) merged 2 commits intodevfrom Mar 23, 2026
Merged
fix: /new command now cancels running processes (#222)#223Nathan Schram (nathanschram) merged 2 commits intodevfrom
Nathan Schram (nathanschram) merged 2 commits intodevfrom
Conversation
…ons (#222) Previously /new only cleared stored resume tokens, leaving old Claude/Codex/OpenCode processes running (~400 MB each). This leaked processes and worsened memory pressure, contributing to earlyoom kills (rc=143). Now /new cancels all running tasks for the chat before clearing sessions. Reply message shows "cancelled run and cleared" when a process was killed. - Add _cancel_chat_tasks() helper to topics.py - Add running_tasks param to both /new handlers - Pass running_tasks through all 3 call sites in loop.py - Add running_tasks field to TelegramCommandContext - 10 new tests covering cancellation behaviour - Update 7 docs to reflect new /new behaviour - Bump version to 0.35.0rc12 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
/newnow cancels all running tasks for the chat before clearing sessionsCloses #222
Changes
src/untether/telegram/commands/topics.py—_cancel_chat_tasks()helper; updated both/newhandlerssrc/untether/telegram/loop.py—running_tasksinTelegramCommandContext; passed through all call sitestests/test_telegram_topics_command.py— 10 new tests/newbehaviour0.35.0rc12Test plan
@untether_dev_bot:/newwhile running → cancelled + cleared/newwhile running → cancelled + cleared/newwhile running → cancelled + clearednew.cancelled_runningevent with chat_id and count🤖 Generated with Claude Code