refactor(tui): extract subagent timeout values as named constants#68
Closed
echobt wants to merge 4 commits intodocs/standardize-timeout-documentationfrom
Closed
refactor(tui): extract subagent timeout values as named constants#68echobt wants to merge 4 commits intodocs/standardize-timeout-documentationfrom
echobt wants to merge 4 commits intodocs/standardize-timeout-documentationfrom
Conversation
echobt
added a commit
that referenced
this pull request
Feb 4, 2026
…it, and documentation This PR consolidates the following refactoring changes: - #27: Centralize timeout constants - #43: Replace magic numbers with documented named constants - #67: Use LazyLock for static regex initialization - #68: Extract subagent timeout values as named constants Key changes: - Created centralized timeout module with documented constants - Replaced scattered magic numbers with well-documented constants - Improved static initialization using LazyLock for regexes - Added comprehensive documentation for timeout hierarchy
Contributor
Author
|
Consolidated into #77 - refactor: consolidated code quality improvements - constants, lazy init, and documentation |
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
This PR extracts hardcoded timeout values in the TUI subagent code as named constants with documentation.
Changes
In
src/cortex-tui/src/runner/event_loop/subagent.rs:SUBAGENT_CONNECTION_TIMEOUTconstant (120 seconds) for subagent streaming connection timeoutSUBAGENT_EVENT_TIMEOUTconstant (60 seconds) for per-event timeout during subagent responsesDuration::from_secs()calls with the named constantsRationale
Hardcoded timeout values scattered throughout the code make it difficult to:
Named constants with documentation improve code maintainability and make the codebase easier to audit for timeout configuration.