Skip to content

fix(telegram): base claude /model + /restart use _self_restart on standard boxes (DIVE-1822)#14

Merged
lodar merged 1 commit into
mainfrom
dive-1822-base-selfrestart
Jul 24, 2026
Merged

fix(telegram): base claude /model + /restart use _self_restart on standard boxes (DIVE-1822)#14
lodar merged 1 commit into
mainfrom
dive-1822-base-selfrestart

Conversation

@lodar

@lodar lodar commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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 inline sudo -n systemd-run … systemctl restart 5dive-agent@\${me}.service for sudo -n 5dive agent _self_restart.

Why

On a standard-isolation (customer) box the scoped sudoers grants exactly _self_restart and NOT systemd-run, so base-claude /model + /restart failed with sudo: a password is required (the DIVE-1813 bug, base variant). _self_restart restarts 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

  • Base is separate lineage from telegram-grok: generate.ts --check byte-exact on agy/grok (no variant churn), base transpiles clean (262 modules, 0 errors).
  • Bump 0.5.32 → 0.5.33.

Remaining DIVE-1822 items handed to verifier (Marcus)

  1. 5dive-api fresh-box smoke assertion: /model + /restart succeed on a STANDARD claude agent (needs the Hetzner smoke harness).
  2. Reconcile projects/CLAUDE.md + 5dive/CLAUDE.md self-restart snippet (both still show the broken sudo systemd-run … systemctl restart) to sudo 5dive agent _self_restart + scope the You have sudo line (DIVE-1812).

🤖 Generated with Claude Code

…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>
@lodar
lodar merged commit 8e1b476 into main Jul 24, 2026
2 checks passed
@lodar
lodar deleted the dive-1822-base-selfrestart branch July 24, 2026 11:50
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.

1 participant