Skip to content

feat(config): add [reasoning_only] section for retry count and custom… - #5867

Open
Gabriel-Degret wants to merge 2 commits into
Hmbown:mainfrom
Gabriel-Degret:feat/reasoning-only-config
Open

feat(config): add [reasoning_only] section for retry count and custom…#5867
Gabriel-Degret wants to merge 2 commits into
Hmbown:mainfrom
Gabriel-Degret:feat/reasoning-only-config

Conversation

@Gabriel-Degret

@Gabriel-Degret Gabriel-Degret commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a [reasoning_only] config section to make the reasoning-only retry behavior user-configurable.

Before: MAX_REASONING_ONLY_REPROMPTS = 2 was hardcoded. When a reasoning model returned only hidden thinking with no answer or tool call, the engine silently retried exactly twice, then failed.

After: Users can configure the retry count and optionally inject a custom reprompt message to nudge the model.

[reasoning_only]
# Maximum number of automatic re-requests (default: 2). Set to 0 to disable.
max_reprompts = 2

# Optional message sent as a user turn before each retry.
reprompt_message = "So, what's up ? Keep running !"

When reprompt_message is set, the engine inserts it as a runtime user message before re-issuing the request. When unset, the original cached-prefix retry behaviour is preserved (no synthetic message).

Testing

  • cargo fmt --all -- --check — clean
  • cargo clippy --workspace --all-targets --all-features --locked — warning-free under the CI allow list
  • cargo test --workspace --all-features --locked — passes, including 8 existing reasoning_only tests and 1 new config test

Checklist

  • Updated docs or comments as needed (docs/CONFIGURATION.md)
  • Added or updated tests where relevant (crates/tui/src/config/tests.rs)
  • Verified TUI behavior manually if UI changes — no UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Thanks @Gabriel-Degret for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@Gabriel-Degret
Gabriel-Degret force-pushed the feat/reasoning-only-config branch from 0922990 to e361f6c Compare September 3, 2026 13:38
@Gabriel-Degret
Gabriel-Degret force-pushed the feat/reasoning-only-config branch from e361f6c to cd21201 Compare September 3, 2026 14:03
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