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…