Skip to content

Enable automatic task takeover when usage-limit stops hit#50

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/auto-takeover-on-usage-limit-hit-2026-04-24-19-56
Apr 24, 2026
Merged

Enable automatic task takeover when usage-limit stops hit#50
NagyVikt merged 1 commit intomainfrom
agent/codex/auto-takeover-on-usage-limit-hit-2026-04-24-19-56

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

Stop hook now detects usage-limit termination signals, posts a task-thread blocker, and emits a broadcast handoff so another agent can continue work without manual intervention. It also deduplicates pending auto-handoffs from the same session.

Constraint: Hook payload reason fields vary by IDE and may be absent

Rejected: Trigger handoff on every Stop event | would create noisy false-positive takeovers

Confidence: medium

Scope-risk: narrow

Reversibility: clean

Directive: Keep usage-limit detection conservative until we collect real stop_reason samples from more runtimes

Tested: pnpm --filter @colony/process build

Tested: pnpm --filter @colony/hooks typecheck

Tested: pnpm --filter @colony/hooks test

Tested: pnpm biome check packages/hooks/src/handlers/stop.ts packages/hooks/test/runner.test.ts

Not-tested: End-to-end takeover from a live IDE session that actually hits provider usage limits
@NagyVikt NagyVikt merged commit fbe71e3 into main Apr 24, 2026
@NagyVikt NagyVikt deleted the agent/codex/auto-takeover-on-usage-limit-hit-2026-04-24-19-56 branch April 24, 2026 18:07
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