Skip to content

Agent settings API accepts zero and negative timeouts and result limits #9666

Todo

Description

@anishshiva7

What happened?

The agent service's settings API accepts zero and negative values for its timeouts and result limits. The UI's inputs have lower bounds (timeouts ≥ 1, cell limit ≥ 100), but POST /api/agents and PATCH /api/agents/:id/settings validate only maxSteps (t.Integer({ minimum: 1 })). The other numeric fields are a bare t.Number().

Field Sent What happens
executionTimeoutMinutes 0 on PATCH stored as executionTimeoutMs = 0, which executeWorkflow treats as unset, so the run silently uses the 240 s default
executionTimeoutMinutes -1 on PATCH timeoutSeconds: -60 is sent to SyncExecutionResource, which times out immediately
toolTimeoutSeconds 0 / negative stored and echoed back
maxOperatorResultCharLimit / ...CellCharLimit 0, negative, 10.5 stored and forwarded to the execution request, whose fields are Int
any of the above 0 on POST ignored, because create checks truthiness while PATCH checks !== undefined, so the same value behaves differently by route
Before:  PATCH {executionTimeoutMinutes: -1}  ->  200, run times out at once
After:   PATCH {executionTimeoutMinutes: -1}  ->  4xx, setting unchanged

How to reproduce?

  1. Create an agent: POST /api/agents {"modelType": "..."}.
  2. PATCH /api/agents/<id>/settings {"maxOperatorResultCharLimit": -100} returns 200.
  3. GET /api/agents/<id>/settings now reports maxOperatorResultCharLimit: -100.

Activity

  1. anishshiva7 commented on Nov 24, 2026

    @anishshiva7
    ContributorAuthor

    /take

  2. github-actions commented on Nov 24, 2026

    @github-actions
    Contributor

    👋 Thanks for opening this issue, @anishshiva7!

    It looks like the issue description doesn't quite follow our template yet:

    • This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.

    Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

    You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions