@cursor/july 0.1.95 → 0.1.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/AGENTS.md +3 -4
  2. package/dist/channels/deployments/types.d.ts +1 -1
  3. package/dist/channels/deployments/types.d.ts.map +1 -1
  4. package/dist/channels/deployments/types.js +1 -0
  5. package/dist/channels/origin/api.d.ts +59 -13
  6. package/dist/channels/origin/api.d.ts.map +1 -1
  7. package/dist/channels/origin/api.js +168 -27
  8. package/dist/channels/origin/binding.d.ts +2 -2
  9. package/dist/channels/origin/checks.d.ts +6 -6
  10. package/dist/channels/origin/checks.js +6 -6
  11. package/dist/channels/origin/cursor-account.d.ts +5 -3
  12. package/dist/channels/origin/cursor-account.d.ts.map +1 -1
  13. package/dist/channels/origin/cursor-account.js +5 -3
  14. package/dist/channels/slack/api.d.ts +9 -0
  15. package/dist/channels/slack/api.d.ts.map +1 -1
  16. package/dist/channels/slack/api.js +36 -5
  17. package/dist/channels/slack/defaults.d.ts.map +1 -1
  18. package/dist/channels/slack/defaults.js +17 -46
  19. package/dist/channels/slack/dispatch.d.ts +7 -1
  20. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  21. package/dist/channels/slack/dispatch.js +47 -23
  22. package/dist/channels/slack/inbound.d.ts +8 -0
  23. package/dist/channels/slack/inbound.d.ts.map +1 -1
  24. package/dist/channels/slack/inbound.js +32 -0
  25. package/dist/channels/slack/live-delivery.d.ts +26 -29
  26. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  27. package/dist/channels/slack/live-delivery.js +172 -73
  28. package/dist/channels/slack/manifest.d.ts.map +1 -1
  29. package/dist/channels/slack/manifest.js +5 -1
  30. package/dist/channels/slack/nudge-carrier.d.ts +2 -0
  31. package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
  32. package/dist/channels/slack/nudge-carrier.js +48 -1
  33. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  34. package/dist/channels/slack/slack-channel.js +2 -2
  35. package/dist/docs/404.html +2 -2
  36. package/dist/docs/ab.html +4 -4
  37. package/dist/docs/assets/{app.BBj0klBO.js → app.jXleCmOc.js} +1 -1
  38. package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +1 -0
  39. package/dist/docs/assets/chunks/{VPLocalSearchBox.CUEXpL78.js → VPLocalSearchBox.8LhyglIT.js} +1 -1
  40. package/dist/docs/assets/chunks/{theme.DabmQnia.js → theme.9ged-pr2.js} +2 -2
  41. package/dist/docs/assets/index.md.CI93Ltlb.js +5 -0
  42. package/dist/docs/assets/{index.md.BoHaMdeZ.lean.js → index.md.CI93Ltlb.lean.js} +1 -1
  43. package/dist/docs/assets/{reference_cli.md.BsMOxDvh.js → reference_cli.md.CCnG-nJx.js} +2 -1
  44. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +2 -0
  45. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
  46. package/dist/docs/building-with-agents.html +4 -4
  47. package/dist/docs/concepts.html +4 -4
  48. package/dist/docs/deployment.html +4 -4
  49. package/dist/docs/evals.html +4 -4
  50. package/dist/docs/guides/agent-to-agent.html +4 -4
  51. package/dist/docs/guides/cloud-runtime.html +4 -4
  52. package/dist/docs/guides/convert-automation.html +4 -4
  53. package/dist/docs/guides/github.html +4 -4
  54. package/dist/docs/guides/human-in-the-loop.html +4 -4
  55. package/dist/docs/guides/mcp-oauth.html +4 -4
  56. package/dist/docs/guides/opentelemetry.html +4 -4
  57. package/dist/docs/guides/slack.html +4 -4
  58. package/dist/docs/guides/webhooks.html +4 -4
  59. package/dist/docs/hashmap.json +1 -1
  60. package/dist/docs/hillclimbing.html +4 -4
  61. package/dist/docs/index.html +6 -6
  62. package/dist/docs/index.md +3 -1
  63. package/dist/docs/llms-full.txt +102 -3
  64. package/dist/docs/llms.txt +1 -0
  65. package/dist/docs/quickstart.html +4 -4
  66. package/dist/docs/reference/agent-config.html +4 -4
  67. package/dist/docs/reference/artifacts.html +4 -4
  68. package/dist/docs/reference/channels.html +4 -4
  69. package/dist/docs/reference/cli.html +7 -6
  70. package/dist/docs/reference/cli.md +3 -2
  71. package/dist/docs/reference/connections.html +4 -4
  72. package/dist/docs/reference/hooks.html +4 -4
  73. package/dist/docs/reference/http-api.html +4 -4
  74. package/dist/docs/reference/instructions.html +4 -4
  75. package/dist/docs/reference/playground.html +4 -4
  76. package/dist/docs/reference/project-layout.html +4 -4
  77. package/dist/docs/reference/prompt.html +4 -4
  78. package/dist/docs/reference/schedules.html +4 -4
  79. package/dist/docs/reference/sessions.html +4 -4
  80. package/dist/docs/reference/skills.html +4 -4
  81. package/dist/docs/reference/subagents.html +4 -4
  82. package/dist/docs/reference/tools.html +4 -4
  83. package/dist/docs/scaffolding-agents.html +4 -4
  84. package/dist/docs/storage.html +4 -4
  85. package/dist/docs/templates/agentic-owners.html +4 -4
  86. package/dist/docs/templates/code-wiki.html +28 -0
  87. package/dist/docs/templates/code-wiki.md +91 -0
  88. package/dist/docs/templates/demo.html +5 -5
  89. package/dist/docs/templates/pr-autofixer.html +4 -4
  90. package/dist/docs/templates/security-help.html +4 -4
  91. package/dist/docs/templates/security-reviewer.html +5 -5
  92. package/dist/docs/templates/triage.html +4 -4
  93. package/dist/docs/troubleshooting.html +4 -4
  94. package/dist/files-backends/cursor-hosted.d.ts +26 -4
  95. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  96. package/dist/files-backends/cursor-hosted.js +32 -4
  97. package/dist/internal/advertise-tools.d.ts +2 -0
  98. package/dist/internal/advertise-tools.d.ts.map +1 -1
  99. package/dist/internal/advertise-tools.js +15 -1
  100. package/dist/internal/bounded.d.ts +7 -0
  101. package/dist/internal/bounded.d.ts.map +1 -0
  102. package/dist/internal/bounded.js +32 -0
  103. package/dist/internal/cli-deploy.d.ts.map +1 -1
  104. package/dist/internal/cli-deploy.js +7 -1
  105. package/dist/internal/conversation-mirror.d.ts +11 -8
  106. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  107. package/dist/internal/conversation-mirror.js +116 -55
  108. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  109. package/dist/internal/cursor/backend-client.js +22 -48
  110. package/dist/internal/cursor/session-token.d.ts +45 -0
  111. package/dist/internal/cursor/session-token.d.ts.map +1 -0
  112. package/dist/internal/cursor/session-token.js +99 -0
  113. package/dist/internal/cursor-agent-template.d.ts +1 -1
  114. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  115. package/dist/internal/cursor-agent-template.js +1 -0
  116. package/dist/internal/framework-file-storage.d.ts +61 -0
  117. package/dist/internal/framework-file-storage.d.ts.map +1 -0
  118. package/dist/internal/framework-file-storage.js +204 -0
  119. package/dist/internal/framework-storage-selection.d.ts +11 -5
  120. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  121. package/dist/internal/framework-storage-selection.js +38 -11
  122. package/dist/internal/hosted-delivery.d.ts +7 -0
  123. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  124. package/dist/internal/hosted-delivery.js +4 -0
  125. package/dist/internal/init-project.d.ts.map +1 -1
  126. package/dist/internal/init-project.js +2 -0
  127. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  128. package/dist/internal/install-cursor-skills.js +1 -3
  129. package/dist/internal/managed-delivery.d.ts +80 -0
  130. package/dist/internal/managed-delivery.d.ts.map +1 -0
  131. package/dist/internal/managed-delivery.js +86 -0
  132. package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
  133. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  134. package/dist/internal/runtime-dispatch-runner.js +7 -0
  135. package/dist/internal/sdk-runner.d.ts +11 -0
  136. package/dist/internal/sdk-runner.d.ts.map +1 -1
  137. package/dist/internal/sdk-runner.js +39 -8
  138. package/dist/internal/server.js +1 -0
  139. package/dist/internal/session-engine.d.ts +13 -0
  140. package/dist/internal/session-engine.d.ts.map +1 -1
  141. package/dist/internal/session-engine.js +62 -3
  142. package/dist/internal/steering.d.ts +15 -0
  143. package/dist/internal/steering.d.ts.map +1 -0
  144. package/dist/internal/steering.js +18 -0
  145. package/dist/playground/assets/index-B1DDvBeC.css +1 -0
  146. package/dist/playground/assets/{index-CZA1uEWA.js → index-Cx9CclK_.js} +51 -51
  147. package/dist/playground/index.html +2 -2
  148. package/dist/storage-backends/cursor-hosted.d.ts +8 -5
  149. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  150. package/dist/storage-backends/cursor-hosted.js +4 -3
  151. package/dist/types.d.ts +2 -1
  152. package/dist/types.d.ts.map +1 -1
  153. package/docs/README.md +3 -1
  154. package/docs/reference/cli.md +3 -2
  155. package/docs/templates/code-wiki.md +96 -0
  156. package/package.json +2 -2
  157. package/skills/ab/SKILL.md +13 -97
  158. package/skills/create-agent/SKILL.md +123 -223
  159. package/skills/debug/SKILL.md +34 -68
  160. package/skills/evals/SKILL.md +55 -180
  161. package/skills/framework-map/SKILL.md +83 -145
  162. package/skills/github/SKILL.md +53 -111
  163. package/skills/hillclimb/SKILL.md +40 -163
  164. package/skills/mcp-auth/SKILL.md +48 -107
  165. package/skills/otel/SKILL.md +22 -68
  166. package/skills/setup-slack/SKILL.md +77 -208
  167. package/src/channels/deployments/types.ts +1 -0
  168. package/src/channels/origin/api.ts +242 -30
  169. package/src/channels/origin/binding.ts +2 -2
  170. package/src/channels/origin/checks.ts +6 -6
  171. package/src/channels/origin/cursor-account.ts +5 -3
  172. package/src/channels/slack/api.ts +41 -5
  173. package/src/channels/slack/defaults.ts +15 -49
  174. package/src/channels/slack/dispatch.ts +56 -22
  175. package/src/channels/slack/inbound.ts +43 -0
  176. package/src/channels/slack/live-delivery.ts +235 -114
  177. package/src/channels/slack/manifest.ts +5 -1
  178. package/src/channels/slack/nudge-carrier.ts +48 -1
  179. package/src/channels/slack/slack-channel.ts +2 -0
  180. package/src/files-backends/cursor-hosted.ts +40 -7
  181. package/src/internal/advertise-tools.ts +18 -2
  182. package/src/internal/bounded.ts +28 -0
  183. package/src/internal/cli-deploy.ts +12 -0
  184. package/src/internal/conversation-mirror.ts +145 -69
  185. package/src/internal/cursor/backend-client.ts +34 -58
  186. package/src/internal/cursor/session-token.ts +115 -0
  187. package/src/internal/cursor-agent-template.ts +1 -0
  188. package/src/internal/framework-file-storage.ts +222 -0
  189. package/src/internal/framework-storage-selection.ts +51 -11
  190. package/src/internal/hosted-delivery.ts +10 -0
  191. package/src/internal/init-project.ts +2 -0
  192. package/src/internal/install-cursor-skills.ts +1 -4
  193. package/src/internal/managed-delivery.ts +125 -0
  194. package/src/internal/runtime-dispatch-runner.ts +10 -0
  195. package/src/internal/sdk-runner.ts +56 -8
  196. package/src/internal/server.ts +2 -0
  197. package/src/internal/session-engine.ts +64 -4
  198. package/src/internal/steering.ts +17 -0
  199. package/src/storage-backends/cursor-hosted.ts +9 -7
  200. package/src/types.ts +2 -1
  201. package/templates/code-wiki/README.md +34 -0
  202. package/templates/code-wiki/agent/agent.ts +8 -0
  203. package/templates/code-wiki/agent/channels/github.ts +144 -0
  204. package/templates/code-wiki/agent/instructions.md +39 -0
  205. package/templates/code-wiki/agent/lib/repos.ts +5 -0
  206. package/templates/code-wiki/agent/lib/wiki.ts +22 -0
  207. package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
  208. package/templates/code-wiki/evals/evals.config.ts +5 -0
  209. package/templates/code-wiki/evals/wiki.eval.ts +132 -0
  210. package/templates/code-wiki/init.json +25 -0
  211. package/templates/code-wiki/package.json +18 -0
  212. package/templates/code-wiki/tsconfig.json +12 -0
  213. package/dist/docs/assets/chunks/@localSearchIndexroot.oqPawjiD.js +0 -1
  214. package/dist/docs/assets/index.md.BoHaMdeZ.js +0 -5
  215. package/dist/internal/deployment-scm-event-stream.d.ts +0 -116
  216. package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
  217. package/dist/internal/deployment-scm-event-stream.js +0 -474
  218. package/dist/playground/assets/index-CF7hUDnQ.css +0 -1
  219. package/src/internal/deployment-scm-event-stream.ts +0 -593
  220. /package/dist/docs/assets/{reference_cli.md.BsMOxDvh.lean.js → reference_cli.md.CCnG-nJx.lean.js} +0 -0
@@ -1,142 +1,99 @@
1
1
  ---
2
2
  name: agentsdk-create-agent
3
3
  description: >-
4
- Scaffold a new Agent SDK agent through a guided AskQuestion interview
5
- purpose, name, runtime, model, channels, MCP connections, capabilities
6
- then verify it serves and hand off to hillclimbing. Read this skill when
7
- creating a new agent.
8
- paths:
9
- - packages/agent-serve/**/*
4
+ Scaffold a new Agent SDK agent: short AskQuestion interview, then
5
+ verify a turn and hand off to hillclimb. Use when creating a new
6
+ agent. Ask only what the invoking message left open.
10
7
  ---
11
8
 
12
9
  # Create an Agent SDK agent
13
10
 
14
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
15
- host serves the same index at `/docs/llms.txt`.
11
+ 1. **Interview.** Two `AskQuestion` rounds, then a plan gate.
12
+ 2. **Scaffold.** `agent-sdk init`, then shape the files.
13
+ 3. **Verify.** `validate` / `info` / `call`, then a model turn.
14
+ 4. **Channels.** Slack, GitHub, webhook, or schedule as chosen.
15
+ 5. **Hillclimb.** `skills/hillclimb/SKILL.md`.
16
16
 
17
- Stand up one new agent project via a short interview, scaffold it, get
18
- channels working
19
- with the user, prove a turn runs end-to-end, and set up the improvement loop.
20
- Sibling skills: `framework-map` for orientation, `setup-slack` for Slack
21
- wiring, `mcp-auth` for host MCP OAuth, `github` for webhook-driven
22
- agents, `evals` for the eval API, `ab` for live A/B metrics, `otel` for
23
- OpenTelemetry export, `hillclimb` for iteration once the agent runs.
24
-
25
- Read `framework-map/SKILL.md` first if you haven't; treat the package
26
- `AGENTS.md` and `README.md` as ground truth for
27
- framework behavior. Run the CLI with Node, never Bun (Bun corrupts harness
28
- tool-result streams): use the installed `agent-sdk` bin, or from a source
29
- checkout `pnpm exec tsx src/bin/agent-serve.ts <command> …` — written as
30
- `agent-sdk …` below.
17
+ Read `skills/framework-map/SKILL.md` if you have not. CLI is
18
+ `agent-sdk`. Public docs:
19
+ `node_modules/@cursor/july/dist/docs/llms.txt` or `/docs/llms.txt`
20
+ on a running host.
31
21
 
32
22
  ## Interview
33
23
 
34
- Walk the user through the decisions with the `AskQuestion` tool: batched
35
- questions, concrete options, the recommended option listed first and labeled
36
- `(recommended)` so one click accepts it. Rules:
37
-
38
- - **Mine the invoking message first.** Never ask a question it already
39
- answers. Target: at most two rounds before files appear.
40
- - **Stage the rounds.** Round 1 fixes identity; round 2 fixes the surface and
41
- is tailored by round 1 (no MCP question for a chat toy, no cloud-repos
42
- question for local runtime).
43
- - Use multi-select (`allow_multiple: true`) for channels, MCP connections, and
44
- capabilities; single-select elsewhere. Add an "Other" option wherever a
45
- custom answer is plausible (name, model, MCP server) — its freeform text is
46
- the answer.
47
- - **Ask about decisions, not implementation.** Instructions wording, tool
48
- names, file layout, env prefix, and eval shape are your job — derive them
49
- from the purpose and show the result instead of asking.
50
- - If `AskQuestion` is unavailable or the user says "just go", state the
51
- defaults you are assuming in one short list and proceed.
52
-
53
- ### Round 1 — identity
24
+ `AskQuestion`: batched, recommended option first and labeled
25
+ `(recommended)`.
26
+
27
+ - Mine the invoking message. Target: two rounds, then files.
28
+ - Round 1 is identity. Round 2 is the surface, tailored by round 1.
29
+ - Multi-select for channels, MCP, capabilities. Other where a
30
+ custom answer is plausible.
31
+ - Ask decisions, not how to build it. File layout, tool names,
32
+ env prefix, and eval shape are yours.
33
+ - If `AskQuestion` is missing or the user skips, state defaults
34
+ in one list and proceed.
35
+
36
+ ### Round 1: identity
54
37
 
55
38
  | Question | Options |
56
39
  | --- | --- |
57
- | **Purpose** | chat assistant · PR / repo automation · domain assistant over APIs/tools · scheduled reporter · Other (describe) |
58
- | **Name** | 2–3 slug suggestions derived from the purpose + Other. Slug = directory name: `[A-Za-z0-9][A-Za-z0-9_-]*`, not `v1`/`playground`/`docs`; lowercase-hyphenated |
59
- | **Location** | `./<slug>` (default) · another directory (user names it) |
40
+ | **Purpose** | chat assistant · PR / repo automation · domain assistant over APIs/tools · scheduled reporter · Other |
41
+ | **Name** | 2–3 slugs from the purpose + Other. Directory: `[A-Za-z0-9][A-Za-z0-9_-]*`, not `v1`/`playground`/`docs` |
42
+ | **Location** | `./<slug>` (default) · another directory |
60
43
 
61
- ### Round 2 surface
44
+ ### Round 2: surface
62
45
 
63
46
  | Question | Options | Guidance |
64
47
  | --- | --- | --- |
65
- | **Runtime** | `local` (default) · `cloud` | Local runs on this machine. Cloud runs on a Cursor cloud agent and needs `cloud.repos`. Server tools and skills work on both. Tool approvals and sandbox seeds are local only. Recommend local unless the purpose needs a cloud checkout. |
66
- | **Model** | `grok-4.5` with `effort=high`, `fast=true` (default) · Other model id | Effort and fast are params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` — the SDK rejects suffix-style ids. |
67
- | **Channels** (multi) | playground + HTTP API only (always mounted) · Slack · GitHub webhooks · custom webhook · schedule (cron) | Slack is a dedicated Socket Mode app (`agent-sdk slack create` — own bot user + one app/token pair per agent). When Slack is picked, follow `setup-slack/SKILL.md`. GitHub verifies `X-Hub-Signature-256` when a secret is set. Discord/Teams packs do not exist yet — offer custom webhook instead. |
68
- | **MCP connections** (multi) | none · remote server (URL + header auth) · local stdio server · Cursor account connectors · Other | One file per server under `agent/mcp-connections/`; filename = server name. Do not name an account connection `cursor.ts` (collides with the IDE `cursor` namespace); use `account.ts`. Tokens via env vars, never hardcoded. Connections serve the model and host code (`ctx.host.mcp`). If the model should call them by name on local turns, set `advertiseTools: true`. Privileged servers the model must not see go in `agent/host-connections/` instead. |
69
- | **Capabilities** (multi) | server tools · agent tools (scripts) · skills · subagents · hooks · sandbox seed files · tool approvals (HITL) · evals (recommend) | Always recommend at least one smoke eval. |
48
+ | **Runtime** | `local` (default) · `cloud` | Cloud needs `cloud.repos`. Approvals and sandbox seeds are local only. Recommend local unless the job needs a cloud checkout. |
49
+ | **Model** | `grok-4.5` + `effort=high`, `fast=true` · Other id | Params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` |
50
+ | **Channels** (multi) | playground + HTTP (always on) · Slack · GitHub · custom webhook · schedule | Slack: `skills/setup-slack/SKILL.md`. GitHub: `skills/github/SKILL.md`. No Discord/Teams pack; offer custom webhook. |
51
+ | **MCP** (multi) | none · remote URL · local stdio · Cursor account connectors · Other | One file under `agent/mcp-connections/`. Account file is `account.ts`, never `cursor.ts`. Named local tools need `advertiseTools: true`. Privileged servers go in `agent/host-connections/`. |
52
+ | **Capabilities** (multi) | server tools · agent tools · skills · subagents · hooks · sandbox seeds · approvals · evals (recommend) | Always recommend one smoke eval. |
70
53
 
71
- Close the round with a one-screen plan chosen options plus the file tree you
72
- intend to create and a final gate: "Scaffold it" / "Adjust something". Only
73
- write files after approval.
54
+ Close with the plan and file tree, then "Scaffold it" / "Adjust
55
+ something". Write files only after approval.
74
56
 
75
- ## Fill in the blanks
57
+ ## Fill the blanks
76
58
 
77
- Everything the interview did not fix is yours to decide. Derive it from the
78
- purpose, and reach for the proven shape instead of
79
- inventing:
80
-
81
- | Purpose looks like | Proven shape |
59
+ | Purpose | Shape |
82
60
  | --- | --- |
83
- | Slack chat assistant | `slackChannel()` with suggested prompts; run `agent-sdk slack create` for the bot and tokens |
84
- | PR review with host-prepared evidence | channel `callTool` prep into a trimmed workspace `pr/` tree |
85
- | GitHub-webhook automation | `githubChannel()` hooks, per-PR debounce, replay fixtures |
86
- | Domain assistant over live APIs / MCP | server + agent tools, a stdio MCP connection, a skill, a schedule |
87
- | Wrap an existing pipeline/tool | GitHub `{ task }` hook driving a deterministic loop under `agent/lib/` |
88
-
89
- Defaults that make first cuts good:
90
-
91
- - **Minimal surface.** Instructions + 1–2 real tools + the chosen channels +
92
- one smoke eval. Unpicked capabilities are follow-ups, not scope.
93
- - **`local.cwd`.** Keep the harness outside a monorepo checkout
94
- (`~/.cache/agent-serve/<slug>`). Discovery does this for nested git
95
- projects. Point cwd at a checkout only when the agent must inherit that
61
+ | Slack chat | `slackChannel({ envPrefix })` + suggested prompts. `agent-sdk slack create` mints the bot. Prefix: `skills/setup-slack/SKILL.md` |
62
+ | PR review with host prep | Channel `callTool` into a trimmed workspace `pr/` tree |
63
+ | GitHub automation | `githubChannel()` hooks, replay fixtures |
64
+ | Domain assistant | Server tools + one MCP connection + a skill |
65
+ | Wrap an existing pipeline | GitHub `{ task }` over a thin `agent/lib/` loop |
66
+
67
+ Defaults:
68
+
69
+ - Instructions + 1–2 tools + chosen channels + one smoke eval.
70
+ - `local.cwd` stays outside a monorepo checkout (default: a cache
71
+ directory under `~/.cache`) unless the agent must inherit that
96
72
  tree.
97
- - **Instructions** (`agent/instructions.md`, required): a few lines identity,
98
- when to use which tool, output shape. Not an essay.
99
- - **Tool per file**, filename = tool name the model sees. Prefer
100
- `execution: "server"` with a zod `inputSchema`; use `execution: "agent"`
101
- (script) only when the tool must run where the agent runs (or runtime is
102
- cloud). Gate side-effecting tools with `needsApproval: true`. For long
103
- tool descriptions, reminder prompts, channel `context`, and errors, use
104
- `prompt\`…\`` / `prompt.lines\`…\`` from `@cursor/july` (dedents indented
105
- multi-line strings).
106
- - **Env prefix** for Slack tokens = upper-snake slug (`my-agent` →
107
- `MY_AGENT_SLACK_*`); `agent-sdk slack create` derives it for you.
108
- - **Host prep beats model wandering for evidence, not judgment.** When the
109
- purpose has a deterministic setup step (fetch a PR, seed files), do it in
110
- the channel handler via `callTool` / `workspaceFiles` rather than
111
- instructing the model to do it. Stop there: host code that formats,
112
- summarizes, classifies, or composes replies is the model's job specified
113
- badly, and it never comes off the books.
114
-
115
- ### The deterministic-path budget
116
-
117
- TypeScript on the deterministic path is a permanent liability — every line
118
- brings types, tests, restarts, and drift against the framework; prose is
119
- cheap to change. Default every behavior to instructions/skills and promote
120
- it to code only when it earns a row on the left:
121
-
122
- | Code owns (earns its keep) | Model owns (keep out of code) |
73
+ - `agent/instructions.md`: identity, when to use which tool,
74
+ output shape.
75
+ - One tool per file. Prefer `execution: "server"` + zod
76
+ `inputSchema`. Gate side effects with `needsApproval: true`.
77
+ - Long prompts: `prompt\`…\`` / `prompt.lines\`…\`` from
78
+ `@cursor/july`.
79
+ - Host prep is for evidence (`callTool`, `workspaceFiles`), not
80
+ judgment, formatting, or replies.
81
+
82
+ ### Deterministic-path budget
83
+
84
+ Default to instructions and skills. Promote to TypeScript only
85
+ when it earns the left column:
86
+
87
+ | Code owns | Model owns |
123
88
  | --- | --- |
124
- | Side-effect gates and actuation (approve, deploy, post) | Composing human-facing output — replies, reports, comments, tables — to a shape stated in instructions |
125
- | Idempotency / dedupe of external writes | Summarizing, classifying, wording, judgment calls |
126
- | Auth, secrets, signature verification | Deciding what to do next from ground truth |
127
- | Evidence seeding (`workspaceFiles`, channel `callTool` prep) | Interpreting soft failures and choosing retries |
128
- | Hard caps at API boundaries (chunk limits, truncation) | Formatting niceties (links, emphasis, ordering) under those caps |
129
-
130
- Two smells to check before scaffolding and again before hand-off:
131
-
132
- - **Prose in TS.** An `instructions.ts` / `prompt.ts` string builder is a
133
- skill file wearing a trench coat — write `.md` and interpolate only what
134
- is truly dynamic.
135
- - **Inverted ratio.** A first cut whose `agent/lib/` + `tools/` dwarf its
136
- instructions + skills (~3:1 or worse) is either wrapping an existing
137
- deterministic pipeline (fine — keep the wrapper thin and say so) or
138
- building a service with a vestigial model turn. Move procedure back into
139
- prompts, or question whether this should be an agent at all.
89
+ | Side-effect gates (approve, deploy, post) | Human-facing output to a stated shape |
90
+ | Dedupe of external writes | Summarizing, classifying, wording |
91
+ | Auth and signature checks | What to do next from ground truth |
92
+ | Evidence seeding | Soft-failure retries |
93
+ | Hard API caps | Formatting under those caps |
94
+
95
+ Smells: prose builders in `.ts` (write `.md`); `agent/lib/` +
96
+ `tools/` dwarfing instructions + skills on a first cut.
140
97
 
141
98
  ## Scaffold
142
99
 
@@ -144,124 +101,67 @@ Two smells to check before scaffolding and again before hand-off:
144
101
  agent-sdk init ./<slug>
145
102
  ```
146
103
 
147
- `init` writes `package.json` (with `typescript` dev deps and a
148
- `check` script), `tsconfig.json`, `AGENTS.md`, `.gitignore`, `agent/agent.ts`,
149
- `agent/instructions.md`, a demo `agent/tools/echo.ts`, and
150
- `agent/hooks/memory.ts`. Existing files are left alone (`exist`). It then
151
- runs `npm install`, and when the host is unsigned runs `login` and waits
152
- before printing `cd` (when needed) and `agent-sdk dev`. Then shape it to the
153
- plan:
154
-
155
- 1. `tsconfig.json` — init writes a strict, `noEmit` config covering `agent/`
156
- and `evals/`; extend it only when the project needs more.
157
- 2. `agent/agent.ts` — chosen model/runtime via `defineAgent({...})`. Nested git checkouts get `local.cwd` under `~/.cache/agent-serve/<slug>` at discovery even if omitted. Add the `cloud: { repos: [...] }` block for cloud runtime.
158
- 3. `agent/instructions.md` — real instructions; delete or replace `echo.ts`
159
- with the real tools.
160
- 4. Add the chosen `channels/`, `mcp-connections/`, `skills/`, `subagents/<id>/`
161
- (needs `description`), `schedules/`, `hooks/`, `sandbox/workspace/`. For
162
- Slack, do not hand-write the channel — `agent-sdk slack create --dir ./<slug> --name "<Name>"`
163
- opens the dashboard wizard (env prefix from the directory name);
164
- for a Slack app they own at api.slack.com, `agent-sdk slack init --manual --dir ./<slug> --name "<Name>"`;
165
- customize `agent/channels/slack.ts` afterwards (e.g. `suggestedPrompts`).
166
- 5. `evals/evals.config.ts` — `defineEvalConfig({ maxConcurrency: 20 })`
167
- (playground runs are memory-only unless you add `persistRuns`)
168
- (`maxConcurrency` is required; hard-capped at 200 due to model provider
169
- request limits) plus eval cases under `evals/**/*.eval.ts` — prefer one
170
- suite file with `cases: [{ id, test }, …]` for related datapoints, or a
171
- single `test` for one smoke. Assert `t.succeeded()` + `t.calledTool(...)`
172
- (case id = file path, or `<fileId>/<case.id>`). Full assertion API and
173
- fixture strategy: `evals/SKILL.md` (sibling skill).
174
-
175
- Stick to deps the Agent SDK already
176
- ships (`zod`, `@modelcontextprotocol/sdk`, `tsx`); a new npm dep needs its own
177
- install story and is a smell for a first cut.
104
+ `init` writes the project, runs `npm install`, and may wait on
105
+ `login`. Then shape it:
178
106
 
179
- ## Verify
107
+ 1. `defineAgent` with the chosen model/runtime. Add
108
+ `cloud: { repos: [...] }` for cloud.
109
+ 2. Real `instructions.md`. Replace `echo.ts`.
110
+ 3. Chosen `channels/`, `mcp-connections/`, `skills/`,
111
+ `subagents/<id>/` (needs `description`), `schedules/`, `hooks/`.
112
+ Slack: `agent-sdk slack create --dir ./<slug> --name "<Name>"`,
113
+ not a hand-written channel. Manual Slack app:
114
+ `agent-sdk slack init --manual`.
115
+ 4. `evals/evals.config.ts` with `maxConcurrency: 20` (required;
116
+ cap 200) plus `evals/**/*.eval.ts`. Assert `t.succeeded()` +
117
+ `t.calledTool(...)`. API: `skills/evals/SKILL.md`.
180
118
 
181
- No API key needed for the structural half run these first and fix every
182
- error diagnostic:
119
+ Stay on deps the Agent SDK already ships (`zod`,
120
+ `@modelcontextprotocol/sdk`, `tsx`).
121
+
122
+ ## Verify
183
123
 
184
124
  ```bash
185
- agent-sdk validate --dir ./<slug> # zero errors (warnings explain runtime mismatches)
186
- agent-sdk info --dir ./<slug> --json # surface matches the plan
187
- agent-sdk call <tool> --dir ./<slug> --input '{…}' # server tools, deterministic, no model
125
+ agent-sdk validate --dir ./<slug>
126
+ agent-sdk info --dir ./<slug> --json
127
+ agent-sdk call <tool> --dir ./<slug> --input '{…}'
188
128
  agent-sdk eval --dir ./<slug> --list
189
- npx tsc --noEmit -p ./<slug> # or the project's own type-check task
129
+ npx tsc --noEmit -p ./<slug>
190
130
  ```
191
131
 
192
- The typecheck matters: everything above runs through tsx, which strips types
193
- without checking them. The classic miss is a tool `execute` return that does
194
- not satisfy `ToolExecuteResult` — returns must be JSON-shaped
195
- (`ToolResultValue`), so use plain object literals or `type` aliases, not
196
- `interface` types (their lack of an index signature fails assignability).
132
+ tsx does not typecheck. Tool `execute` must return JSON-shaped
133
+ values: object literals or `type` aliases, not `interface` types.
197
134
 
198
- `serve` also boots without a key (good for checking channel mounts and the
199
- playground shell), but model turns need `CURSOR_API_KEY` ask the user for
200
- one if the environment lacks it (minted in the Cursor dashboard). If no key
201
- is forthcoming, finish every key-free check, confirm `run` fails with only
202
- the clean API-key error, and hand these to the user as their next steps:
135
+ Model turns need `CURSOR_API_KEY`. Without one, finish the
136
+ key-free checks, confirm `run` fails with only the API-key error,
137
+ and hand these over:
203
138
 
204
139
  ```bash
205
- agent-sdk run --dir ./<slug> --message "<fixture prompt>" # JSON trajectory
206
- agent-sdk serve --dir ./<slug> --dev
207
- # playground: http://127.0.0.1:3000/<slug>/playground
140
+ agent-sdk run --dir ./<slug> --message "<fixture prompt>"
141
+ agent-sdk serve --dir ./<slug> --mode single --dev
142
+ # http://127.0.0.1:3000/playground
208
143
  agent-sdk eval --dir ./<slug>
209
144
  ```
210
145
 
211
- Serve only the new agent's directory during bring-up pointing `serve` at a
212
- parent folder also mounts every sibling agent it contains.
213
- Runtime state lands in `<project>/.agent-serve/` (gitignored). Nested
214
- checkouts default `local.cwd` to `~/.cache/agent-serve/<slug>` at
215
- discovery. `--state-root` is for session files, not harness cwd.
216
-
217
- ## Channel setup with the user
218
-
219
- Each surface beyond the playground has a human gate — drive the user through
220
- it, verify with doctor commands, and smoke-test before declaring victory.
221
-
222
- - **Slack** — follow `packages/agent-serve/skills/setup-slack/SKILL.md` end
223
- to end: `slack create` → doctor → `@mention` smoke. Manual path only
224
- when they own the Slack app at api.slack.com.
225
- - **GitHub** follow `packages/agent-serve/skills/github/SKILL.md`
226
- (fixtures / replay / forward / `--cursor-events`).
227
- - **Custom webhook** `POST /<slug>/v1/channels/<id>/<route>`. Default
228
- `localDevStrict()` is loopback-only; add `bearerAuth(...)` before any
229
- tunnel or shared host.
230
- - **Schedules** never auto-fire under `--dev`; dispatch via
231
- `POST /<slug>/v1/dev/schedules/<id>`.
232
-
233
- ## Hand off to hillclimbing
234
-
235
- Scaffolding proves the agent runs; it says nothing about quality. Once the
236
- smoke turn passes, propose the improvement loop — one last `AskQuestion` if
237
- choices are open:
238
-
239
- 1. **Fixtures** — 1–3 fixed inputs worth optimizing against (a real PR URL, a
240
- canonical Slack question, a saved webhook payload).
241
- 2. **Success criteria** — what "better" means first (correct tool choice,
242
- fewer tool calls, faster wall time, output quality).
243
- 3. **Freeze line** — what must not change (API contract, output shape).
244
-
245
- Those are exactly the preconditions in `skills/hillclimb/SKILL.md`; suggest
246
- the user (or you) follow that skill with the fixtures you agreed on. Seed
247
- the loop by pointing
248
- at the smoke run's session (`.agent-serve/<slug>/sessions/<id>/events.ndjson`
249
- or the trace under `.agent-serve/traces/`) as the baseline measurement — or,
250
- when no API key was available, name the user's first real turn as the
251
- baseline instead. For GitHub agents, snapshot replay fixtures now
252
- (`agent-sdk github replay ... --dry-run --out fixtures/github`) so the
253
- loop starts deterministic.
254
-
255
- ## Working agreements
256
-
257
- - Interview → plan gate → scaffold → verify → channel setup → hillclimb
258
- handoff. Do not skip verification because the files "look right".
259
- - Fill blanks yourself. Re-ask only when an answer contradicts the framework,
260
- such as approval-gated tools on the cloud runtime.
261
- - Do not deploy, post to real Slack/GitHub surfaces beyond the smoke tests the
262
- user asked for, or commit without being asked.
263
- - Keep the first cut reviewable: if the plan grows past ~10 files, cut scope
264
- and say what you deferred. Re-check the deterministic-path budget at
265
- hand-off — behavior that crept into `lib/` during bring-up (formatting,
266
- reply shaping, classification) goes back into instructions before you call
267
- it done.
146
+ Serve only this agent's directory. Session files land in the
147
+ project state directory (`--state-root`). That is not harness cwd.
148
+
149
+ ## Channel setup
150
+
151
+ - **Slack.** `skills/setup-slack/SKILL.md`
152
+ - **GitHub.** `skills/github/SKILL.md`
153
+ - **Custom webhook.** `POST /v1/channels/<id>/<route>`.
154
+ Loopback-only until you add `bearerAuth(...)`.
155
+ - **Schedules.** Never auto-fire under `--dev`.
156
+ `POST /v1/dev/schedules/<id>`.
157
+
158
+ ## Hillclimb handoff
159
+
160
+ Once a smoke turn passes, agree fixtures, success criteria, and a
161
+ freeze line, then follow `skills/hillclimb/SKILL.md`. Seed from
162
+ the smoke session under the project state directory. GitHub:
163
+ snapshot `agent-sdk github replay ... --dry-run --out fixtures/github`.
164
+
165
+ Do not deploy or post to real Slack/GitHub beyond the smoke the
166
+ user asked for. If the plan grows past ~10 files, cut scope.
167
+ Re-check the budget at hand-off.
@@ -1,78 +1,44 @@
1
1
  ---
2
2
  name: agentsdk-debug
3
3
  description: >-
4
- Diagnose a misbehaving Agent SDK agent, server, or playground — blank
5
- playground, sessions missing, HMR not reloading, failing reads/retry
6
- loops, webhook 401s, 403/409 responses, approvals or reminders lost,
7
- orphaned processes. Use when an Agent SDK project runs but behaves
8
- wrong locally.
4
+ Diagnose a misbehaving local Agent SDK agent: blank playground,
5
+ missing sessions, failed reads, webhook 401s, 403/409, lost
6
+ approvals. Use when a project runs but behaves wrong locally.
9
7
  ---
10
8
 
11
9
  # Debugging the Agent SDK locally
12
10
 
13
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
14
- host serves the same index at `/docs/llms.txt`.
11
+ Local `agent-sdk serve`. Hosted start or health failures:
12
+ `docs/troubleshooting.md` and `docs/deployment.md`.
15
13
 
16
- This skill is **local** `agent-sdk serve` / playground. A **hosted**
17
- deployment that is stopped, slow to start, or failing `/v1/health` is
18
- `.cursor/skills/debugging/debug-agent-serve-deployment/SKILL.md`.
14
+ 1. **Validate.** `agent-sdk validate --dir <project>`
15
+ 2. **Info.** `curl -s http://127.0.0.1:3000/<slug>/v1/info | jq .`
16
+ 3. **Trace.** Session events under the project state directory.
17
+ Then match the table.
19
18
 
20
- Read `framework-map/SKILL.md` (sibling skill) first if you don't know the
21
- project structure or session model. Everything below assumes Node/tsx (`pnpm exec tsx
22
- src/bin/agent-serve.ts ...` in the everysphere monorepo).
23
-
24
- ## Triage in order
25
-
26
- ```bash
27
- # 1. Is discovery clean? serve refuses to start on error diagnostics.
28
- agent-sdk validate --dir <project>
29
-
30
- # 2. What is actually running, and where?
31
- lsof -iTCP:3000 -sTCP:LISTEN; lsof -iTCP:5273 -sTCP:LISTEN
32
- ps aux | rg -i 'agent-serve|vite' | rg -v rg
33
-
34
- # 3. What does the server think it serves?
35
- curl -s localhost:3000/v1/agents | jq . # multi-agent index
36
- curl -s localhost:3000/<slug>/v1/info | jq . # per-agent surface
37
-
38
- # 4. What did the session actually do? The stream never lies.
39
- curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
40
- # or read <stateRoot>/<slug>/sessions/<id>/events.ndjson directly
41
- ```
42
-
43
- ## Symptom → cause
44
-
45
- | Symptom | Cause / fix |
19
+ | Symptom | Fix |
46
20
  | --- | --- |
47
- | Playground blank or "no agents" even though Vite assets are built | The SPA is static; it needs the Agent SDK backend on `:3000`. Start `serve` — building `dist/playground/` alone serves nothing. |
48
- | Edits under `playground/src` don't show up in the browser | You're on the **static** `dist/playground` bundle, not HMR. Only `serve --dev` / `dev` starts Vite HMR (`:5273`) and prints that as `playground` — open that URL, not `:3000`. In the monorepo, `mise //packages/agent-serve:start` = all examples + multi-agent HMR; pin one slug with `AGENT_SERVE_BASE=/<slug>`. |
49
- | Webhook / schedule sessions exist on disk but the playground session list is empty | The list shows the calling principal's sessions. `--dev` (loopback) or `--allow-anonymous` (trusted shared host) switches it to `includeAll`. Otherwise deep-link `/<slug>/playground?sessionId=ses_...` or read `sessions/` on disk. |
50
- | Every built-in read/grep the model makes fails; turns crawl through retry loops | You ran the CLI under **Bun**. Kill it, rerun under Node/tsx. (`NGHTTP2_FRAME_SIZE_ERROR` in SDK logs is the tell.) |
51
- | `gh webhook forward` / `agent-sdk github forward` deliveries all 401 — but hook creation succeeded | `GITHUB_TOKEN`/`GH_TOKEN` in the env. The relay authenticates with the gh CLI login and rejects env tokens. `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward ...` |
52
- | `Hook already exists` starting a forwarder | GitHub allows one forwarder per repo. Use one `github forward --dir <parent>` (it fans out to every matching channel) instead of N processes; kill stale forwarders. |
53
- | Agent's answers reference monorepo rules / AGENTS.md it shouldn't know | Session workspace sits inside another git checkout, so the harness loaded ancestor config. Nested projects default `local.cwd` to `~/.cache/agent-serve/<dir>`. Point cwd at a checkout only when the agent should inherit that tree. |
54
- | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
55
- | Port 3000/5273 in use; stray processes after crashes | `lsof -iTCP:3000 -sTCP:LISTEN`, kill the pids; also check companion processes (e.g. vite). |
56
- | Pending tool approval vanished after server restart | By design: parked SDK calls don't survive host restart; they resolve as interrupted. Re-run the turn. |
57
- | Schedule / reminder never fires under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list at `GET /v1/dev/reminders`). |
58
- | Reminder disarmed after restart with `handler_lost_on_restart` | `run`-handler reminders are in-memory; re-arm them from the code path that created them (enroll hook / policy), or use prompt-based reminders. |
59
- | `409` on a follow-up | Stale `continuationToken` (each accepted follow-up rotates it), busy session, or a task/schedule session (not followable). |
60
- | `409 session_busy` on `agent-sdk call --session` | Session-bound deterministic calls serialize with model turns; wait or use an ephemeral call (drop `--session`). |
61
- | `403` on stream/follow-up | Caller principal ≠ session owner. In dev, create and inspect with the same auth; beyond loopback pass `--bearer-token` and send it. |
62
- | Works on localhost, 401/blocked through a tunnel or LAN | Default `localDevStrict()` auth only admits direct loopback, **rejects proxy-forwarding headers** (`X-Forwarded-For`, ...), and requires a loopback `Host`. Use `--bearer-token <secret>` (or authored `bearerAuth`) — `--allow-anonymous` only for trusted-network demos (and never with Cursor account MCP connections). |
63
- | Channel route won't compile: body/query schema type error | `GET` requires a Zod `querySchema`, `POST`/`PUT`/`PATCH` a Zod `bodySchema` — plain JSON Schema objects don't type-check. Use `z.object({})` / `z.unknown()` for open surfaces. Empty POST bodies are coerced to `{}` before validation. |
64
- | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
65
- | Turn fails immediately with an API-key error | Model turns need `CURSOR_API_KEY`; everything structural (validate/info/call/serve bring-up) doesn't. |
66
- | Server tools / skills / sandbox silently absent | Runtime is `cloud` — those are local-only. `validate` prints exactly this warning; read it. |
67
- | `validate` clean, `run` works, CI typecheck fails | tsx never typechecked it. See invariant 3 in `framework-map/SKILL.md` (JSON-shaped tool returns; `type` not `interface`). |
68
-
69
- ## Reading a turn like an expert
70
-
71
- - `actions.requested` / `action.result` pairs are the tool trajectory;
72
- count them by `toolName` before blaming latency, and split **host** work
73
- (channel `callTool`, prep) from **model** tools.
74
- - `turn.failed` with `"turn interrupted"` means a follow-up or `/stop`
75
- preempted it — that's the designed behavior, not a crash.
76
- - Escapes outside the session workspace in read/grep paths mean the
77
- harness is fighting your evidence layout, not that the model is broken.
78
- - `agent-sdk trajectory --events <file>` renders any saved NDJSON.
21
+ | Playground blank / "no agents" | Start `serve`. A built SPA with no backend serves nothing. |
22
+ | Playground UI edits do not show | Open the URL `serve --dev` prints as `playground`, not `:3000`. |
23
+ | Sessions on disk, empty playground list | List is the calling principal. `--dev` or `--allow-anonymous` shows all. Or `?sessionId=ses_...`. |
24
+ | Built-in read/grep fail; retry loops | Bun. Rerun under Node. The tell is `NGHTTP2_FRAME_SIZE_ERROR`. |
25
+ | `github forward` 401s; hook created | Blank `GITHUB_TOKEN`/`GH_TOKEN`. Relay uses `gh` login. |
26
+ | `Hook already exists` | One forwarder per repo. `forward --dir <parent>`. |
27
+ | Answers cite ancestor `AGENTS.md` | Nested checkout. Default `local.cwd` is a cache directory under `~/.cache`. |
28
+ | Model lists IDE `cursor` tools, never MCP | `advertiseTools: true`. Check `GET /v1/info`. |
29
+ | Port 3000 in use | `lsof -iTCP:3000 -sTCP:LISTEN` and kill that pid. |
30
+ | Approval vanished after restart | Parked calls do not survive restart. Re-run. |
31
+ | Schedule / reminder silent under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>`. |
32
+ | `409` on follow-up | Stale `continuationToken`, busy session, or a task session. |
33
+ | `409 session_busy` on `call --session` | Wait, or drop `--session`. |
34
+ | `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
35
+ | Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
36
+ | Slack `channel idle missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
37
+ | Immediate API-key error | Model turns need `CURSOR_API_KEY`. |
38
+ | Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
39
+ | `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
40
+
41
+ Count `action.result` by `toolName` before blaming latency.
42
+ `turn.failed` + `"turn interrupted"` is a follow-up or stop, not a
43
+ crash. `agent-sdk trajectory --events <file>` renders a saved
44
+ trace.