{
  "slug": "neon-dev-hot-adds-and-reconciles-functions-when-neon-ts-changes-0127f88ca795",
  "title": "neon dev hot-adds and reconciles functions when neon.ts changes",
  "tools": [
    "neonctl"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-09T20:05:22.000Z",
  "announced_at": "2026-06-09T20:05:22.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When adding, removing, or changing functions while `neon dev` runs in config mode, edit `neon.ts`; the CLI reconciles functions by slug, hot-adding and removing servers and restarting only functions whose configuration changed. This applies only when running from `neon.ts`, not in single-`--source` mode.",
    "examples": [
      "neon dev"
    ],
    "gotchas": [
      "Version: v2.24.0",
      "`--source <path>`: Selects single-function mode; omit it to serve functions declared in `neon.ts`. Config reconciliation does not apply in single-source mode.",
      "`preview.functions` (required): Functions declared here are served in config mode; `neon.ts` with no functions to serve produces an error.",
      "function `slug` (required): Functions are keyed by slug when reconciling changes.",
      "function `source` (required): Function source path; a change restarts that function.",
      "function `dev.port`: Explicit port; a change restarts that function. Without it, a free port is selected unless `dev.portless` is used.",
      "function `dev.portless`: Enables portless mode; a change restarts that function. When enabled, the `portless` command must be on `PATH`.",
      "function `env`: Function-specific environment values layer over the shared branch environment; a change restarts that function.",
      "Prerequisite: Install the Neon CLI; the v2.24.0 README says npm installation requires Node.js 18.0 or higher.",
      "Prerequisite: Config mode requires a `neon.ts` declaring at least one function under `preview.functions`.",
      "Prerequisite: If any function uses `dev.portless: true`, install the `portless` command and make it available on `PATH`.",
      "This behavior applies only in `neon.ts` config mode; single `--source` mode is unaffected."
    ]
  },
  "why_it_matters": "Add, remove, or change a function in a repository's neon.ts while its local dev servers are running.",
  "before": "Before this change, adding a function required fully restarting `neon dev`.",
  "sources": [
    "https://github.com/neondatabase/neonctl/releases/tag/v2.24.0",
    "https://github.com/neondatabase/neonctl/pull/520",
    "https://github.com/neondatabase/neonctl/blob/v2.24.0/src/commands/dev.ts",
    "https://github.com/neondatabase/neonctl/blob/v2.24.0/README.md"
  ],
  "rank": 0.94022,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-3598bbddc8d65a5c-3:gate",
    "evidence_hash": "0baffe0f8585a4e9aa94498ac8b243046097987047dd823e2452cccd79a4b31a"
  },
  "review": {
    "draft_hash": "b9c3f3496ebc26702dab181bb5c288f840e4af7eca5d1c2b641565adcbe92598",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
