Skip to content

Feature request: Upload Copilot CLI session-state events.jsonl as a workflow artifact #19648

@Yoyokrazy

Description

@Yoyokrazy

Summary

When the Copilot CLI runs inside the awf firewall sandbox (Docker container), the session-state events.jsonl file is created inside the container at $HOME/.copilot/session-state/. The existing "Copy Copilot session state files to logs" step in the compiled workflow attempts to copy these files from the host's $HOME/.copilot/session-state directory, but since the CLI runs inside the container, the host directory is empty and no events.jsonl is ever captured.

As a result, the agent_outputs artifact only contains the process debug log (process-*.log), not the conversation events JSONL that the Copilot CLI generates.

Current behavior

  1. awf runs the Copilot CLI inside a Docker container
  2. The CLI writes events.jsonl to $HOME/.copilot/session-state/ inside the container
  3. The "Copy Copilot session state files" step runs on the host and finds nothing at $HOME/.copilot/session-state
  4. The agent_outputs artifact contains only the process log — no events.jsonl

Desired behavior

The events.jsonl from the Copilot CLI session state should be extracted from the container (or from a mounted volume) and included in a workflow artifact, so that downstream consumers can parse the structured conversation log.

Possible approaches:

  • Mount the container's $HOME/.copilot/session-state to a host path (e.g., /tmp/gh-aw/session-state/) so the existing copy step can find it
  • Add a step that copies the file out of the container before it's stopped
  • Upload it as a dedicated artifact (e.g., session-events) separate from the agent logs

Use case

We're building a triage dashboard that visualizes agent workflow runs. For raw Copilot CLI runs (outside awf), we successfully download and parse events.jsonl to show the full conversation log, tool calls, and agent trace. We want the same visibility for gh-aw runs, but the events.jsonl is currently inaccessible.

The safe-output artifact provides the final triage actions (labels, assignments), which is great for results. But for debugging, benchmarking, and understanding agent behavior, the full conversation log is essential.

Reproduction

Any workflow compiled with gh aw compile that uses engine.id: copilot and runs through awf:

  • The agent_outputs artifact contains only sandbox/agent/logs/process-*.log (the debug log), no events.jsonl

Environment

  • gh-aw compiler: v0.50.0
  • awf: v0.20.2
  • Copilot CLI: 0.0.415

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions