# Turn TODO comments and spotted bugs into tasks as your agent works

> Have your coding agent file each TODO it leaves and each bug it spots as a task with file and line, so they reach your list instead of rotting in code.

Source: https://taskhold.com/guides/turn-code-todos-into-tasks
Last updated: 2026-11-16

Agents leave TODO comments, and they notice bugs outside the task they're on. Both tend to vanish: the comment sits in the code, the observation scrolls away in the chat. One line in the agent's instructions makes filing them part of its routine, so each one becomes a task when it comes up.

Taskhold's taskhold_create_from_todo tool files them as tasks with the file path and line number attached, on the same list you already read, next to the live board where agents report progress on the tasks they pick up. The [MCP tools reference](https://taskhold.com/docs/mcp-tools) lists the arguments, [handing tasks to your agent](https://taskhold.com/guides/hand-tasks-to-your-coding-agent) covers working the queue, and [a TODO.md file](https://taskhold.com/vs/todo-md) is compared if you'd rather keep them in the repo. To move a whole existing backlog in one go, see [moving TODO.md, GitHub Issues or Linear into Taskhold](https://taskhold.com/guides/import-todo-md-github-issues-linear).

## Ask for it in the workflow

The last line of the standard snippet does it:

```markdown
- Found a TODO or a bug you aren't fixing now? taskhold_create (or taskhold_create_from_todo with file and line).
```

## Sweep an existing codebase

Ask the agent once: "Find the TODO and FIXME comments in src/, skip the trivial ones, and file each real one with taskhold_create_from_todo, priority low unless it looks like a bug." You then sort and prioritize them in the web app. A longer paste-ready version, which skips vendored files and reports what it left out, is in [the backlog move guide](https://taskhold.com/guides/import-todo-md-github-issues-linear).

To see what is there before the sweep, drop the folder into the [TODO comment extractor](https://taskhold.com/tools/todo-comment-extractor): it lists every TODO, FIXME and HACK with file and line, in your browser.

## What gets stored

The task title, the agent's description, and a "file:line" reference. Not the code itself. Tasks the agent creates are marked as agent-created, appear in the live board's activity feed and are listed under "New tasks from agents" in the "Since you were here" card on your next visit.

## FAQ

### Will the agent then fix them?

Only when you prioritize them and the agent takes them as normal tasks. Filing and fixing stay separate on purpose.

## Related

- [A CLAUDE.md and AGENTS.md task workflow](https://taskhold.com/guides/claude-md-task-workflow.md)
- [What your coding agent did while you were away](https://taskhold.com/guides/review-what-your-agent-did.md)
- [Move TODO.md, GitHub Issues or Linear into Taskhold](https://taskhold.com/guides/import-todo-md-github-issues-linear.md)
- [File a Taskhold task when GitHub Actions fails](https://taskhold.com/integrations/github-actions.md)
- [File a Taskhold task when a GitLab pipeline fails](https://taskhold.com/integrations/gitlab-ci.md)

## About Taskhold

Taskhold is a hosted task list shared by a person and their AI coding agents over MCP. Agents break tasks into steps and report progress, and the person watches a live board. $12/month or $120/year per person, 7-day trial with a card, no free plan. Made by Great Work LLC.

To try it, add the MCP server https://taskhold.com/api/mcp to your agent. It connects with no sign-up, and the first time the agent uses Taskhold it gives you a link to start the trial.

- Pricing: https://taskhold.com/pricing.md
- Agent index: https://taskhold.com/llms.txt
