Skip to content

fix(coding-agent): reject ctx.ui.custom() under daemon/RPC instead of silent no-op - #885

Open
pushpraj-core wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
pushpraj-core:fix/ctx-ui-custom-daemon-rpc
Open

fix(coding-agent): reject ctx.ui.custom() under daemon/RPC instead of silent no-op#885
pushpraj-core wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
pushpraj-core:fix/ctx-ui-custom-daemon-rpc

Conversation

@pushpraj-core

@pushpraj-core pushpraj-core commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Fixes #680

ctx.ui.custom() was silently no-opping under the daemon/worker architecture and over RPC, returning undefined instead of surfacing an error. This made it impossible for extensions to detect that terminal-takeover rendering wasn't available.

Changes

  • ExtensionUIContext.supportsCustom (new property): a readonly boolean flag that extensions can check before calling custom() to detect whether terminal-takeover rendering is supported in the current UI context.
  • noOpUIContext (runner.ts): custom() now throws instead of returning undefined as never.
  • Daemon binding (daemon-extension-binding.ts): custom() now throws with a descriptive error explaining the daemon/worker limitation.
  • RPC bridge (rpc-extension-ui-context.ts): custom() now throws with a descriptive error explaining the RPC limitation.
  • Interactive mode (interactive-mode.ts): sets supportsCustom: true since it owns a real terminal.
  • CHANGELOG: documents the fix.

How to test

  1. Call ctx.ui.custom() from an extension running under the daemon — it should now throw instead of silently resolving.
  2. Check ctx.ui.supportsCustom — it should be false under daemon/RPC and true in interactive mode.
  3. Type-check: npx tsgo --noEmit -p tsconfig.build.json

Note

Fix ctx.ui.custom() to throw instead of silently no-op in daemon and RPC modes

  • Adds a supportsCustom: boolean flag to the ExtensionUIContext interface so callers can check whether terminal takeover is available before calling custom().
  • In daemon/worker and RPC modes, ctx.ui.custom() now throws an Error instead of silently resolving; interactive mode sets supportsCustom: true.
  • Behavioral Change: extensions that previously relied on custom() silently no-oping in non-interactive contexts will now receive a thrown error.

Macroscope summarized c9981c4.

… silent no-op

Adds ctx.ui.supportsCustom so extensions can detect terminal-takeover support instead of relying on ctx.hasUI.

Fixes PrimeIntellect-ai#680
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.

ctx.ui.custom() is an unconditional no-op under the daemon/worker architecture, with no ctx.hasUI signal to detect it

1 participant