Call them the phantom tax collectors.

They're the thousands of Canadians who received paycheques from the Canada Revenue Agency, even though they're not actually on the payroll.

It's a $2-million headache for the agency, which is responding partly by writing off the erroneous payments and letting those phantom workers keep the cash.

The CRA last year wrote off more than 40,000 payments it mistakenly sent to Canadians who are not on the payroll. (Sean Kilpatrick/Canadian Press)

The problem has persisted since at least 1999, yet the agency continues to send out paycheques to people who once worked at the CRA, but then left for various reasons.

The federal Treasury Board rapped the agency last year for the shoddy payroll practice, noting that about half of the erroneous payments had not been clawed back after more than a year.

"CRA is encouraged to actively pursue the collection of its accounts receivables and when the debts are deemed uncollectible, timely action should be taken for the writeoff, remission, forgiveness, or waiving of debts," says an April 2016 document obtained by CBC News under the Access to Information Act.

$40,752 in writeoffs

The agency last year wrote off $40,752 in salary overpayments, the highest level since 2011. That helped whittle down the overpayment inventory to about $1.9 million in 2015-16, from about $2.3 million the year before. (The 2016-17 overpayment inventory level will be reported next month.)

"The CRA continues to administer long-term recovery methods to receive salary overpayments for inactive employees," the agency said in response to Treasury Board's criticism.

The federal government has come under fire in recent months for its wonky Phoenix payroll system, whose signature failure is the withholding of salaries from actual workers who earned their paycheques.

The CRA payroll problem is the mirror image — sending paycheques to non-workers — and is unrelated to the Phoenix boondoggle. The agency migrated part of its compensation system to Phoenix only in April 2016, and the overpayment problem pre-dates the changeover.

The CRA recognizes the seriousness of this issue. - Agency spokesperson Lise Newton

The agency was first confronted with its phantom worker issue in October 2008, when an internal audit found there was $3 million outstanding in these undeserved salary payments. The 2008 audit triggered a wave of writeoffs, some $234,000 worth of erroneous payments declared uncollectible over the next three years.

At the time, the agency had about 43,000 workers, a level that has been trimmed to about 40,000 today — that is, a smaller payroll with slightly fewer paycheques to go astray.

"The CRA recognizes the seriousness of this issue and is committed to improving the way it handles these cases," agency spokesperson Lise Newton said in an email, noting that the annual payroll is $2.4 billion and the missing money but a fraction of the total.

Automated system

"Salary overpayments … most often are the result of late notice of an employee going on leave without pay or leaving the CRA," she said.

"The CRA now has an automated system in place to reduce overpayments.… This has reduced the amount of overpayments over the past few years."

CRA officials say they have new systems in place to reduce the number of paycheques they cut by accident for 'phantom' workers. (CRA)

The agency has also said salary overpayments are sometimes the result of the death of an employee, or unexpected leave without pay because of illness or family emergencies.

Newton said the CRA can collect amounts owing by ex-workers by withholding money from pension payments, severance payments, and even through tax-refund setoffs where the money is clawed back from any tax refunds owed to individuals.

Canada Revenue Agency trying to collect $2M in paycheques mistakenly sent to former employees 1:16

Follow @DeanBeeby on Twitter