-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Background
The Copilot SDK recently added session context tracking capabilities in PR #427 (included in v0.1.24, Feb 16, 2026). This enhancement, authored by Jeremy Moseley, introduces:
SessionContextexposed inSessionMetadata- provides working directory, git root, repository, and branch informationsession.context_changedevent - fires when working directory context changes between turnslistSessions()filtering - ability to filter sessions by context fields (cwd, gitRoot, repository, branch)
Related SDK commits:
Proposal
Enhance Planeteer's execution screen to track and display when Copilot agent sessions change working directories during task execution. This would:
- Listen for
session.context_changedevents from each Copilot agent session during parallel task execution - Display context changes in the event log alongside other session events (tool calls, outputs, etc.)
- Show current working directory for each running task in the execution UI
- Help users understand what directories agents are operating in, especially for tasks that span multiple repositories or workspaces
Benefit
This enhancement improves transparency and debugging during execution by:
- Visibility: Users can see when an agent changes directories or switches git repositories during task execution
- Debugging: When tasks fail, knowing the working directory context helps diagnose issues (e.g., running commands in wrong directory)
- Multi-workspace support: For projects spanning multiple repos, users can verify agents are working in the correct context
- Audit trail: The execution log becomes a complete record of not just what was done, but where it was done
Acceptance Criteria
- Subscribe to
session.context_changedevents insrc/services/executor.tsfor each agent session - Display context change events in the execution screen event log with timestamp, task ID, and new context (cwd, repository, branch)
- Show current working directory for each running task in the execution UI (e.g., next to task status)
- Update the
SessionEventWithTasktype to include context change events - Add unit tests verifying context change events are captured and associated with the correct task
- Update SDK dependency to
^0.1.24or later inpackage.jsonif needed
AI generated by Weekly Enhancement Suggestions
Reactions are currently unavailable