{{ message }}
Repository navigation
Conversation
…c (v2.13 re-apply, 3rd wipe cycle; matches upstream PR agent0ai#1797)
…on user-initiated actions
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.

What
The scheduler tool currently derives a task's project exclusively from the active chat context (
get_context_project_name), so agents cannot register scheduled tasks in any project other than the one they're chatting in. This PR adds an optionalprojectargument tocreate_scheduled_task,create_adhoc_task,create_planned_task, andupdate_taskthat overrides the context-derived project. Behavior when the argument is omitted is unchanged (falls back to context project), and unknown project names produce a loud error instead of silently mis-filing the task.Why
Cross-project orchestration is a common pattern: an infrastructure agent builds scheduled tasks on behalf of other projects (an assistant, a monitoring agent, a content team). Today the only way to place a task in project B is to open a chat inside project B — otherwise the task silently binds to the wrong project and surfaces in the wrong chat grouping with the wrong default agent.
How
_project_metadata_from_kwargs()helper on the scheduler tool: resolves an explicitprojectkwarg (validating viaload_basic_project_data), else falls back to_resolve_project_metadata().update_taskroute through it; update_task additionally writesproject_name/project_colorwhen the arg is supplied.Responseerror, no task created/modified.Testing
list_tasksshows the intended project.Rebased onto v2.13 (e3051fb) from an earlier internal build.
Filed from wgnr.ai Ops. Dev-ticket: dev-ticket-2026-10-05-scheduler-project-binding-from-context.md