Skip to content

feat(agents): collect the Copilot CLI transcript as a session log - #700

Merged
artempartos merged 1 commit into
developfrom
feat/copilot-session-events-log
Nov 11, 2026
Merged

artempartos merged 1 commit into
developfrom
feat/copilot-session-events-log

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Why

Copilot CLI (1.0.108) always draws on the alternate screen and offers no flag, setting or env var to stop it (upstream: github/copilot-cli#2334 closed as "will not bring back the old renderer", #4509 open). So a Copilot session's terminal log, its replay and the tmux scrollback hold only the last frame. #698 fixes this for the runtimes that have a switch. Copilot has none.

The CLI keeps a full record of its own at ~/.copilot/session-state/<session id>/events.jsonl. It holds every user and assistant message, tool call and result. Sessions did not collect it.

What

  • CopilotCliAdapter#session_log_paths now adds ~/.copilot/session-state/*/events.jsonl.
  • CopilotCliAdapter#session_log_name stores each transcript as <session id>.events.jsonl. Every transcript file is named events.jsonl, so the bare basename would make the rows indistinguishable (the same approach as Kiro's sess_<id>.messages.jsonl).
  • The file is not a filtered log, so Sessions::LogCollector masks it inside the container before upload, like Claude's transcript.

Verified

  • A live aixle/copilot-cli container ran a TUI session against the mock LLM (test/otlp_capture/mock.py, BYOK provider env), two turns.
    • It wrote session-state/<uuid>/events.jsonl (36 KB) with event types session.start, user.message, assistant.message, assistant.turn_*, session.usage_record and others.
  • LogCollector's own listing command, run in that container, found the file and the masker marker. That selects the direct-upload path with masking in the container.
  • session_log_name maps the file to <uuid>.events.jsonl.
  • Locally: copilot_cli_adapter_test.rb and changelog_test.rb pass, and rubocop is clean. The full suite runs on CI.

🤖 Generated with Claude Code

Copilot CLI always draws on the alternate screen and has no switch to stop it,
so a session's terminal log keeps only the last frame. The CLI's own
session-state/<id>/events.jsonl is the one full record of the conversation;
collect it like Claude's and Kiro's transcripts, under a name carrying the
CLI's session id, since every file is called events.jsonl.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit c6f481d into develop Nov 11, 2026
17 checks passed
NOX73 added a commit that referenced this pull request Nov 11, 2026
…s-0-1-0

* origin/develop:
  feat(coder): clone GitLab, Bitbucket and Azure DevOps repos in coder_prepare_repo (#703)
  fix(agents): show each runtime's own logo everywhere (#704)
  feat(teams): assign cards to a team and run triggers as a team (#701)
  feat(agents): collect the Copilot CLI transcript as a session log (#700)
  fix(agents): keep Grok and Antigravity conversations in the terminal scrollback (#698)
  feat(billing): redesign the Billing tab around active and previous subscriptions (#646)
  feat(web): switch the UI, admin, public pages and emails to Inter (#699)
  chore(deps): weekly dependency batch — aws-sdk-core 3.267 retry fix, prism 2, Mantine 9.7.5, runner Go 1.27.4 (#697)
  fix(board): leave archived tasks out of agent board listings (#690)
  feat(agents): add GitHub Copilot CLI as an agent runtime (#684)
  feat(runners): the callback proxy — the proxy sidecar, the host runner relay and the gateway proxy route (task #216, 8b) (#677)

Signed-off-by: Rozhnov Alexandr <[email protected]>
aixle-com Bot pushed a commit that referenced this pull request Nov 11, 2026
Conflicts were between staging's feature-branch merges of #677, #684 and an
earlier head of #689 and develop's squash-merges of #677/#684 (plus #700,
#704). Each hunk takes develop's side (the final, reviewed version), except
config/settings.yml, which keeps the runners.release block of #689, and
CHANGELOG.md, which keeps both sides' entries. Staging-only content (#494)
merged without conflict and is kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant