As John Lawler indicated, you have a surplus of commas in your examples (which are noun phrases, not clauses or sentences).

Using “for which” as in those examples leads to clumsy sentences. There is no grammatical requirement to write “the node for which the program is Xing” when what you mean is “the node the program is Xing for”. Anyhow, if required to keep the subject as is, I'd rewrite as follows:

... the ID of the node the program's creating blocks for ...
... the name of the girl I'm cooking dinner for is Sarah ...

However, if you are writing a document, don't introduce artificial constraints that lead to clumsy sentences or phrases. (Your examples and the above rewrites are indeed clumsy.) Instead, introduce suitable terminology in advance. For example, suppose your examples are elements of a list, and all the other items start a certain way. In advance define “developing node” as a reference to the node the program is currently creating blocks for, and subsequently write “the ID of the developing node”.