# The code mode CPU limit counts real CPU time

> The 5 s CPU limit of the MCP execute tool now counts the script's own CPU time, so a busy server no longer stops a script early.

The 5 s CPU limit of `execute` (the [code mode](https://developers.openwaf.dev/mcp/oauth-and-tokens/#lite-profile) of the MCP server) counted the script's wall time minus its API calls. On a busy server a script waiting for a core used that time up and stopped with `cpu_limit` before it had used 5 s of CPU.

Now the limit counts the CPU time of the thread running the script, without its API calls: load stretches the run's wall time but not this. Only the 25 s limit on the whole run (`time_limit`) bounds the wait. An endless loop still stops with `cpu_limit` after 5 s of CPU.
