Skip to content

P1-3: Persist question payloads to questions.jsonl #145

@Cho-Geer

Description

@Cho-Geer

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

Metadata

Metadata

Assignees

Labels

area/framework框架代码(.opencode/)bugSomething isn't workingdocumentationImprovements or additions to documentationp2Priority 2 - Mediumpriority-hightech-debt

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions