Skip to content

Fix Windows agent hook Unicode prompts - #2100

Merged
nwparker merged 1 commit into
mainfrom
nwparker/https-github.com-stablyai-orca-issues-1920
May 16, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/https-github.com-stablyai-orca-issues-1920

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Fixes #1920

Summary

  • Force local Windows managed hook scripts to read redirected stdin as UTF-8.
  • Send hook POST bodies as UTF-8 bytes with application/json; charset=utf-8.
  • Share the Windows hook POST command across Claude, Codex, Gemini, Cursor, Grok, and Droid installers.

Screenshots

Reproduction: corrupted sidebar agent prompt before the hook encoding fix.

Reproduction

Fixed: the same sidebar row with the Chinese prompt preserved.

Fix

Verification

  • pnpm exec vitest run --config config/vitest.config.ts src/main/agent-hooks/installer-utils.test.ts src/shared/agent-hook-listener.test.ts src/main/agent-hooks/remote-hook-service-installers.test.ts
  • pnpm run typecheck:node
  • pnpm exec oxlint src/main/agent-hooks/installer-utils.ts src/main/agent-hooks/installer-utils.test.ts src/main/claude/hook-service.ts src/main/codex/hook-service.ts src/main/cursor/hook-service.ts src/main/droid/hook-service.ts src/main/gemini/hook-service.ts src/main/grok/hook-service.ts
  • pnpm exec oxfmt --check src/main/agent-hooks/installer-utils.ts src/main/agent-hooks/installer-utils.test.ts src/main/claude/hook-service.ts src/main/codex/hook-service.ts src/main/cursor/hook-service.ts src/main/droid/hook-service.ts src/main/gemini/hook-service.ts src/main/grok/hook-service.ts
  • $electron: injected a live inline agent row in the sidebar, captured the corrupted ? prompt state, updated the row to a Chinese prompt, verified document.body.innerText contained 请总结这260个字符的内容01:0, and captured the fixed state.

@nwparker
nwparker merged commit 675b1b0 into main May 16, 2026
2 checks passed
@nwparker
nwparker deleted the nwparker/https-github.com-stablyai-orca-issues-1920 branch May 16, 2026 20:32
nwparker added a commit that referenced this pull request Aug 20, 2026
…erpreter

The Antigravity drift was invisible to per-agent tests. The shared builder took
only `(source)` and could not add the extra form field Antigravity needs, so it
forked a private copy of the then-correct PowerShell command (#2100); when the
shared builder moved to curl (#6402) every caller was fixed for free and the
copy silently was not.

Assert the violated invariant across all ten batch-script agents at once, and
generate under a mocked win32 platform so the POSIX CI legs guard it too.
Verified to fail on the pre-fix script, naming the offending file.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

[Bug]: Garbled characters appear in the left sidebar

1 participant