Skip to content

docs: add task ID collision prevention rule to AGENTS.md (t201)#820

Merged
alex-solovyev merged 1 commit intomainfrom
chore/t201-task-id-recheck-rule
Feb 9, 2026
Merged

docs: add task ID collision prevention rule to AGENTS.md (t201)#820
alex-solovyev merged 1 commit intomainfrom
chore/t201-task-id-recheck-rule

Conversation

@alex-solovyev
Copy link
Collaborator

@alex-solovyev alex-solovyev commented Feb 9, 2026

Summary

  • Add one-paragraph rule to .agents/AGENTS.md Planning & Tasks section
  • Rule: after git pull --rebase on TODO.md, re-verify assigned task ID is still unique before pushing

Context

Hit this race condition twice in one session — parallel sessions created t195 and t196 simultaneously, causing duplicate IDs in TODO.md. Root cause: agent assigns next ID, commits, push rejected (remote ahead), does pull --rebase, pushes again WITHOUT checking if the ID was taken by the parallel session.

The fix is an instruction-level guard: re-read TODO.md after rebase, renumber if collision detected.

Closes t201.

Summary by CodeRabbit

Release Notes

This release contains no user-facing changes. Internal documentation updates have been made to improve development workflows.

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

Walkthrough

This PR adds documentation guidance to .agents/AGENTS.md regarding Task ID collision prevention. It specifies that when git push fails and users pull with --rebase, they must re-read TODO.md to re-verify ID uniqueness before pushing again, and renumber to the next available ID if a collision exists. The note is inserted in two locations within the planning-related guideline block.

Changes

Cohort / File(s) Summary
Documentation & Workflow Guidance
.agents/AGENTS.md
Added Task ID collision prevention note detailing re-verification workflow when git push fails and rebase occurs; expanded planning/workflow safety checks in two locations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🔑 When IDs collide in the git rebase dance,
Re-read and renumber to keep tasks in trance,
A note in the guidelines, both clear and concise,
Prevents the confusion—a workflow advice! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a task ID collision prevention rule to AGENTS.md. It is concise, specific, and directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/t201-task-id-recheck-rule

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
.agents/AGENTS.md (1)

125-126: Consider relocating this instruction to workflows/plans.md for better adherence to AGENTS.md scope.

This Task ID collision prevention rule addresses a specific edge case (parallel sessions + git push rejection + rebase) that likely applies to <20% of tasks. The instruction budget for root AGENTS.md should be reserved for universally applicable guidance.

Recommendation: Move this detailed collision prevention guidance to workflows/plans.md (already referenced on line 127), and replace lines 125-126 with a brief pointer:

**Task ID collision prevention**: See `workflows/plans.md` "Task ID Collision Prevention" for handling race conditions in parallel sessions.

This keeps the root file focused while preserving the important guidance in the specialized workflow documentation where users working with parallel sessions will find comprehensive planning details.

Based on learnings, root AGENTS.md should maintain ~50-100 max instructions with universal applicability to >80% of tasks.

</review_comment_end>


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 9 22:54:09 UTC 2026: Code review monitoring started
Mon Feb 9 22:54:09 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Mon Feb 9 22:54:12 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@alex-solovyev alex-solovyev merged commit 1af6526 into main Feb 9, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant