Expose heartbeat default_timeout_secs in config.toml#775
Open
pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
Open
Expose heartbeat default_timeout_secs in config.toml#775pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
Add a [heartbeat] section to KernelConfig so users can tune the inactivity timeout that determines when agents are marked unresponsive. Reactive agents (hands) that sit idle between infrequent requests were getting marked as crashed after the hardcoded 180s default, causing the first request after idle to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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
[heartbeat]section toKernelConfigwith adefault_timeout_secsfield (default: 180)start_heartbeat_monitorto read the configured timeout instead of using the hardcoded defaultdocs/configuration.mdProblem
Reactive agents (hands) that sit idle between infrequent requests get marked as crashed after the hardcoded 180-second inactivity timeout. This causes the first request after an idle period to fail with a health-check error, requiring the kernel to recover the agent before it can serve the request.
Users with hands that are called infrequently (e.g., a code-review hand invoked a few times per day) need to increase this timeout without modifying source code.
Usage
Per-agent
heartbeat_interval_secsin autonomous config continues to override this global default.Test plan
cargo test -p openfang-types -- config::tests::test_heartbeatpasses (4 new tests)cargo test -p openfang-kernel -- heartbeat::tests::test_heartbeat_config_custom_timeoutpasses[heartbeat] default_timeout_secs = 600logs the custom value[heartbeat]section preserves the 180s default🤖 Generated with Claude Code