feat: add Support Engineer (auto error detection and repair)#195
Open
Paritoshdagar wants to merge 1 commit intoRichardAtCT:mainfrom
Open
feat: add Support Engineer (auto error detection and repair)#195Paritoshdagar wants to merge 1 commit intoRichardAtCT:mainfrom
Paritoshdagar wants to merge 1 commit intoRichardAtCT:mainfrom
Conversation
- New module src/scheduler/support_engineer.py: - Runs as APScheduler cron job (* * * * *) every minute - Scans messages table for errors (messages.error IS NOT NULL) - Matches against KNOWN_ERRORS patterns - Applies fixes: hindsight bank recreation, bot.db reclone, homedir perms - Logs fix attempts to support_fixes table - Escalates unknown errors to owner via Telegram (chat_id from APPROVED_USERS) - Uses existing telegram.Bot instance via set_bot_and_owner() - main.py: wires SupportEngineer into lifecycle after scheduler - config/features.py: adds support_engineer_enabled property - config/settings.py: adds enable_support_engineer field (env: ENABLE_SUPPORT_ENGINEER) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Paritoshdagar
added a commit
to Paritoshdagar/claude-tenant-platform
that referenced
this pull request
Apr 25, 2026
…s) (#10) Support Engineer runs as a cron job (* * * * *) inside the existing claude-code-telegram bot process. Every minute it: - Scans messages table for errors (messages.error IS NOT NULL) - Matches against KNOWN_ERRORS patterns - Applies fixes: hindsight bank recreation, bot.db reclone, homedir perms - Logs fix attempts to support_fixes table - Escalates unknown errors to owner via Telegram (chat_id from APPROVED_USERS) Implementation: - src/scheduler/support_engineer.py (new module in bot codebase) - main.py: wires SupportEngineer into lifecycle (ENABLE_SUPPORT_ENGINEER=true) - config/features.py: adds support_engineer_enabled property - config/settings.py: adds enable_support_engineer field Bot repo: https://github.com/Paritoshdagar/claude-code-telegram PR: RichardAtCT/claude-code-telegram#195 feat(phase4): add tenant_activate.py and tenant_deactivate.py tenant_activate.py: - Reads tenant from bot.db, installs per-tenant systemd service - Creates /etc/systemd/system/claude-tenant@<username>.service - Runs systemctl daemon-reload + start Note: Per-tenant Claude Code sessions require Claude Code installed system-wide or per-user (currently installed under /root/.local/). Service installs but will fail until Claude is made system-accessible. tenant_deactivate.py: - systemctl stop + disable + removes unit file Co-authored-by: Claude Opus 4.7 <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
Adds a
SupportEngineerclass that runs as an APScheduler cron job (every minute) inside the existing bot process. Scansbot.dbfor errors, matches against known patterns, applies fixes, and escalates unknowns to the owner via Telegram.Test plan
support_engineer.enabledin logs)* * * * *)support_fixestable🤖 Generated with Claude Code