feat: auto-reply for recoverable agent interruptions (429/503)#342
Open
ijry wants to merge 7 commits into
Open
feat: auto-reply for recoverable agent interruptions (429/503)#342ijry wants to merge 7 commits into
ijry wants to merge 7 commits into
Conversation
added 7 commits
July 15, 2026 08:47
Document the frontend-only auto-reply feature for recoverable interruptions (429/503), including per-conversation enable, settings-managed rules, countdown banner, and loop protection.
Break the frontend-only auto-reply feature into TDD tasks for match helpers, storage, engine lifecycle, i18n, banner/+ menu, settings, and PR.
Introduce pure rule matching for 429/503, localStorage settings/enable maps, and a conversation-scoped engine with cancel, cooldown, and max-per-burst protection.
Add Auto Reply copy across all locales for the + menu toggle, countdown banner, and settings page. EN and zh-CN use real copy; other locales keep key parity with EN.
Host the auto-reply engine in the conversation shell, show a pre-send countdown banner above the composer, cancel pending replies on manual send/enqueue, and expose a per-conversation enable switch in the + menu.
Add an Auto Reply settings route and nav entry to manage match rules, delays, cooldowns, and max-per-burst limits. Builtin 429/503 rules stay editable but not deletable.
Format auto-reply modules for prettier, update onSend via effect instead of during render, and allow intentional setState in the signal-sync effect used by the countdown engine.
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.
中文
摘要
为 Codeg 增加前端 自动回复(Auto Reply) 能力,在无人值守场景下自动处理可恢复中断(默认覆盖 HTTP 429 / HTTP 503),按配置延迟发送「继续」等回复,提升长任务执行成功率。
动机
智能体任务可能因限流、临时服务不可用等意外中断。若这些可恢复错误能被自动处理,可显著减少人工值守成本。
行为
+菜单中手动开启/关闭,仅作用于当前会话/settings/auto-reply管理规则;内置 429、503 → 回复继续(可编辑,不可删除)delayMs,发送前在输入框上方展示倒计时横幅connected且无权限/提问对话框时发送;prompting时不发测试计划
pnpm exec vitest run src/lib/auto-reply src/hooks/use-auto-reply-engine.test.ts src/i18n/messages.test.ts(30 passed)English
Summary
Add a frontend Auto Reply feature that recovers unattended agent tasks from recoverable interruptions (built-in HTTP 429 / HTTP 503) by auto-sending a configured reply (default
继续) after a visible delay.Motivation
Agent runs can stall on rate limits or temporary service failures. Automatically handling those recoverable cases improves unattended success rate.
Behavior
+menu/settings/auto-reply; builtins 429/503 →继续(editable, not deletable)connectedand no permission/question dialogs; never whilepromptingTest plan
pnpm exec vitest run src/lib/auto-reply src/hooks/use-auto-reply-engine.test.ts src/i18n/messages.test.ts(30 passed)继续