Skip to content

gh-tasks: a forced pull rotates the previous snapshot before an unread delta is whispered #552

Description

@aaronsb

Problem

cmd_pull copies snapshot.json to snapshot.prev.json on every completed pull. cmd_whisper diffs the two and deletes prev. When a pull lands while an earlier pull's delta is still unread, the second pull overwrites prev with the intermediate snapshot and the first delta is gone.

The head agent hits this on the PostToolUse gh issue * lane, which forces a pull: a gh issue command right after a prompt-lane pull loses the prompt-lane delta. The prompt lane is mostly safe because it returns early inside GH_TASKS_TTL.

Found while fixing #551, where a subagent's forced pull consumed the head agent's delta. That case is closed by the agent_id guard; this one remains for the head agent alone.

Fix shape

Keep prev when it already exists and has not been whispered, so the delta accumulates from the last read snapshot. Or fold the unread delta forward at pull time. Either way the test in tests/gh-tasks-test.sh section 4 gains a case: two pulls, one whisper, both deltas reported.

Owner and reopen condition

Owner: repo maintainer. Reopens on the first observed lost opened #n in a head-agent transcript after #551 lands.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tasklistMirrored into Claude Code session task lists (ADR-180)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions