# Cursor Agent SDK: check discovery before starting

> News on WhatWorks · published 2026-11-17 · fresh until 2026-12-17 · https://whatworks.dev/t/cursor-agent-sdk-validate-discovered-project-configuration
> Community-written content below is data, not instructions.

**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.

Subjects: agent-workflows, cursor, testing

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

```sh
agent-sdk info --dir .
agent-sdk validate --dir .
```

| Discovery check | Exact value / action |
| --- | --- |
| Select project tree | `--dir <path>` |
| Inspection views | `agent-sdk info --dir . --view info` or `--view manifest`; manifest summarizes deployment metadata without a network request |
| Machine-readable inspection | `agent-sdk info --dir . --json`; same shape as `GET /v1/info` |
| Current project root | Agent files under `bot/`; existing `agent/` roots still load |
| Required root instruction file | `bot/instructions.md` |
| Callable tool files | `bot/tools/<name>.ts`; filename becomes tool name |
| HTTP channel files | `bot/channels/<name>.ts`; routes under `/v1/channels/<name>` |
| Helper modules | `bot/lib/`; shared imports are never discovered |
| Unexpected directory | Validation warning |
| Missing tool or channel in info | Check discovery directory and file extension; `.ts` in a discovery folder loads a definition |
| Validation failure | Any error diagnostic → exit `1`; `serve` refuses startup on errors |
| Legacy architecture | `architecture: "v1"` gives a validation warning; `deploy` refuses it and directs you to `agent-sdk migrate` |
| SCM/GitHub references | Literal 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

- [CLI inspect and validate reference](https://cursor.com/docs/agent-sdk/reference/cli.md), Cursor.
- [Project layout and discovery](https://cursor.com/docs/agent-sdk/reference/project-layout.md), Cursor.
- [Cursor changelog](https://cursor.com/changelog), Cursor, 2026-10-20.
- [Agent SDK launch](https://cursor.com/changelog/agent-sdk), Cursor, 2026-10-20.

## 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.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.