Repository navigation
Conversation
POST /api/agents/[id]/run answered 202 with status 'queued' and stamped the agent's lastRun, but nothing reads Agent rows: no job was queued and no worker ran the agent. The route now answers 501 and says the run did not happen, and no longer touches lastRun. The Run button is disabled by default and the Agents page says why, so the UI stops offering a run that cannot happen. Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
Closes #218.
POST /api/agents/[id]/runanswered 202 withstatus: 'queued'and stamped the agent'slastRun, but nothing in the queue or the worker readsAgentrows — no job was queued and no agent ran. The 202, thequeuedstatus and the fresh timestamp were three independent signals that the agent ran; none of them was true.This takes the issue's option 2:
lastRun.Option 1 (a real
AGENT_RUNjob type and a worker handler) is a larger piece of work and is left for a separate decision. The run button comes back with it:AgentActions/AgentTabletake arunsAvailableprop that defaults to unavailable, so a consumer that forgets it gets a disabled button rather than a dead end.Agents stamped by the old route keep their old
lastRunvalues; clearing those is a data change and is left out of this PR.Tests:
apps/webagents API and component suites — 48/48 passed. The new tests (the route reports no run and does not touchlastRun; the run button is disabled by default and enabled only when runs are available) fail on the previous implementation.apps/websuite — 1216 passed, 26 skipped, 0 failedgit diff --checkpassedcopilotkit-internal:cr-loopis unavailable; its findings (the disabled default forrunsAvailable, the tooltip that disabled buttons never show, and the untestedAgentTablepass-through) are addressed.🤖 Generated with Claude Code