feat: inject background-jobs prompt guidance when jobs are enabled

Agents whose function pool includes job__* declarations get a Background
Jobs section teaching start/check/collect/cancel discipline and the
snapshot/no-persistence semantics. Presence of the declarations doubles
as the jobs_enabled predicate, so a context with function calling off or
max_concurrent_jobs 0 sees no job prompt text.
This commit is contained in:
2026-08-25 17:36:17 -06:00
parent cb025b7fff
commit 4025b8dacd
2 changed files with 28 additions and 3 deletions
+10
View File
@@ -190,6 +190,16 @@ pub(in crate::config) const DEFAULT_SPAWN_INSTRUCTIONS: &str = indoc! {"
4. **Respond promptly**; the child agent is blocked and waiting (5-minute timeout).
"};
pub(in crate::config) const DEFAULT_JOB_INSTRUCTIONS: &str = indoc! {"
## Background Jobs
For long-running tool calls (builds, test suites, slow commands), call `job__start` and keep
working instead of blocking. Check progress with `job__check` (sparingly), block on the result
with `job__collect`, cancel with `job__cancel`, and list jobs with `job__list`. Collect or
cancel every job you started before ending your turn. Jobs run against a snapshot of the
current config/environment and do not survive coyote exiting."
};
pub(in crate::config) const DEFAULT_TEAMMATE_INSTRUCTIONS: &str = indoc! {"
## Teammate Messaging