Skip to content

[ghcp-handoff] G1: Stream Copilot progress instead of blocking silently #3

@bminier

Description

@bminier

Problem

bin/ghcp-invoke.ts runs Copilot via Bun.spawnSync and only reads stdout after the process exits. Copilot's --output-format json emits JSONL — one event per turn, tool call, thinking block — but we discard all of it until the end. The user sees silence for up to 10 minutes, with no way to judge whether Copilot is making progress or stuck.

Why it matters

  • Can't cancel early when Copilot has clearly wandered
  • Users feel like Claude froze
  • The sibling /codex skill already streams [codex thinking] and tool calls in real time — ghcp-handoff should match

Approach

  • Switch to Bun.spawn (async) with stdout: 'pipe'
  • Parse JSONL line-by-line as it arrives
  • Forward a condensed view (tool call names, thinking headers) to the user via stderr so Claude Code's tool UI shows progress
  • Still write the full raw JSONL to .meta.json for audit

Review reference

Adversarial review G1 — named alongside background execution as "the feature gap that separates neat idea from tool I'd actually reach for".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestghcp-handoffRelates to /ghcp-handoff skill

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions