Skip to content

Document Copilot SDK mode and custom Copilot command behavior#36649

Closed
Copilot wants to merge 9 commits into
mainfrom
copilot/update-copilot-agentic-documentation
Closed

Document Copilot SDK mode and custom Copilot command behavior#36649
Copilot wants to merge 9 commits into
mainfrom
copilot/update-copilot-agentic-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

This updates the Copilot engine reference to cover copilot-sdk mode, explain how custom Copilot CLI behavior is supplied through engine.command, and point readers to the Copilot SDK driver specification.

  • Copilot SDK mode

    • Adds a dedicated copilot-sdk section to the engine reference.
    • Clarifies that SDK mode remains under engine.id: copilot and uses a headless Copilot CLI sidecar plus @github/copilot-sdk.
  • Custom Copilot command behavior

    • Documents how engine.command changes the executable used for the headless Copilot CLI sidecar in copilot-sdk mode.
    • Clarifies that engine.harness does not replace the built-in harness or bundled copilot_sdk_driver.cjs in SDK mode.
  • Specification link

    • Adds a direct link to the Copilot SDK driver specification for the driver contract, environment variables, permission handling, and logging requirements.
engine:
  id: copilot
  copilot-sdk: true
  command: /usr/local/bin/copilot-dev

Copilot AI and others added 8 commits June 3, 2026 13:39
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Update Copilot engine docs for SDK driver Document Copilot SDK mode and custom SDK driver behavior Jun 3, 2026
Copilot AI requested a review from pelikhan June 3, 2026 13:54
engine:
id: copilot
copilot-sdk: true
harness: custom_copilot_harness.cjs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in copilot-sdk mode, you must change the "command" field. Ignore "harness"

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 3, 2026

@copilot in copilot-sdk mode, you must change the "command" field. Ignore "harness"

@pelikhan pelikhan marked this pull request as ready for review June 3, 2026 14:20
Copilot AI review requested due to automatic review settings June 3, 2026 14:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation to explain how engine.id: copilot workflows can run in Copilot SDK-backed mode (copilot-sdk: true), how custom Copilot SDK driver behavior is supplied via a custom engine.harness, and links readers to the Copilot SDK driver specification.

Changes:

  • Added a new “Copilot SDK Mode (copilot-sdk)" section to the engine reference, including configuration examples and behavior notes.
  • Documented how engine.harness interacts with copilot-sdk mode for customizing the Copilot SDK driver/harness flow, plus safety constraints for harness filenames.
  • Added the “Daily Ambient Context Optimizer” workflow to the agent factory status table.
Show a summary per file
File Description
docs/src/content/docs/reference/engines.md Documents copilot-sdk mode behavior, custom harness usage, and links to the SDK driver spec.
docs/src/content/docs/agent-factory-status.mdx Adds a new daily workflow entry to the status table.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +143 to +145
Your custom harness must use a filename ending in `.js`, `.cjs`, or `.mjs`. Do not include path separators, `..`, or shell metacharacters.

These restrictions keep the harness selection safe for sandboxed execution and prevent path traversal or shell injection through workflow configuration. Valid examples include `my_harness.cjs` and `custom-sdk-driver.mjs`. Invalid examples include `../harness.js` and `harness;rm.cjs`.
@pelikhan pelikhan closed this Jun 3, 2026
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 3, 2026

@copilot in copilot-sdk mode, you must change the "command" field. Ignore "harness"

Addressed in 0ab01dd. The copilot-sdk section now documents engine.command for changing the Copilot executable and clarifies that engine.harness does not replace the SDK driver in this mode.

Copilot AI changed the title Document Copilot SDK mode and custom SDK driver behavior Document Copilot SDK mode and custom Copilot command behavior Jun 3, 2026
Copilot AI requested a review from pelikhan June 3, 2026 14:25
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.

3 participants