Parent Epic
#138 — Sub-Agent Question Propagation Fix
Phase 1 — Option B: Runtime Guard (Sub-task of P1-1)
Task
Add question payload persistence to the question-policy-before.ts plugin.
Implementation
- When a subagent question call is blocked, save the question payload to
.task_temp/{taskId}/questions.jsonl
- Each line is a JSON object with: sessionID, agent, taskId, timestamp,
output.args.questions shape (from plugin-hook-reference docs)
- This provides durable audit trail for parent/Orchestrator to reconstruct
Data Shape
{
"event": "SUBAGENT-QUESTION-BLOCKED",
"timestamp": "ISO8601",
"sessionID": "cg_ses_xxx",
"agent": "Coder-BE",
"taskId": "T-xxx",
"question_payload": {
"questions": [
{
"id": "q1",
"question": "Which approach should I use?",
"options": ["Option A", "Option B"]
}
]
}
}
Reference
docs/review/framework-refactor/sub-agent-question-propagation-issue.md §7 Phase 1
Parent Epic
#138 — Sub-Agent Question Propagation Fix
Phase 1 — Option B: Runtime Guard (Sub-task of P1-1)
Task
Add question payload persistence to the question-policy-before.ts plugin.
Implementation
.task_temp/{taskId}/questions.jsonloutput.args.questionsshape (from plugin-hook-reference docs)Data Shape
{ "event": "SUBAGENT-QUESTION-BLOCKED", "timestamp": "ISO8601", "sessionID": "cg_ses_xxx", "agent": "Coder-BE", "taskId": "T-xxx", "question_payload": { "questions": [ { "id": "q1", "question": "Which approach should I use?", "options": ["Option A", "Option B"] } ] } }Reference
docs/review/framework-refactor/sub-agent-question-propagation-issue.md§7 Phase 1