feat: raise max_bot_turns default to 100, raise hard cap to 1000#741
feat: raise max_bot_turns default to 100, raise hard cap to 1000#741
Conversation
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
3e35d1c to
391e554
Compare
391e554 to
82ec18c
Compare
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening report## IntentPR #741 is trying to make OpenAB tolerate longer bot-driven conversations by raising the default bot turn budget and removing an overly low hardcoded consecutive-bot-message cap. The operator-visible problem is that multi-agent or long-running collaboration flows can stop too early under the current defaults. The existing FeatThis is a feature/configuration change. Behaviorally, it changes Discord and Slack defaults so bots can continue longer by default:
The PR title says “raise hard cap to 1000,” but the body describes a configurable field defaulting to 100. That mismatch should be clarified before merge. Who It ServesPrimary beneficiaries:
Secondary beneficiaries:
Rewritten PromptImplement configurable bot turn limits for Discord and Slack. Raise the default Preserve backward compatibility for existing configs. Add or update tests to verify default values, config deserialization, and adapter behavior when the consecutive bot cap is reached. Ensure the PR title, docs, and implementation agree on whether the maximum allowed value is 100, 1000, or simply operator-configurable. Merge PitchThis is worth advancing because it removes an artificial ceiling that blocks realistic multi-agent collaboration. Making the consecutive cap configurable is better than forcing every deployment into the same short limit. Risk profile is moderate. The functional change is small, but the operational impact is meaningful: higher defaults can increase token usage, longer bot loops, and noise in shared channels if guardrails are weak. Likely reviewer concern: whether raising defaults to 100 is safe for public Discord/Slack deployments, and whether there is still a clear upper bound or runaway-loop protection. Best-Practice ComparisonOpenClaw principles that apply:
Hermes Agent principles that apply:
Overall, the PR aligns with the “make limits explicit” principle, but it does not by itself provide OpenClaw/Hermes-style durable execution safety, run logs, or stronger loop isolation. Implementation OptionsConservative option: expose the new config field but keep defaults lower. Add Balanced option: merge the PR direction with clarified caps and tests. Raise Ambitious option: introduce richer autonomous-run guardrails. In addition to configurable turn caps, add structured run tracking, reason-coded termination, per-adapter observability, optional token/time budgets, and admin-facing logs. This would better support multi-agent workflows but should probably be split from the current PR. Comparison Table
RecommendationAdvance the balanced option, but require cleanup before merge. The PR addresses a real friction point and the implementation scope appears appropriately small. The next reviewer should focus on consistency and safety: resolve the title/body mismatch around “hard cap to 1000,” confirm whether any validation maximum exists, and add tests around default config values plus enforcement of Recommended sequencing: merge the configurable limits as a focused change, then open a follow-up for stronger long-run observability and termination reasons if OpenAB expects multi-agent sessions to become common. |
Review SummaryThree monks reviewed and approved. Looking for additional community feedback before merge. What this PR does
Design decisions
Files changed
cc @openabdev/contributors — any NITs or concerns? |
82ec18c to
34a962c
Compare
- Change default max_bot_turns from 20 to 100 (both Discord and Slack) - Raise hardcoded MAX_CONSECUTIVE_BOT_TURNS from 10 to 1000 (not configurable — absolute safety cap) - Update Helm chart, values.yaml, config.toml.example, and docs
34a962c to
87989b1
Compare
Summary
max_bot_turns: 20 → 100 (both Discord and Slack)MAX_CONSECUTIVE_BOT_TURNS = 10— now configurable viamax_consecutive_bot_turns(default: 100)Motivation
The old default of 20 was too conservative for multi-agent collaboration scenarios. Many users already override it to 100+. The hardcoded cap of 10 consecutive bot messages was also too restrictive and not configurable at all.
Changes
src/config.rsdefault_max_bot_turns()→ 100; newmax_consecutive_bot_turnsfield (default 100) in bothDiscordConfigandSlackConfigsrc/discord.rsconst MAX_CONSECUTIVE_BOT_TURNS; useself.max_consecutive_bot_turnssrc/slack.rsconst MAX_CONSECUTIVE_BOT_TURNS; use function parametersrc/main.rsdocs/config-reference.mddocs/discord.mdconfig.toml.examplecharts/openab/values.yamlmaxConsecutiveBotTurnscharts/openab/templates/configmap.yamlMigration
No breaking changes. Existing configs without the new field get the new defaults (100/100). Users who previously set
max_bot_turnskeep their value.