Can Cursor Agent's System Prompt/API call details help resolve bad model behavior?

This is largely for the Cursor team. I’m wondering how much the agent in Cursor, or rather the underlying API call, system prompt, default context, something…could help tame bad behavior in a model?

I’m still trying to make GPT-5 work for me. I love Claude for code, its my preference, but the news about Anthropic isn’t great these days. So I need to know if I can make another model work well enough for me. Thus far, GPT-5 works ok, but its not yet, IMO, a replacement for Sonnet yet.

This model really, really, REALLY LOVES to do everything in its power, to BYPASS all the type protections built into TypeScript. It does not seem to understand that assignment issues are there for a reason…whenever it runs into syntax issues with assignments ( either with variables, or properties on objects, parameters, etc.) it will do everything in its power to bypass them. Usually its as any but there are times when it will as unknown as T, and it just does this as a matter of course. There are other frustrating issues with the model and its usage of TypeScript as well. Enough, in fact, that my cursor rules where I’ve explained my style preferences (in rather great detail) simply do not seem to be enough (and, additionally, are often entirely ignored by the model, even though I’ve set other rules to state that they are NOT OPTIONAL…it seems to just decide to ignore those at times as well!)

I suspect the fundamental problem here is that, these models are built in publically available code, and its probably all too common for devs to just bypass TypeScript’s type safety because…they don’t like it and don’t want to bother with it, don’t understand typescript well enough to make their code conform, whatever. Whatever the original cause, GPT-5 does not seem to write good TypeScript code in the grand scheme of things.

Now, it seems to just arbitrarily choose to ignore my rules whenever it sees fit. So I don’t know if a system prompt or some other aspect of the API call can do anything to get around that. I guess if the model is going to ignore you, its gonna ignore anything and everything you tell it, regardless of what part of the API call it comes from? Anyway, just thought I’d inquire. I’ve spent a couple of days here, trying to clean up an absolute mess of my code, at a fine grained level, where GPT-5 has just bypassed type checking all over the place, often in subtle ways that I wasn’t catching at first. The job is mostly done now…however, I fear that it will all be for moot, the next time I prompt the agent to do some work and it just goes through whole files de-typing everything into any again…

Hi! The problem is not that GPT-5 tends to bypass typing, but that it often ignores the instructions written in the “Rules”. You need to frequently remind GPT-5 to strictly follow the “Rules”.

Oh, it is that GPT-5 bypasses typing. That seems to be its default behavior, and its rather prolific. ONCE you add rules, then an ADDITIONAL problem becomes that GPT-5 bypasses the rules AS WELL.

I had problems with typing before I added specific rules about not using as any, or as unknown as T except as allowed by the user and only when strictly necessary. The issue is really even more complex than this, as GPT-5 has other issues as well. It does NOT understand how to write automated tests, and has a real tough time…well, first, avoiding huge, complex functions/methods (hundreds of lines long), and when they occur, it does not do a very good job breaking them down into more manageable functions/methods, and the list goes on.

It is not just code issues, either. I have an extensive rule set up for managing Linear. It clearly states key terms, terminology, phrases, etc. that should trigger the rule, and denote what things should result in MCP interaction with Linear to manage stories, etc. Sometimes GPT-5 runs the MCP when necessary. A lot of the time, it has no clue what a story is, the pattern used for my ticket numbers in Linear, or even what Linear is. In those cases, it will start searching the entire codebase for terms like my ticket identifiers, fail to find them, then start arbitrarily changing code…

This model has severe shortcomings. Or, maybe its the model+agent, or how Cursor interacts with the OpenAI API (I’ve read things from people who have used both Cursor and OpenAI directly, and it seems some of the issue may in fact be Cursor’s integration with GPT-5). Whatever the problem is, GPT-5 has some critical issues.

GPT-5’s integration with Cursor is still very raw, and that’s where the real problem lies. Unfortunately, there is currently no way to avoid this. Fortunately, the “todo” functionality was recently fixed in GPT-5, so hopefully the “Rules” will be fixed as well.

Hope is all I’ve got at the moment. Guess we’ll see how Cursor 1.5 pans out.