Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Epics
Fix worker workflow: submit_review transition missed due to context overflow
Edit
Fix worker workflow: submit_review transition missed due to context overflow
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
## Problem Workers compact their context to stay within token limits, which **causes them to forget the initial system prompt instructions**. This includes the instruction to `transition_ticket(event: "submit_review")` after creating a PR. ## Two Scenarios **Scenario 1: New Work** - Worker creates new PR - Needs to: update ticket URL, submit for review, mark idle **Scenario 2: Fix After Review** - PR already exists on ticket - Worker makes fixes, pushes to same branch - Needs to: just submit for review (PR URL unchanged) ## Solution: MCP Tool `submit_for_review(ticket_id)` Create a single tool that handles both cases: ```ruby # app/controllers/api/v1/mcp_controller.rb def handle_submit_for_review(ticket_id) ticket = Ticket.find(ticket_id) # If ticket has no PR URL, prompt worker to create PR first unless ticket.pull_request_url.present? return { error: "Ticket has no PR URL. Create PR first with gh pr create" } end # Submit for review ticket.transition_to!(:pending_audit) # Mark agent idle current_agent.update!(availability_status: :idle) { success: true, message: "Ticket #${ticket_id} submitted for review" } end ``` **Worker workflow:** - After creating NEW PR: call `submit_for_review(ticket_id)` - After fixing review feedback: call `submit_for_review(ticket_id)` **Why this works:** - MCP tools are **always visible** in tool list (not lost during compaction) - Tool name tells them exactly what to do - Single tool call works for both scenarios - Fails fast if no PR exists (reminds them) ## Acceptance Criteria - MCP tool `submit_for_review(ticket_id)` created - Tool registered in mcp-bridge/src/tools/index.ts - Permissions added to mcp_permissions.yml for worker role - Tool validates PR URL exists before submitting - Workers use this tool after PR creation (new or fixes)
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel