Postdoc project with poor scientific content and unlikely to lead to publications I have started a 2-year postdoc six months ago, in the US. I am starting being concerned about its outcome in terms of publication and scientific production in general. These are the issues:

the project is basically turning out to be pretty poor in terms of scientific content, and that was sold in a completely different way when I was offered the position. In particular, what I was meant to do was developing mathematical models and implementing them as new code. However, what I am actually doing is just debugging a pre-existing code, which is hardly leading to significant publications.
Mind, I wasn’t expecting to publish during the first six months of the postdoc, but looking at what is planned for the future, I can’t realistically expect that the nature of the project is going to change. Moreover, my institution is trying to keep alive a rather obsolete and seriously limited code, which is unlikely to be competitive with other research groups. Unfortunately, I do not have much freedom change code and/or approach (see point 2). Whenever I proposed something new, it was basically dismissed as a distraction.

Due to my group policy, I do not have much independence to add anything to what the sponsor is paying for. I cannot even use my affiliation to publish independent research that I may carry out while being off duty (this is security policy, providing details is not going to add any significant information).
In my PhD, I doubled my publication outcome by doing research in my free time, now I’d have to publish without an affiliation. While I knew this in advance, I was expecting to be able to publish from my main project. In any case, I don’t believe that having to rely on my free time is the best way to grow and be productive.


To sum it up, this is looking more technical consulting than scientific research.
Given this, I am being seriously worried that this might impact negatively on my future career in research, unless I become permanent at my current institution (which is not granted at all, especially  considering the project I was put onto). It is hard to grow as a scientist or even as an engineer by doing ‘‘monkey’’ work.
I am asking for advice on how to prevent this. As I have said, if things go on like now, I will have a two-year ‘‘publication hole’’ in my resume that won’t likely help me to find new positions. I will be really sorry if this happens as I was able to publish much more than the average during my PhD, and I don’t want to ruin it all.
On the other hand, if I stay open to other opportunities now, I am not sure how well it may be perceived.
So, I’d wish to know what you think about this situation: am I worrying to much or am I right to be concerned? I am not learning anything from this activity, nor producing, in a period in which I’d wish to grow further, and I am feeling like wasting all my previous efforts and results.
And for the better of my future career (I want to go on doing research), should I wait till the contract ends or should I act now and look for something else?
I think that the more you stay in the position the more you’ll be trapped into it. I see in the comments that you are at a national laboratory, so I understand that the salary might be tempting and that’s not easy to give it up. However, from a long term perspective, you could lose an opportunity to flourish and to get known. Plus, how long is your contract, 2-3 years? None or few publications could harm your chances to stay in the field, particularly if you want or have to move to another lab or university. It comes down to choosing between being well paid today or increasing your chances to be successful in the future, unless you think you can change your situation without leaving.