Repository navigation
docs(config): document scheduler.agent_timeout_secs - #1032
Open
vernonstinebaker wants to merge 1 commit into
Open
vernonstinebaker wants to merge 1 commit into
vernonstinebaker wants to merge 1 commit into
Conversation
The `scheduler` config block had no user-facing documentation. In particular `agent_timeout_secs` defaults to 0, which means "no timeout", and that value is easy to miss because nothing states it. This matters because cron jobs are dispatched serially on a single scheduler thread: a job that never exits delays every other scheduled job, including heartbeats, for as long as it hangs. Shell-type jobs are already capped at 60s, so agent-type jobs were the only unbounded kind. Adds a `scheduler` section to the English and Chinese configuration guides, and a matching `scheduler` block to config.example.json. Also notes two behaviours an operator would otherwise have to discover the hard way: `max_concurrent` is parsed but not enforced, and the timeout is read once at startup, so a daemon restart is required for a config change to take effect. Docs and example config only; no runtime behaviour changed.
This branch has not been deployed
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
The
schedulerconfig block had no user-facing documentation. In particularagent_timeout_secsdefaults to0, which means no timeout, and nothing in the docs or the example config states that.This matters because cron jobs are dispatched serially on a single scheduler thread. A due job is spawned and awaited before the scheduler looks at the next one, so a job that never exits delays every other scheduled job — including heartbeats — for as long as it hangs. Shell-type cron jobs are already capped separately at 60s, so agent-type jobs were the only unbounded kind.
Adds a
schedulersection to the English and Chinese configuration guides, plus a matchingschedulerblock inconfig.example.json.Changes
docs/en/configuration.md### schedulersection + "Whyagent_timeout_secsmatters"docs/zh/configuration.mdconfig.example.jsonschedulerblockBoth supported languages are updated in the same commit, per AGENTS.md §7.6.
The section documents all four keys and also records two behaviours an operator would otherwise have to discover the hard way:
max_concurrentis parsed but not enforced. It is surfaced bynullclaw cron statusbut the cron scheduler runs one job at a time, so the value does not change scheduling behaviour. Documented as-is rather than described as if it worked — flagging it here in case it should be implemented or removed separately.A known limitation is documented too: on expiry the kill targets the job's direct child only, not its descendants, so a grandchild holding the output pipe can keep the scheduler waiting past the timeout.
Validation
zig build test --summary all— 13/13 steps, 7448/7457 passed, 9 skipped, 0 failures, 0 leaksconfig.example.jsonre-parsed as valid JSONzig fmtuntouched (nosrc/changes)Notes
--no-verify: thepre-pushhook is currently broken onmainbecausegit pushexportsGIT_DIRand the git-dependent tests then run against the real worktree (9 ×skills.test.installSkillFromGit, 1 ×workspace_audit.test). That is unrelated to this change and is already addressed by fix(hooks): clear inherited GIT_DIR before the pre-push test run #1021. The suite passes cleanly whenGIT_DIRis not inherited.