Hey, thanks for the detailed report and the PR example, that really helps.
In short: the difference you’re seeing between the Linear cloud agent and the IDE agent on the same Sonnet 4.5 is expected behavior, not a Linear integration bug. Cloud and background agents GitHub, Slack, Web, Linear are intentionally more autonomous. They’re set up to finish the task end to end without interactive follow-ups, run lint and tests, get the branch into a working state, and commit on their own. Because they optimize for completeness, they’re more likely to touch nearby code, like fixing unrelated TS errors, cleaning up, or reformatting. The IDE agent is interactive and naturally sticks closer to what you asked, so it tends to be more careful on small tasks.
To keep the cloud agent in scope, it helps to set explicit limits:
- Write boundaries directly in the task: “modify only
<file>; do not touch unrelated files, do not fix unrelated lint/TS errors, do not reformat, do not remove comments”. - For the cloud agent,
.cursor/CLOUD.mdis usually best. It’s read only by cloud runs, and the IDE chat ignores it. You can put an explicit rule there to not touch unrelated files without changing local behavior.AGENTS.mdis read in both environments. For individual.mdcrules, you can setmetadata.environments: cloudfor cloud-only. Details and examples: Is there a way to add rule or agent md only for cloud agent? - For very small targeted edits, the IDE agent will predictably stay more focused.
On “it gets worse over time”: prompting for cloud verification is tuned from time to time, so some behavior changes are possible. There’s no single regression, but we’re aware that it can be over-eager on small tasks and it’s on our radar. I can’t share an ETA for changes.
I see you already asked the agent to remove the extra changes and it rebased the commits, that’s a solid way to handle it. Let me know if it still drifts after you add explicit scope and rules.