Skip to content

fix(extension): bound request-help cleanup wait - #284

Open
dvd233 wants to merge 1 commit into
Tencent:mainfrom
dvd233:codex/fix/request-help-cleanup-timeout-277
Open

dvd233 wants to merge 1 commit into
Tencent:mainfrom
dvd233:codex/fix/request-help-cleanup-timeout-277

Conversation

@dvd233

@dvd233 dvd233 commented Sep 18, 2026

Copy link
Copy Markdown

Summary

  • Bound the request-help cleanup wait to 1 second when the content script has already reported a user decision.
  • Keep cleanup best-effort, but do not hold the daemon RPC open forever when tabs.sendMessage or notification cleanup never settles.
  • Added a regression test for a hanging cleanup transport.

Fixes #277

Root cause

finishHelpFromContent waits for cleanupHelp before resolving the request. That cleanup awaits browser messaging without a deadline, so a hung message channel can outlive the daemon's cleanup grace and surface as request-help timed out and cleanup could not be confirmed.

The fix preserves the existing wait when cleanup completes normally and only falls back after the bounded budget.

Validation

  • Regression red on the base commit: the new test timed out at 5 seconds.
  • vitest run src/tools/__tests__/human-loop.test.ts: 30 passed.
  • Extension typecheck: passed.
  • Full extension suite: 1,857 passed, 103 skipped, 14 files skipped by repository configuration.
  • Extension production build: passed.
  • git diff --check: passed.

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.

Stuck 'Agent is controlling' overlay blocks all real clicks and makes bsk upload fail (extension reload required)

1 participant