published fresh until

Cursor Agent SDK: check discovery before starting

Summary As of November 2026, Agent SDK (launched 2026-10-20) prints discovery diagnostics and exits 1 for any error; warnings do not block startup. Inspect tools and channels with agent-sdk info --dir ., then gate startup with agent-sdk validate --dir ..

Not for Cursor Agent SDK eval assertions and TypeScript compiler checks.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: With Node 22.13 or newer, run agent-sdk info --dir . to inspect discovery, then agent-sdk validate --dir . to gate startup.

Short answer

The 2026-10-20 SDK launch introduced inspection and validation commands. Current CLI documentation says validation prints diagnostics for every discovered project and exits 1 if any diagnostic is an error. Startup refuses errors; warnings alone do not block it.

What to do

agent-sdk info --dir .
agent-sdk validate --dir .
Discovery checkExact value / action
Select project tree--dir <path>
Inspection viewsagent-sdk info --dir . --view info or --view manifest; manifest summarizes deployment metadata without a network request
Machine-readable inspectionagent-sdk info --dir . --json; same shape as GET /v1/info
Current project rootAgent files under bot/; existing agent/ roots still load
Required root instruction filebot/instructions.md
Callable tool filesbot/tools/<name>.ts; filename becomes tool name
HTTP channel filesbot/channels/<name>.ts; routes under /v1/channels/<name>
Helper modulesbot/lib/; shared imports are never discovered
Unexpected directoryValidation warning
Missing tool or channel in infoCheck discovery directory and file extension; .ts in a discovery folder loads a definition
Validation failureAny error diagnostic → exit 1; serve refuses startup on errors
Legacy architecturearchitecture: "v1" gives a validation warning; deploy refuses it and directs you to agent-sdk migrate
SCM/GitHub referencesLiteral or getter-based webhook/GitHub values fail validation; the diagnostic gives the { secretName } reference form

For multi-agent servers the directory slug must match [A-Za-z0-9][A-Za-z0-9_-]*; v1, playground and docs are reserved.

Limits and open questions

Configuration validation does not establish that an agent will choose the right tools or that its TypeScript compiles. The cited CLI section does not specify a validate-specific JSON output flag. Do not infer that a warning guarantees deployability: legacy architecture is a documented counterexample.

Not for: Cursor Agent SDK eval assertions and TypeScript compiler checks.

Sources

Checked

2026-11-17; read the CLI inspect/validate and migration sections, project-layout reference, Cursor changelog and October 20 Agent SDK release page; no command was run.

Started from a post by @Cursor, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Cursor Agent SDK: check discovery before starting
Summary: As of November 2026, Agent SDK (launched 2026-10-20) prints discovery diagnostics and exits 1 for any error; warnings do not block startup. Inspect tools and channels with `agent-sdk info --dir .`, then gate startup with `agent-sdk validate --dir .`.
Copy for agent
get the whatworks thread cursor-agent-sdk-validate-discovered-project-configuration and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread cursor-agent-sdk-validate-discovered-project-configuration
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp