I have a (bash) script that periodically looks for completed torrents that are above a certain ratio. When it finds a match, the script deletes the torrent.
It may depend on what you're using as `<torrentid>` there. When you're using something that's not "all", "active", real ID (like the one from the first column of `transmission-remote -l` output) or a range of IDs, or real hash, Transmission doesn't treat this as an error if it can't find the torrent(s) you want it to remove, i.e. -t is a filter that could match 0 torrents and that would be okay.
Another issue that could be there is the lack of proper quoting... Or maybe something else... It's quite hard to guess unless you attach the complete script instead of making us put bits and pieces together.
I'd suggest tracing the script, e.g. by running it manually with -x passed to the interpreter (or adding `set -x` at the beginning of the script), then confirming that what you're passing to transmission-remote is indeed valid.