[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CT584HR67GRDPQBW3MF2R8":3,"skill-same:01M7CT584HR67GRDPQBW3MF2R8":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CT584HR67GRDPQBW3MF2R8","copilot-sdk-e2e-dev",null,"Spin up a live local Omnigent server and exercise the GitHub Copilot SDK harness end-to-end — build copilot agents, run real turns, smoke-test, and bug-bash. Load when developing, testing, or debugging the copilot harness (omnigent\u002Finner\u002Fcopilot_executor.py, copilot_harness.py, omnigent\u002Fonboarding\u002Fcopilot_auth.py) or its auth \u002F model \u002F tool-bridge behavior.","roland-id-au\u002Fomniagent","roland-id-au","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2590653?v=4","01M7CT4DEBVK4R185WFWCWN4JD","Buck Chancey","01M7CT4DFGWX49CGE347EF4V6T",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002F.claude\u002Fskills\u002Fcopilot-sdk-e2e-dev\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: copilot-sdk-e2e-dev\ndescription: Spin up a live local Omnigent server and exercise the GitHub Copilot SDK harness end-to-end — build copilot agents, run real turns, smoke-test, and bug-bash. Load when developing, testing, or debugging the copilot harness (omnigent\u002Finner\u002Fcopilot_executor.py, copilot_harness.py, omnigent\u002Fonboarding\u002Fcopilot_auth.py) or its auth \u002F model \u002F tool-bridge behavior.\n---\n\n# Copilot SDK harness: end-to-end dev & testing\n\nThe `copilot` harness drives the **GitHub Copilot SDK** (`github-copilot-sdk`,\nimported as `copilot`) — a persistent `CopilotClient` + `CopilotSession` per\nOmnigent conversation — and bridges Omnigent's `sys_*` tools into Copilot as SDK\n`Tool`s. The Python SDK **bundles the Copilot CLI binary it drives** as a backing\nserver, so there is no separate `@github\u002Fcopilot` install. This skill is the\nproven recipe for running it **for real** against a live local server — not just\nthe unit tests.\n\n> The harness runs as a **local runner** from your current checkout, so\n> `omni run \u003Cbundle> --server \u003Curl>` exercises exactly the code you're on.\n\n## Prerequisites (check these first)\n\n1. **You're on the branch you want to test.** The copilot harness is an\n   optional extra — install it (without disturbing other extras) with\n   `uv sync --frozen --group test --extra copilot`. NB: a bare\n   `uv run --frozen --group test` re-syncs the venv and **prunes** the copilot\n   SDK; for live testing call `.venv\u002Fbin\u002Fomni` \u002F `.venv\u002Fbin\u002Fpython` directly and\n   avoid `uv run` mid-session.\n2. **The SDK is installed:**\n   `.venv\u002Fbin\u002Fpython -c \"import copilot; print(copilot.__file__)\"`.\n3. **A GitHub token with Copilot access is configured.** Copilot needs a\n   fine-grained PAT with the \"Copilot Requests\" permission, or an OAuth token\n   from the GitHub CLI \u002F Copilot CLI app (classic `ghp_` PATs are rejected).\n   Verify (booleans only — never print the token):\n   ```bash\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.copilot_auth import copilot_github_token_configured; import os; print('config:', copilot_github_token_configured(), 'env:', bool(os.environ.get('GH_TOKEN') or os.environ.get('COPILOT_GITHUB_TOKEN')))\"\n   ```\n   If both are `False`, run `omni setup` and register a Copilot token, or\n   `export GH_TOKEN=$(gh auth token)` (when `gh` is logged into an account with\n   Copilot). Check the account's entitlement with\n   `gh api \u002Fcopilot_internal\u002Fuser` (look for `chat_enabled`\u002F`cli_enabled`).\n4. **Network egress to GitHub's Copilot backend.** A turn that hangs or fails to\n   connect on a locked-down host is usually egress, not a harness bug.\n\n## Step 1 — start a local server\n\n```bash\ncd \u002Fpath\u002Fto\u002Fomnigent\n.venv\u002Fbin\u002Fomni server --port 7788 --no-open    # foreground; or `omni server --background` for detached\ncurl -s http:\u002F\u002F127.0.0.1:7788\u002Fhealth           # {\"status\":\"ok\"}\n```\n\nUse the URL below as `$SERVER`.\n\n## Step 2 — build a copilot agent bundle\n\nA spec with `spec_version` **must be a directory containing `config.yaml`** —\nnot a single `.yaml` file. Minimal copilot agent:\n\n```bash\nmkdir -p \u002Ftmp\u002Fcopilot-dev\ncat > \u002Ftmp\u002Fcopilot-dev\u002Fconfig.yaml \u003C\u003C'YAML'\nspec_version: 1\nname: copilot-dev\ndescription: Copilot SDK dev\u002Ftest agent.\nexecutor:\n  type: omnigent\n  config:\n    harness: copilot\n    # model: gpt-5-mini      # optional; omit for Copilot auto-select\nprompt: |\n  You are a terse test agent. Answer in as few words as possible.\nYAML\n```\n\nFor sub-agents, tools, guardrails\u002Fpolicies, copy the field shapes from\n`examples\u002Fpolly\u002Fconfig.yaml` and `examples\u002Fdebby\u002Fconfig.yaml`. (Declare policies\nunder `guardrails.policies:` — a top-level `policies:` key is silently dropped on\nthe `spec_version` + `config.yaml` path.)\n\n## Step 3 — run a turn (and smoke-test)\n\n```bash\nSERVER=http:\u002F\u002F127.0.0.1:7788\ntimeout 280 .venv\u002Fbin\u002Fomni run \u002Ftmp\u002Fcopilot-dev \\\n  -p \"Reply with exactly the single word: PONG\" \\\n  --server \"$SERVER\" 2>&1\n```\n\nA healthy run prints connection lines then the reply (`PONG`). If that works,\nthe full stack is good: token, egress, bundled CLI, harness.\n\n- **Shell \u002F file tools:** add `--tools coding`.\n- **Specific model:** add `--model gpt-5-mini` (or `claude-haiku-4.5`, `auto`).\n\n## Targeted scenarios\n\n| Goal | How |\n|------|-----|\n| Native tools (shell\u002Fedit\u002Fread) | `--tools coding`, prompt to create→read→edit a file; confirm it actually touches disk |\n| Bridged `sys_*` \u002F sub-agent dispatch | declare a sub-agent (harness `copilot` so auth is satisfied), prompt the parent to delegate — exercises the SDK `Tool` async-handler bridge into `_tool_executor` |\n| Model routing | run the same bundle with several `--model` values; an unknown id fails **loud**, a `databricks-*` id is dropped to auto with a warning |\n| LLM-phase policy | add a guardrail that denies a keyword; confirm `PHASE_LLM_REQUEST`\u002F`PHASE_LLM_RESPONSE` blocks it |\n| Concurrency \u002F leaks | fire several `omni run … &` at once; then `pgrep -af \"copilot\u002Fbin\u002Fcopilot\"` to check for orphaned bundled-CLI subprocesses |\n\n## Running polly (or any orchestrator) on a copilot brain\n\nThe copilot harness can serve as an **async orchestrator** brain (polly \u002F debby),\nnot just a standalone agent — it dispatches to sub-agents via the bridged\n`sys_*` tools and synthesizes their results. Two ways to exercise it:\n\n**1. Committed regression guard (brain smoke).**\n`tests\u002Fe2e\u002Ftest_polly_copilot_e2e.py` boots a local server from your checkout and\nruns `examples\u002Fpolly` with `--harness copilot --model auto`, asserting the brain\nboots and replies. It is **skipped** unless a Copilot token is configured (so CI\nwithout one skips it). Run it with:\n\n```bash\n.venv\u002Fbin\u002Fpython -m pytest -o addopts=\"\" tests\u002Fe2e\u002Ftest_polly_copilot_e2e.py -v\n```\n\n**2. Full orchestration (dispatch → collect → synthesize).** Use the\n`polly-e2e-dev` driver (in the internal `agent-framework` clone) — it boots a\nlocal server, polls the AP API, auto-answers elicitations, and asserts the\nfan-out. Drive the brain on copilot with `--brain-harness copilot`, and **always\npass a Copilot-catalog `--brain-model`** (`auto`, `claude-haiku-4.5`,\n`gpt-5-mini`): the driver's default `--brain-model` is a Claude id that Copilot\n(no Databricks gateway) can't route. From the agent-framework clone:\n\n```bash\n.venv\u002Fbin\u002Fpython .claude\u002Fskills\u002Fpolly-e2e-dev\u002Fpolly_driver.py \\\n  --local --code-dir \u003Cthis-worktree> \\\n  --cuj smoke --brain-harness copilot --brain-model auto      # brain only\n# --cuj fanout  …  and  --cuj review-pr --repo omnigent-ai\u002Fomnigent --pr \u003Cn>  …\n#   exercise real sub-agent dispatch (claude_code + codex) under a copilot brain.\n```\n\nAll three CUJs (smoke \u002F fanout \u002F review-pr) pass on a copilot brain (verified\nlive: fanout dispatched 8 sub-agents, 8\u002F8 OK + a synthesis). Note `omni run -p`\nexits after the dispatch turn (the brain parks until woken), so a sub-agent's\nfinal answer lands server-side — read it over the AP API\n(`GET \u002Fv1\u002Fsessions\u002F{id}\u002Fitems`, child sessions), not just stdout.\n\n## Gotchas (these cost real time)\n\n1. **`config.yaml`'s `server:` defaults to a *remote* server.** Omitting\n   `--server` sends your turn to that remote deploy — which may be **stale** and\n   reject the copilot harness with `executor.config.harness: must be one of […]`.\n   **Always pass `--server http:\u002F\u002F127.0.0.1:\u003Cport>`.** (If a *local* server\n   rejects `copilot`, it's running stale code — restart it from your checkout.)\n2. **A spec with `spec_version` must be a directory + `config.yaml`**, never a\n   single `.yaml` file.\n3. **Copilot needs a GitHub token** (fine-grained PAT w\u002F Copilot Requests, or a\n   gh\u002FCopilot-CLI OAuth token). Resolution precedence: spec `executor.auth`\n   (api_key) > stored `copilot:` config block (`omni setup`) > ambient\n   `COPILOT_GITHUB_TOKEN` \u002F `GH_TOKEN` \u002F `GITHUB_TOKEN`. Classic `ghp_` rejected.\n4. **No Databricks gateway.** Copilot talks only to GitHub's backend, so a\n   `databricks-*` model is silently resolved to Copilot's auto-select — it will\n   *not* route through the AI Gateway like claude-sdk\u002Fcodex\u002Fpi.\n5. **Use a model id from the account's catalog.** free_limited offers `auto`,\n   `claude-haiku-4.5`, `gpt-5-mini`. Run `.venv\u002Fbin\u002Fpython` + `client.list_models()`\n   to discover the live set; an unknown id fails loud (server-side failed session).\n6. **Turns take 30–90s** — always wrap in `timeout 280`.\n7. **Never print\u002Fecho the GitHub token** in logs or commands.\n\n## Code & tests\n\n- **Executor (SDK bridge):** `omnigent\u002Finner\u002Fcopilot_executor.py`\n- **Wrap (HARNESS_COPILOT_* env → executor):** `omnigent\u002Finner\u002Fcopilot_harness.py`\n- **Auth \u002F token resolution:** `omnigent\u002Fonboarding\u002Fcopilot_auth.py`\n- **Spawn env:** `_build_copilot_spawn_env` in `omnigent\u002Fruntime\u002Fworkflow.py`\n\n```bash\nuv run --frozen --group test python -m pytest \\\n  tests\u002Finner\u002Ftest_copilot_executor.py \\\n  tests\u002Finner\u002Ftest_copilot_harness.py \\\n  tests\u002Fruntime\u002Ftest_copilot_spawn_env.py \\\n  tests\u002Fonboarding\u002Ftest_copilot_auth.py -q\n```\n\n## Bug-bash (fan out)\n\nTo stress the harness, run several scenario probes in parallel — each builds a\nbundle and runs real turns against the same `$SERVER`, then reports what broke.\nHighest-value targets: the `Tool` async-handler bridge (hangs \u002F lost tool\nresults \u002F errors reported as success), model routing, policy enforcement,\nstreamed-output rendering, and orphaned bundled-CLI processes after teardown.\nCross-check the AP API (`GET \u002Fv1\u002Fsessions\u002F{id}\u002Fitems`) — a start failure can exit\n0 with empty stdout while the server records a `failed` session.\n\n## Known sharp edges (found via live bug-bash — \"as of this writing\")\n\n- **Native tools bypass `on:[tool_call]` policies and aren't recorded.** Copilot's\n  built-in `create`\u002F`view`\u002F`edit`\u002F`bash` run inside the SDK, so an\n  `on:[tool_call]` DENY guardrail (e.g. `blast_radius`) never sees them, and they\n  leave no `function_call` item in the transcript (only streamed narration).\n  **Bridged `sys_*` tools ARE gated and recorded.** Gate Copilot's built-ins at\n  the LLM phase (`PHASE_LLM_REQUEST`\u002F`RESPONSE`, which fire) or via the OS-env\n  sandbox — not `on:[tool_call]`. (Same shape as the cursor harness.)\n- **Copilot fails loud (unlike cursor's swallowed start failures).** Bad token,\n  empty\u002Finvalid model, and unknown model ids all exit non-zero with a clear error\n  AND a server-side failed session + error item — verified, not swallowed.\n- **`omni run -p` against an async orchestrator exits after the dispatch turn**,\n  so a delegated sub-agent's final answer is persisted server-side but may not\n  reach stdout in one-shot mode. Read the session over the AP API to see it.\n- **Non-graceful exit can orphan the bundled CLI.** Graceful teardown reaps it\n  (`client.stop()`); after a `SIGKILL`\u002Fhard-exit, sweep\n  `pgrep -af \"copilot\u002Fbin\u002Fcopilot\"`.\n\n## Cleanup\n\n```bash\n.venv\u002Fbin\u002Fomni server stop        # or kill the foreground `omni server`\nrm -rf \u002Ftmp\u002Fcopilot-dev           # remove scratch bundles\npgrep -af \"copilot\u002Fbin\u002Fcopilot\"   # confirm no orphaned bundled-CLI subprocesses linger\n```\n","# Copilot SDK harness: end-to-end dev & testing\n\nThe `copilot` harness drives the **GitHub Copilot SDK** (`github-copilot-sdk`,\nimported as `copilot`) — a persistent `CopilotClient` + `CopilotSession` per\nOmnigent conversation — and bridges Omnigent's `sys_*` tools into Copilot as SDK\n`Tool`s. The Python SDK **bundles the Copilot CLI binary it drives** as a backing\nserver, so there is no separate `@github\u002Fcopilot` install. This skill is the\nproven recipe for running it **for real** against a live local server — not just\nthe unit tests.\n\n> The harness runs as a **local runner** from your current checkout, so\n> `omni run \u003Cbundle> --server \u003Curl>` exercises exactly the code you're on.\n\n## Prerequisites (check these first)\n\n1. **You're on the branch you want to test.** The copilot harness is an\n   optional extra — install it (without disturbing other extras) with\n   `uv sync --frozen --group test --extra copilot`. NB: a bare\n   `uv run --frozen --group test` re-syncs the venv and **prunes** the copilot\n   SDK; for live testing call `.venv\u002Fbin\u002Fomni` \u002F `.venv\u002Fbin\u002Fpython` directly and\n   avoid `uv run` mid-session.\n2. **The SDK is installed:**\n   `.venv\u002Fbin\u002Fpython -c \"import copilot; print(copilot.__file__)\"`.\n3. **A GitHub token with Copilot access is configured.** Copilot needs a\n   fine-grained PAT with the \"Copilot Requests\" permission, or an OAuth token\n   from the GitHub CLI \u002F Copilot CLI app (classic `ghp_` PATs are rejected).\n   Verify (booleans only — never print the token):\n   ```bash\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.copilot_auth import copilot_github_token_configured; import os; print('config:', copilot_github_token_configured(), 'env:', bool(os.environ.get('GH_TOKEN') or os.environ.get('COPILOT_GITHUB_TOKEN')))\"\n   ```\n   If both are `False`, run `omni setup` and register a Copilot token, or\n   `export GH_TOKEN=$(gh auth token)` (when `gh` is logged into an account with\n   Copilot). Check the account's entitlement with\n   `gh api \u002Fcopilot_internal\u002Fuser` (look for `chat_enabled`\u002F`cli_enabled`).\n4. **Network egress to GitHub's Copilot backend.** A turn that hangs or fails to\n   connect on a locked-down host is usually egress, not a harness bug.\n\n## Step 1 — start a local server\n\n```bash\ncd \u002Fpath\u002Fto\u002Fomnigent\n.venv\u002Fbin\u002Fomni server --port 7788 --no-open    # foreground; or `omni server --background` for detached\ncurl -s http:\u002F\u002F127.0.0.1:7788\u002Fhealth           # {\"status\":\"ok\"}\n```\n\nUse the URL below as `$SERVER`.\n\n## Step 2 — build a copilot agent bundle\n\nA spec with `spec_version` **must be a directory containing `config.yaml`** —\nnot a single `.yaml` file. Minimal copilot agent:\n\n```bash\nmkdir -p \u002Ftmp\u002Fcopilot-dev\ncat > \u002Ftmp\u002Fcopilot-dev\u002Fconfig.yaml \u003C\u003C'YAML'\nspec_version: 1\nname: copilot-dev\ndescription: Copilot SDK dev\u002Ftest agent.\nexecutor:\n  type: omnigent\n  config:\n    harness: copilot\n    # model: gpt-5-mini      # optional; omit for Copilot auto-select\nprompt: |\n  You are a terse test agent. Answer in as few words as possible.\nYAML\n```\n\nFor sub-agents, tools, guardrails\u002Fpolicies, copy the field shapes from\n`examples\u002Fpolly\u002Fconfig.yaml` and `examples\u002Fdebby\u002Fconfig.yaml`. (Declare policies\nunder `guardrails.policies:` — a top-level `policies:` key is silently dropped on\nthe `spec_version` + `config.yaml` path.)\n\n## Step 3 — run a turn (and smoke-test)\n\n```bash\nSERVER=http:\u002F\u002F127.0.0.1:7788\ntimeout 280 .venv\u002Fbin\u002Fomni run \u002Ftmp\u002Fcopilot-dev \\\n  -p \"Reply with exactly the single word: PONG\" \\\n  --server \"$SERVER\" 2>&1\n```\n\nA healthy run prints connection lines then the reply (`PONG`). If that works,\nthe full stack is good: token, egress, bundled CLI, harness.\n\n- **Shell \u002F file tools:** add `--tools coding`.\n- **Specific model:** add `--model gpt-5-mini` (or `claude-haiku-4.5`, `auto`).\n\n## Targeted scenarios\n\n| Goal | How |\n|------|-----|\n| Native tools (shell\u002Fedit\u002Fread) | `--tools coding`, prompt to create→read→edit a file; confirm it actually touches disk |\n| Bridged `sys_*` \u002F sub-agent dispatch | declare a sub-agent (harness `copilot` so auth is satisfied), prompt the parent to delegate — exercises the SDK `Tool` async-handler bridge into `_tool_executor` |\n| Model routing | run the same bundle with several `--model` values; an unknown id fails **loud**, a `databricks-*` id is dropped to auto with a warning |\n| LLM-phase policy | add a guardrail that denies a keyword; confirm `PHASE_LLM_REQUEST`\u002F`PHASE_LLM_RESPONSE` blocks it |\n| Concurrency \u002F leaks | fire several `omni run … &` at once; then `pgrep -af \"copilot\u002Fbin\u002Fcopilot\"` to check for orphaned bundled-CLI subprocesses |\n\n## Running polly (or any orchestrator) on a copilot brain\n\nThe copilot harness can serve as an **async orchestrator** brain (polly \u002F debby),\nnot just a standalone agent — it dispatches to sub-agents via the bridged\n`sys_*` tools and synthesizes their results. Two ways to exercise it:\n\n**1. Committed regression guard (brain smoke).**\n`tests\u002Fe2e\u002Ftest_polly_copilot_e2e.py` boots a local server from your checkout and\nruns `examples\u002Fpolly` with `--harness copilot --model auto`, asserting the brain\nboots and replies. It is **skipped** unless a Copilot token is configured (so CI\nwithout one skips it). Run it with:\n\n```bash\n.venv\u002Fbin\u002Fpython -m pytest -o addopts=\"\" tests\u002Fe2e\u002Ftest_polly_copilot_e2e.py -v\n```\n\n**2. Full orchestration (dispatch → collect → synthesize).** Use the\n`polly-e2e-dev` driver (in the internal `agent-framework` clone) — it boots a\nlocal server, polls the AP API, auto-answers elicitations, and asserts the\nfan-out. Drive the brain on copilot with `--brain-harness copilot`, and **always\npass a Copilot-catalog `--brain-model`** (`auto`, `claude-haiku-4.5`,\n`gpt-5-mini`): the driver's default `--brain-model` is a Claude id that Copilot\n(no Databricks gateway) can't route. From the agent-framework clone:\n\n```bash\n.venv\u002Fbin\u002Fpython .claude\u002Fskills\u002Fpolly-e2e-dev\u002Fpolly_driver.py \\\n  --local --code-dir \u003Cthis-worktree> \\\n  --cuj smoke --brain-harness copilot --brain-model auto      # brain only\n# --cuj fanout  …  and  --cuj review-pr --repo omnigent-ai\u002Fomnigent --pr \u003Cn>  …\n#   exercise real sub-agent dispatch (claude_code + codex) under a copilot brain.\n```\n\nAll three CUJs (smoke \u002F fanout \u002F review-pr) pass on a copilot brain (verified\nlive: fanout dispatched 8 sub-agents, 8\u002F8 OK + a synthesis). Note `omni run -p`\nexits after the dispatch turn (the brain parks until woken), so a sub-agent's\nfinal answer lands server-side — read it over the AP API\n(`GET \u002Fv1\u002Fsessions\u002F{id}\u002Fitems`, child sessions), not just stdout.\n\n## Gotchas (these cost real time)\n\n1. **`config.yaml`'s `server:` defaults to a *remote* server.** Omitting\n   `--server` sends your turn to that remote deploy — which may be **stale** and\n   reject the copilot harness with `executor.config.harness: must be one of […]`.\n   **Always pass `--server http:\u002F\u002F127.0.0.1:\u003Cport>`.** (If a *local* server\n   rejects `copilot`, it's running stale code — restart it from your checkout.)\n2. **A spec with `spec_version` must be a directory + `config.yaml`**, never a\n   single `.yaml` file.\n3. **Copilot needs a GitHub token** (fine-grained PAT w\u002F Copilot Requests, or a\n   gh\u002FCopilot-CLI OAuth token). Resolution precedence: spec `executor.auth`\n   (api_key) > stored `copilot:` config block (`omni setup`) > ambient\n   `COPILOT_GITHUB_TOKEN` \u002F `GH_TOKEN` \u002F `GITHUB_TOKEN`. Classic `ghp_` rejected.\n4. **No Databricks gateway.** Copilot talks only to GitHub's backend, so a\n   `databricks-*` model is silently resolved to Copilot's auto-select — it will\n   *not* route through the AI Gateway like claude-sdk\u002Fcodex\u002Fpi.\n5. **Use a model id from the account's catalog.** free_limited offers `auto`,\n   `claude-haiku-4.5`, `gpt-5-mini`. Run `.venv\u002Fbin\u002Fpython` + `client.list_models()`\n   to discover the live set; an unknown id fails loud (server-side failed session).\n6. **Turns take 30–90s** — always wrap in `timeout 280`.\n7. **Never print\u002Fecho the GitHub token** in logs or commands.\n\n## Code & tests\n\n- **Executor (SDK bridge):** `omnigent\u002Finner\u002Fcopilot_executor.py`\n- **Wrap (HARNESS_COPILOT_* env → executor):** `omnigent\u002Finner\u002Fcopilot_harness.py`\n- **Auth \u002F token resolution:** `omnigent\u002Fonboarding\u002Fcopilot_auth.py`\n- **Spawn env:** `_build_copilot_spawn_env` in `omnigent\u002Fruntime\u002Fworkflow.py`\n\n```bash\nuv run --frozen --group test python -m pytest \\\n  tests\u002Finner\u002Ftest_copilot_executor.py \\\n  tests\u002Finner\u002Ftest_copilot_harness.py \\\n  tests\u002Fruntime\u002Ftest_copilot_spawn_env.py \\\n  tests\u002Fonboarding\u002Ftest_copilot_auth.py -q\n```\n\n## Bug-bash (fan out)\n\nTo stress the harness, run several scenario probes in parallel — each builds a\nbundle and runs real turns against the same `$SERVER`, then reports what broke.\nHighest-value targets: the `Tool` async-handler bridge (hangs \u002F lost tool\nresults \u002F errors reported as success), model routing, policy enforcement,\nstreamed-output rendering, and orphaned bundled-CLI processes after teardown.\nCross-check the AP API (`GET \u002Fv1\u002Fsessions\u002F{id}\u002Fitems`) — a start failure can exit\n0 with empty stdout while the server records a `failed` session.\n\n## Known sharp edges (found via live bug-bash — \"as of this writing\")\n\n- **Native tools bypass `on:[tool_call]` policies and aren't recorded.** Copilot's\n  built-in `create`\u002F`view`\u002F`edit`\u002F`bash` run inside the SDK, so an\n  `on:[tool_call]` DENY guardrail (e.g. `blast_radius`) never sees them, and they\n  leave no `function_call` item in the transcript (only streamed narration).\n  **Bridged `sys_*` tools ARE gated and recorded.** Gate Copilot's built-ins at\n  the LLM phase (`PHASE_LLM_REQUEST`\u002F`RESPONSE`, which fire) or via the OS-env\n  sandbox — not `on:[tool_call]`. (Same shape as the cursor harness.)\n- **Copilot fails loud (unlike cursor's swallowed start failures).** Bad token,\n  empty\u002Finvalid model, and unknown model ids all exit non-zero with a clear error\n  AND a server-side failed session + error item — verified, not swallowed.\n- **`omni run -p` against an async orchestrator exits after the dispatch turn**,\n  so a delegated sub-agent's final answer is persisted server-side but may not\n  reach stdout in one-shot mode. Read the session over the AP API to see it.\n- **Non-graceful exit can orphan the bundled CLI.** Graceful teardown reaps it\n  (`client.stop()`); after a `SIGKILL`\u002Fhard-exit, sweep\n  `pgrep -af \"copilot\u002Fbin\u002Fcopilot\"`.\n\n## Cleanup\n\n```bash\n.venv\u002Fbin\u002Fomni server stop        # or kill the foreground `omni server`\nrm -rf \u002Ftmp\u002Fcopilot-dev           # remove scratch bundles\npgrep -af \"copilot\u002Fbin\u002Fcopilot\"   # confirm no orphaned bundled-CLI subprocesses linger\n```\n",{"name":5,"description":7},"deploy\u002Froland-id-au-omniagent","83ee3dcd78468bbe3baf4bb264a0c99a53aa0fec",".claude\u002Fskills\u002Fcopilot-sdk-e2e-dev","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent","https:\u002F\u002Fgithub.com\u002Froland-id-au","2026-09-16 03:15:34",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add roland-id-au\u002Fomniagent --skill copilot-sdk-e2e-dev",{"tool":36,"command":37},"bunx","bunx skills add roland-id-au\u002Fomniagent --skill copilot-sdk-e2e-dev",{"tool":39,"command":40},"pnpm","pnpm dlx skills add roland-id-au\u002Fomniagent --skill copilot-sdk-e2e-dev","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002F.claude\u002Fskills\u002Fcopilot-sdk-e2e-dev\u002FSKILL.md",true,[],[45,52,59,66,71,76],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7CTDVNPM78AJ051GVDB44X5","deep-research","Research checklist and source-quality guidance for the archer e2e fixture.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fexamples\u002Farcher\u002Fskills\u002Fdeep-research\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7CTDS8SPN8P5GK1Q4SCSY7K","pi-e2e-xyz-greet-c4a8d5","Test greeter — pi skills e2e. The unique suffix c4a8d5 appears in the skill name so a string match in the agent's output proves Pi loaded this skill.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_none\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7CTDP4R9F06966W78WNZS2Y","pi-e2e-xyz-count-d2f6e1","Test counter — pi skills e2e. The unique suffix d2f6e1 appears in the skill name so a string match in the agent's output proves Pi loaded this skill.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_none\u002Fskills\u002Fpi-e2e-xyz-count-d2f6e1\u002FSKILL.md",[],[],{"skillNo":67,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CTDKP4W1Q18ZCY0XANDSEG","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_list\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[],{"skillNo":72,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTDFBMA3EBZNV7J380THGP","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_list\u002Fskills\u002Fpi-e2e-xyz-count-d2f6e1\u002FSKILL.md",[],[],{"skillNo":77,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7CTDCVTXTG72BKEV2HY7M6W","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_all\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[]]