How can I provide a filter with context/nid of node invoking? I'm currently working on a custom module that has a filter that requires the node object for the output.

Originally the filter was simply pulling in the NID from arg(1) and using that to load in the node object, but unfortunately if the filter cache is flushed and the nodes rebuild their output from anywhere other than the node page itself arg(1) will not contain the NID and therefore the filter will break.

I'm considering putting the NID into the token that the filter converts, but obviously the NID would not be known during the creation of a node. It wouldn't be overly difficult to alter the token via hook_nodeapi() to insert the NID, but it seems like a lot of hastle.

Is there a simpler way to provide a filter with some sort of context so it can be aware of which node invoked it?
Filters are not context-aware and AFAIK, there is no way at the moment to do what you want. This has been a feature request since 2008, but the proposed patch didn't make it into Drupal 7.

If this is very important to the site you're building, you can consider patching Drupal core. However, once Drupal core is patched, you will need to take extra care (and time) when updating your site.