claude-code - 💡(How to fix) Fix Routines: POST /v1/code/triggers/{trigger_id}/run returns 400 'trigger_id: Extra inputs are not permitted' [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55559Fetched 2026-05-03 04:50:16
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

The manual-run endpoint for scheduled remote agents (routines) is rejecting all requests with HTTP 400. The Run now button in the routines UI hits this endpoint and is therefore unusable. Recurring schedules still fire normally.

Error Message

"type": "error", "error": { The error message implies that trigger_id, which is part of the URL path, is also being routed into the request body schema, which then rejects it as an unknown field.

  • POST /v1/code/triggers/{trigger_id}/run (action: run) — fails with the error above

Root Cause

The manual-run endpoint for scheduled remote agents (routines) is rejecting all requests with HTTP 400. The Run now button in the routines UI hits this endpoint and is therefore unusable. Recurring schedules still fire normally.

Fix Action

Workaround

Creating a one-shot routine with run_once_at set ~2 minutes in the future bypasses the broken /run endpoint by using the scheduler itself to fire the job. This works but is awkward for routine users who expect the Run now button to function.

Code Example

POST /v1/code/triggers/{trigger_id}/run

---

HTTP 400
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "trigger_id: Extra inputs are not permitted"
  }
}
RAW_BUFFERClick to expand / collapse

Summary

The manual-run endpoint for scheduled remote agents (routines) is rejecting all requests with HTTP 400. The Run now button in the routines UI hits this endpoint and is therefore unusable. Recurring schedules still fire normally.

Repro

  1. Create a routine via the /schedule skill (or the UI). Confirm it appears in list and get.
  2. Try to trigger it manually:
POST /v1/code/triggers/{trigger_id}/run

Both with an empty body and with {}:

HTTP 400
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "trigger_id: Extra inputs are not permitted"
  }
}

The error message implies that trigger_id, which is part of the URL path, is also being routed into the request body schema, which then rejects it as an unknown field.

Verified

  • GET /v1/code/triggers (action: list) — works
  • GET /v1/code/triggers/{trigger_id} (action: get) — works
  • POST /v1/code/triggers/{trigger_id}/run (action: run) — fails with the error above
  • Same failure regardless of whether the body is omitted or {}
  • Reproduces in two independent calls (different request_id values)
  • The Run now button in the web UI at https://claude.ai/code/routines/{trigger_id} produces the same failure mode for end users

Request IDs (for server-side log lookup)

  • req_011Cadf3UQQtqnoYLZiutD5V
  • req_011Cadf467jtkDViGK3VMnoa

Both fired against the same routine, ~seconds apart, on 2026-05-02 around 11:24 UTC.

Workaround

Creating a one-shot routine with run_once_at set ~2 minutes in the future bypasses the broken /run endpoint by using the scheduler itself to fire the job. This works but is awkward for routine users who expect the Run now button to function.

Likely fix

It looks like the endpoint's request-body Pydantic model is being given the URL path parameters as inputs and is configured to forbid unknown fields. Either drop the path param from the body model or set model_config = ConfigDict(extra='ignore') on that schema.

extent analysis

TL;DR

The most likely fix is to update the Pydantic model configuration for the /run endpoint to ignore extra fields by setting model_config = ConfigDict(extra='ignore').

Guidance

  • Verify that the issue is indeed caused by the Pydantic model rejecting unknown fields by checking the server-side logs for the provided request IDs (req_011Cadf3UQQtqnoYLZiutD5V and req_011Cadf467jtkDViGK3VMnoa).
  • Check the Pydantic model definition for the /run endpoint to confirm that it is being passed the URL path parameters as inputs.
  • Consider updating the model to exclude the trigger_id path parameter from the request body schema.
  • Test the workaround of creating a one-shot routine with run_once_at set in the future to ensure it remains a viable temporary solution.

Example

from pydantic import BaseModel
from pydantic.config import ConfigDict

class RunRequest(BaseModel):
    class Config:
        model_config = ConfigDict(extra='ignore')

Notes

The provided workaround of creating a one-shot routine may have limitations or edge cases that need to be considered.

Recommendation

Apply the workaround of creating a one-shot routine with run_once_at set in the future until the Pydantic model configuration can be updated to ignore extra fields.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING