Changelog
A chronological record of all significant changes to AI Agents HQ. Each entry includes the date, what changed, and the relevant commits.
2026-02-18
M1 Hardening: Cross-Review Fixes
Fixes identified during cross-review of the M1 hardening implementation. These changes improve data integrity, error handling, and test coverage.
Bug Fixes:
- Fixed description corruption on task complete/fail. Previously,
hq task complete --summaryandhq task fail --reasonappended text to the task'sdescriptionfield, permanently destroying the original instructions. Now completion summaries are stored in a dedicatedsummaryfield and failure details in afailureDetailfield. The original description is never modified.
- Made auto-unblock and sync-blocks best-effort on task complete. Previously, if
autoUnblockorsyncDerivedBlocksfailed after a successful completion (e.g., CAS conflict on a dependent task), the CLI exited non-zero even though the task was already completed and the idempotency key recorded. Now these operations log warnings to stderr but do not fail the completion.
New Features:
- Added
--notifyflag tohq task complete. Optionally sends atask_completedinbox event to a specified agent after successful completion. Uses its own idempotency key (complete-notify:{taskId}:{key}) and is best-effort (warns on failure, does not fail the completion). Example:--notify team-lead
New Task Fields:
summary(*string) — Stores the completion summary fromhq task complete --summary. Replaces the old behavior of appending to description.failureDetail(*string) — Stores the failure reason text fromhq task fail --reason. Replaces the old behavior of appending to description.
New Tests (7 added):
TestIntegration_DescriptionPreservedAfterComplete— Verifies description unchanged after completion, summary field populatedTestIntegration_DescriptionPreservedAfterFail— Verifies description unchanged after failure, failureDetail field populatedTestIntegration_StaleLeaseClaim— Manually expires lease, verifies different agent can reclaimTestIntegration_CompleteWithNotify— Verifies--notifycreates inbox event for target agentTestIntegration_ConcurrentInboxSendsMonotonicIDs— 8 concurrent sends, verifies strictly monotonic event IDsTestIntegration_FlagParsingEdgeCases— Table-driven test with 8 cases covering missing/malformed args across all commandsTestIntegration_CompleteUnauthorizedDoesNotConsumeIdempotencyKey— Validates 3-step flow (unauthorized fail, authorized succeed, retry no-op)
Files Changed:
internal/teams/protocol/task_schema.go— AddedSummaryandFailureDetailfields to Task structcmd/hq/task_cmd.go— Fixed description corruption, made auto-unblock best-effort, added--notifyflagcmd/hq/command_helpers.go— AddedmustMarshalStringhelper for safe JSON string encodingcmd/hq/integration_test.go— Added 7 new integration tests
M1 Hardening Pass
Hardened the coordination core with deterministic exit codes, identifier validation, atomic task creation, and improved test coverage.
Commits: bdf81f2, 2400977
Changes:
- Added deterministic CLI exit codes using sentinel error pattern (
errValidation,errStaleLease,errProtocolMismatch) withcommandExitCode()switch mapping errors to exit codes 0, 10-14 - Added identifier validation with
safeIdentifierPatternregex — team and agent names must match[A-Za-z0-9._-]+ - Added atomic task ID allocation with
.nextidlock file to prevent race conditions duringhq task create - Split idempotency into
HasKey()(read-only check) andCheckAndSet()(atomic set) for correct ordering in completion flow - Added
ReadFile()permission enforcement — files with insecure permissions (group/other readable) are rejected with exit 14 - Added
syncDerivedBlocks()for full recompute ofblocksarrays fromblockedBydata - Added inbox event type validation against
ValidInboxEventTypesmap - Added
command_helpers.gowith shared CLI utilities (flag parsing, validation, exit code mapping)
Model Migration: Codex-Optimized Models
Updated all Codex profiles from legacy models to codex-optimized variants and expanded Codex role to include implementation partner.
Commits: d65928c
Changes:
- Default Codex model updated to
gpt-5.3-codex(77.3% Terminal-Bench, 77.6% Cybersec CTF) - Reviewer and security-auditor profiles upgraded to
gpt-5.3-codexwithxhighreasoning - Quick-fix profile upgraded from
gpt-4.1togpt-5.1-codex-mini - Codex role expanded from "QA Lead" to include "Implementation Partner" for cross-model auditing
- Gemini auto-routing enabled (removed model pin from settings.json)
Code Quality Fixes
Commits: b0d822e, 86f9237
- Fixed all
errchecklint errors across CLI and test files - Fixed
gofmtalignment in struct fields and const blocks
M2: Agent Contracts & Skills
Instruction files, agent definitions, skill templates, and tool configurations for all three CLI tools.
Commits: defeebe, 9bc5ebe, ed67f7b, 0c671f4, dd35e5f
Changes:
- Added
CLAUDE.md(Lead Developer),GEMINI.md(Research Specialist),AGENTS.md(QA Lead & Implementation Partner) - Added
.gemini/settings.jsonwith auto-routing, agents enabled, write tools excluded - Added
.codex/config.tomlwith 5 profiles (reviewer, security-auditor, git-expert, refactor, quick-fix) - Added 4 Claude subagents (researcher, reviewer, architect, optimizer)
- Added 2 Gemini subagents (deep-researcher, api-auditor)
- Added 5 Claude skills (research, refactor, test-writer, code-review, team-protocol)
- Added 3 Gemini skills (deep-research, api-audit, team-protocol)
- Added 5 shared agent templates and 5 shared skill templates
M1: Coordination Core
The protocol, storage, and CLI foundation for multi-agent task coordination.
Commits: faac95b, da094ba
Changes:
- Added protocol constants: exit codes (0, 10-14), task statuses (6 states), state reasons (6 codes), inbox event types (5 types), protocol version 2, schema version 1
- Added Task struct with 22 fields, CAS versioning, lease management, validation
- Added Inbox struct with append-only events, monotonic IDs, idempotency keys
- Added file locking via
flock(2)system call - Added atomic writes via tmp-fsync-rename pattern
- Added persistent idempotency key store
- Added TaskStore with CRUD, list, atomic ID allocation,
UpdateWithLockwith CAS - Added InboxStore with send (idempotent), read (with since-event filter)
- Added
hqCLI with 8 commands: task create/list/claim/complete/fail/heartbeat, inbox send/read - 57 tests passing (26 protocol + 17 storage + 14 integration)
M0: Baseline & Reset
Project reset from v1 prototype to clean Go project structure.
Commits: 3d1ded2, 5b1db52
Changes:
- Archived v1 prototype to
archive/v1-prototypebranch - Cleaned main branch, created Go module (
github.com/gbas/ai-agents-hq) - Created directory structure:
cmd/hq/,internal/teams/protocol/,internal/teams/storage/ - Added CI pipeline with 3 gates: gofmt check, golangci-lint, go test with race detector
- Added
CLAUDE.mdwith architecture context and build commands