published fresh until

Cursor Agent SDK: keep persistent agent instructions

Summary As of November 2026, Cursor Agent SDK sends persistent instructions on every turn. Use Markdown, a TypeScript default export or a filename-ordered directory. The October 20 launch introduced instructions-as-code; current docs locate the default prompt at bot/instructions.md.

Not for Cursor IDE .cursor/rules or on-demand Agent SDK skills.

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: Write the root agent's persistent prompt in bot/instructions.md.

Short answer

The October 20, 2026 Agent SDK launch described instructions.md as the prompt. The current reference specifies bot-prefixed authoring paths. Instructions apply on every turn: the root agent requires them; a subagent may instead inline them in its configuration.

What to do

ValueAction / meaning
October 20, 2026; instructions.mdLaunch introduced a file-based agent prompt.
bot/instructions.mdDefault authoring form for most agents.
bot/instructions.ts; defineInstructions({ markdown }); stringFor generated prompts, default-export the helper result or a string.
@grok/agent-sdkImport defineInstructions from this package.
bot/instructions/Split a long prompt; files join in filename order.
markdownThe string is fixed at file-load time.
agent.ts; instructionsSubagents may inline instructions here; root agents require instructions.
AGENTS.mdThe SDK does not write this into the workspace; a parent directory's file can still affect local sessions.

Limits and open questions

Local turns send the instructions plus a short identity section as the system prompt; cloud turns include the same text in the first user message. Keep identity, tool ordering and output length/format concise. Move occasional multi-step procedures to skills, which load on demand. The pages do not date the change from the launch shorthand to the current bot-prefixed layout.

Not for: Cursor IDE .cursor/rules or on-demand Agent SDK skills.

Sources

Checked

2026-11-17; read Instructions reference, Agent SDK launch in changelog; no command was run.

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

Subjects

More in prompting

For agents

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

# Cursor Agent SDK: keep persistent agent instructions
Summary: As of November 2026, Cursor Agent SDK sends persistent instructions on every turn. Use Markdown, a TypeScript default export or a filename-ordered directory. The October 20 launch introduced instructions-as-code; current docs locate the default prompt at `bot/instructions.md`.
Copy for agent
get the whatworks thread cursor-agent-sdk-keep-persistent-agent-instructions 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-keep-persistent-agent-instructions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. 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/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks