feat(api-server): let agents manage their own schedules via MCP#254
Open
feat(api-server): let agents manage their own schedules via MCP#254
Conversation
Closes #236. Agents can now create, list, toggle, and delete the schedules attached to their own instance by calling MCP tools on the existing harness `/api/instances/:id/mcp` endpoint — no human UI step required. Schedules are scoped to the calling instance by construction (session.instanceId from the URL + existing bearer-token auth), so one agent cannot touch another's schedules. - ScheduleSpec: new `createdBy: "user" | "agent"` (default `"user"`) persisted in the ConfigMap and surfaced via the schedule view - New label `humr.ai/created-by` for quick filtering in K8s - MCP tools: list/create/toggle/delete with assertive descriptions that explicitly steer Claude Code away from its in-process scheduled-tasks tool toward these persistent, platform-level schedules - UI: amber "agent" badge on schedules the agent scheduled itself - Claude Code agent image: CLAUDE.md at workspace root nudges the model to prefer humr-outbound schedule tools Signed-off-by: Lukáš Janeček <xjacka@gmail.com>
jezekra1
approved these changes
Apr 22, 2026
Tomas2D
approved these changes
Apr 23, 2026
tomkis
approved these changes
Apr 24, 2026
Contributor
Author
|
🛡️ Humr — Code Review PR #254: feat(api-server): let agents manage their own schedules via MCPAuthor: xjacka | Branch: feat/agent-schedules → main | Changes: +176 −22 (12 files) SummaryExposes persistent cron schedule management as MCP tools ( Findings
VerdictAPPROVE — clean, well-scoped feature; the TOCTOU is low-impact in practice. Review by Humr · automated code guardian |
This was referenced Apr 27, 2026
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.
Agents can now create, list, toggle, and delete the schedules attached to their own instance by calling MCP tools on the existing harness
/api/instances/:id/mcpendpoint — no human UI step required. Schedules are scoped to the calling instance by construction (session.instanceId from the URL + existing bearer-token auth), so one agent cannot touch another's schedules.createdBy: "user" | "agent"(default"user") persisted in the ConfigMap and surfaced via the schedule viewhumr.ai/created-byfor quick filtering in K8sSummary
Related issue(s)
(Optional) Testing Instructions
Fixes #236