Skip to content

Copilot Agentic Conversation missing when AWF preserves session state outside host HOME #64460

Description

@dsyme

Summary

Copilot workflows compiled with the latest stable release can omit the Agentic Conversation section from the agent job summary because the structured events.jsonl session log is not copied out of the AWF container.

Observed in https://github.com/github/actions-nudger/actions/runs/36697083106#summary-109828879119 using:

  • gh-aw v0.89.21
  • Copilot CLI 1.0.87
  • gh-aw-firewall/AWF v0.28.23

Evidence

The run's AWF output reports:

Agent session state preserved at: /tmp/awf-agent-session-state-EF2Df8

The later copy step instead reads the host runner path:

Copying Copilot session state from /home/runner/.copilot/session-state to /tmp/gh-aw/sandbox/agent/logs/copilot-session-state
Session state directory copied successfully

However, the uploaded agent artifact contains no events.jsonl. The parser therefore has no structured Copilot events from which to render Agentic Conversation.

The compiled AWF invocation mounts /tmp/gh-aw but does not pass AWF's --session-state-dir option. copy_copilot_session_state.sh still reads $HOME/.copilot/session-state, which is not the container's persisted session-state location.

This is the same host/container handoff problem previously addressed for AWF smoke workflows in github/gh-aw-firewall#1945.

Expected behavior

Copilot session state must be written to a deterministic host-accessible directory under /tmp/gh-aw, copied into the agent logs artifact, and parsed into the job summary.

Proposed fix

  • Pass --session-state-dir /tmp/gh-aw/sandbox/agent/session-state to AWF for Copilot executions.
  • Copy from that deterministic path into /tmp/gh-aw/sandbox/agent/logs/copilot-session-state.
  • Keep a compatibility fallback to $HOME/.copilot/session-state where appropriate.
  • Add compiler and copy-script tests that verify the AWF argument and source path.

Acceptance criteria

  • Compiled Copilot workflows configure AWF with a deterministic session-state directory.
  • events.jsonl is included in the uploaded agent artifact.
  • The parser can render Agentic Conversation from a sandboxed Copilot run.
  • Non-Copilot engines are unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions