A long-running agent is working on a multi-week refactoring project. It needs to track which modules have been refactored, which are in progress, and which are pending, across multiple workflow runs and potentially multiple weeks. What is the best GitHub-native mechanism for this long-term task tracking?
Select an answer to reveal the explanation.
Short Explanation
GitHub Issues are the project manager that never forgets. You can use structured labels and milestones to encode state, then update them through the API after each module. That keeps the work durable, visible, and queryable across weeks.
Full Explanation
GitHub Issues with structured labels and milestone tracking are the correct long-term task tracking mechanism for multi-week agentic work. Each module gets its own Issue. The agent updates the issue's labels (e.g., refactor:done) and adds a comment with the result after processing each module. The GitHub API provides reliable CRUD operations on issues, and the state persists indefinitely (until the issue is closed or deleted). Humans can monitor progress through the GitHub UI, and automation can query issue state via the API.
The approach of storing task state in a JSON file committed to the repository on every update creates a commit for every state update, polluting repository history. It also creates write contention when multiple parallel agent runs try to update the same file simultaneously, potentially causing merge conflicts or lost updates.
The approach of storing task state in a GitHub Actions cache with a branch-level key is designed for short-term, within-run or same-branch caching. Cache entries expire after 7 days of inactivity and are not suitable for multi-week persistence. They also provide no human-readable progress view.
The approach of maintaining task state in the agent's system prompt by appending completed modules to the instructions is not possible in a durable way. System prompts are defined at agent configuration time, not updated dynamically between workflow runs. Even if the system prompt were updated, it would grow unboundedly over weeks and eventually exceed context window limits, degrading agent performance.
GitHub Issues with structured labels provide human-readable, machine-queryable, durable long-term state that aligns with how GitHub-native teams track project work.