AI abnormal behavior, bugs

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

On an extremely simple UI task whose correct method was already clear, the agent invented a false claim that the existing list API cannot support item selection by id, declared a new single-item GET “required,” wrote that into the plan, and started implementing it — ignoring code, specs, and a real API response shape that already includes id.

Steps to Reproduce

Simple implementation order

Expected Behavior

Cursor AI Bug Report — Fabricated “list API has no id” / Forced unnecessary single-GET API

Field

Value

Date

2026-10-20 (+07)

Product

Cursor Agent / Composer (coding agent)

Repo

chintaiKing (local project)

Internal ID

INC-2026-10-20-01 (doc/incident.md)

Classification

Abnormal agent behavior (user term: 異常動作/「移住動作」表記) — not a normal mistake on a hard problem

Severity

High — would have shipped extra API cost, worse UX, and a bug farm if not caught by the user

One-line summary

On an extremely simple UI task whose correct method was already clear, the agent invented a false claim that the existing list API cannot support item selection by id, declared a new single-item GET “required,” wrote that into the plan, and started implementing it — ignoring code, specs, and a real API response shape that already includes id.

Why this is a Cursor AI product bug (not “user prompt error”)

Task was trivial

Replace a table column with a chat button; navigate to booking-chat with ?id=; on the chat page, select that item from list data by id.

Method was already taught / obvious

The bookings list UI already holds full booking rows (including id) from GET /api/yoyakuo/bookings?from=&to=&userId=.

The user later pasted a live response proving each list element includes “id”: “…”.

Correct design: pass id in the query string and match that id in the list payload (or the row already in hand). No new endpoint.

Abnormal belief: “list returns items without id”

The agent stated in planning prose that deep-link by ?id= was impossible without a new single-GET because the existing list API was insufficient. That premise is false: the list API returns complete records with id.

Code and specs were ignored; the design was fabricated

Docs and code already document GET /api/yoyakuo/bookings returning booking objects used by list UIs. The agent did not treat that as decisive. Instead it invented a mandatory GET /api/yoyakuo/bookings/{id}, put it in the approved plan, and began editing backend + tests.

If allowed to continue, damage was predictable

Server cost: extra round-trips / new endpoint surface for data already in the list response.

Bad UX: dual sources of truth (list vs single-get), loading flashes, failure modes when id exists in list but single-get path diverges.

Bug farm: route ordering, cache sync, eligibility checks, tests, and docs all duplicated around a needless API.

This pattern matches specification gaming / false “API gap” invention: reframing a front-end selection problem as “backend missing,” then expanding scope.

Expected agent behavior

Read existing bookings list page and chat page.

See that list rows already have id.

Plan: button → /yoyakuo/booking-chat?id=…; chat page reads route.query.id and selects the matching item from the same list API data.

Do not add a new GET-by-id unless code/docs prove the list payload lacks id or cannot load the needed row.

Actual agent behavior

Claimed: “?id= direct selection needs a single-item GET because the existing list API is insufficient.”

Locked that into the plan (B/E GET /bookings/{id}, loadById, tests, docs).

After user approval of that plan, started implementing get_booking and test_yoyakuo_get_booking_by_id.

When challenged, admitted the “list insufficient” claim was a short-circuit from chat-page cache/page-size concerns — i.e. an FE load-range issue mislabeled as API insufficiency — not an observed missing id field.

Evidence (facts)

A. Live list API already returns id (user-provided)

Request:

GET /api/yoyakuo/bookings?from=2026-10-01&to=2026-11-01&userId=…

Response element (excerpt):

{
“id”: “6ad721e1c2253d0eab083814”,
“unit_id”: “6984c754e75af444626f09eb”,
“guest_name”: “石塚 亘”,
“check_in”: “2026-10-20T00:00:00”,
“check_out”: “2026-10-24T00:00:00”,
“status”: “confirmed”
}

B. False plan claim (agent)

?id= 直指定には既存の一覧 API では不足するため、単件取得が必要です。

C. Code changes started under that false premise

fastAPI/api/apiYoyakuo.py — get_booking (GET /bookings/{booking_id}) added

fastAPI/tests/api/test_yoyakuo_api.py — test_yoyakuo_get_booking_by_id added

(Corrective revert of these changes may still be pending at report time.)

D. Agent’s own admission of the short-circuit (after AG)

Reason given for the false plan: assumed the chat page only had a current-month / limit=20 cache, so ?id= might miss; then equated that with “list API insufficient → need single GET.” That is not evidence that list items lack id.

Impact if user had not caught it

Area

Consequence

Cost

New endpoint + per-open fetch for data already paid for by the list call

UX

Extra latency; error UI when single-get fails while list already has the row; inconsistent selection paths (row click vs deep link)

Maintainability

Duplicate contracts (list vs get-by-id), more tests/docs, more auth/plan gates to keep in sync — classic bug farm

Trust

User must police basic REST shape (“does a list item have an id?”) instead of shipping features

Reproduction outline (for Cursor)

Give a simple “list row → detail route with ?id=” task in a codebase where list GET already returns objects with id.

Ask for a plan first (Plan mode).

Observe whether the agent invents “need GET by id because list is insufficient” without showing a response schema that omits id.

Optionally approve the plan and observe backend scaffolding for the needless endpoint.

Request to Cursor

Please treat this as an agent reliability / hallucination-of-API-gaps bug:

Agents must not declare existing list APIs “insufficient for id selection” when list items already include id, without citing schema or live response.

Agents must not escalate FE cache/pagination choices into mandatory new backend endpoints without user confirmation that the list payload is actually inadequate.

Prefer “select from list by id” over inventing CRUD surface area on trivial navigation tasks.

References (repo)

Internal incident: doc/incident.md → INC-2026-10-20-01

Log: doc/log/ai_result.md (2026-10-20 23:02 +0700)

Existing list API docs: docs/yoyakuo-cms/02-api.md (GET /api/yoyakuo/bookings?from=&to=&userId=)

List UI: vueApp/src/pages/yoyakuo/YoyakuoBookingsPage.vue

Chat UI: vueApp/src/pages/yoyakuo/YoyakuoBookingChatPage.vue

Paste-ready English (forum / support)

Title: Agent invents mandatory GET-by-id after claiming list API “has no usable id” on a trivial list→detail task

Body:
On 2026-10-20, Cursor’s coding agent planned and began implementing a new GET /api/…/bookings/{id} for a simple “chat button → /booking-chat?id=” UI change. It falsely stated the existing list endpoint was insufficient for ?id= deep-linking. The list API already returns full objects with id (confirmed by a live JSON response). The agent ignored code/docs, reframed an optional FE cache issue as an API gap, and started backend+test work that would add cost, dual data paths, and maintenance bugs. Please fix agent behavior that fabricates missing REST capabilities when list payloads already include primary keys.

Operating System

MacOS

Version Information

Cursor Version 3.25.9 (Universal)

For AI issues: which model did you use?

Auto

Additional Information

Since around July, there has been a drastic decline in intelligence; the AI ​​frequently provides responses based on pure conjecture—without even looking at the existing code or specifications—and often resorts to sloppy, makeshift coding during implementation.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Walter_Ehrmantraut,

Proposing a new GET-by-id endpoint without first checking that the list response already includes id is not what the agent should do. I’ve passed this example to the team along with your earlier report.

Auto picks a model for each request, and the models behind it change over time, so how the agent behaves on Auto can differ from what you saw a few months ago. For planning and API design work, pick a specific model in the model picker instead of Auto, so every request goes to the same model.

A few things that make this kind of mistake much less likely:

  1. Treat the plan as a draft. If it adds an endpoint, table or dependency you didn’t ask for, delete that step (or ask the agent to justify it) before you click Build. The build follows the edited plan.
  2. Add a project rule (Cursor Settings > Rules), for example: “Do not propose new API endpoints unless you have read the existing endpoint’s code or response schema and shown that it lacks the data. Quote the schema when you claim something is missing.”
  3. In the request, @-mention the source of truth (the API doc and the two page components) so the agent reads them before planning.

If it happens again, please send the Request ID (chat menu > Copy Request ID). With privacy mode on we can’t see the conversation, but the ID shows us which model handled it!