fix(telegram): base claude /model + /restart use _self_restart on standard boxes (DIVE-1822)#14
Merged
Merged
Conversation
…ndard boxes (DIVE-1822) Mirrors the fork fix (#13, DIVE-1813) for the base claude telegram plugin. All 7 self-restart sites (applyModel, applyEffort, /restart, /resume x2, ho:restart, /login restart-after-auth) replaced the inline 'sudo -n systemd-run ... systemctl restart 5dive-agent@${me}.service' with 'sudo -n 5dive agent _self_restart'. On a standard-isolation (customer) box the scoped sudoers grants exactly _self_restart and NOT systemd-run, so /model + /restart previously failed with 'sudo: a password is required'. _self_restart restarts ONLY the caller's own unit (derived from SUDO_USER, never argv) and defers internally, preserving ack-before-restart ordering. Works on admin boxes too (5dive * grant). Base is separate lineage from telegram-grok: generator --check byte-exact on all forks (no variant churn), base transpiles clean. Bump 0.5.32 -> 0.5.33. Co-Authored-By: Claude Opus 4.8 <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.
Mirrors the merged fork fix (#13, DIVE-1813) for the base claude telegram plugin — the one variant #13 did not cover.
What
All 7 self-restart sites in
plugins/telegram/server.ts(applyModel, applyEffort, /restart, /resume x2, ho:restart button, /login restart-after-auth) swap the inlinesudo -n systemd-run … systemctl restart 5dive-agent@\${me}.serviceforsudo -n 5dive agent _self_restart.Why
On a standard-isolation (customer) box the scoped sudoers grants exactly
_self_restartand NOTsystemd-run, so base-claude /model + /restart failed withsudo: a password is required(the DIVE-1813 bug, base variant)._self_restartrestarts ONLY the caller own unit (SUDO_USER-derived, never argv) and defers internally, preserving ack-before-restart. Works on admin boxes too (5dive *grant).Verify
generate.ts --checkbyte-exact on agy/grok (no variant churn), base transpiles clean (262 modules, 0 errors).Remaining DIVE-1822 items handed to verifier (Marcus)
projects/CLAUDE.md+5dive/CLAUDE.mdself-restart snippet (both still show the brokensudo systemd-run … systemctl restart) tosudo 5dive agent _self_restart+ scope the You have sudo line (DIVE-1812).🤖 Generated with Claude Code