Skip to content

feat(acp): allow disabling update checks - #85

Open
codexvn wants to merge 1 commit into
svkozak:mainfrom
codexvn:feat/disable-update-check
Open

feat(acp): allow disabling update checks#85
codexvn wants to merge 1 commit into
svkozak:mainfrom
codexvn:feat/disable-update-check

Conversation

@codexvn

@codexvn codexvn commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Add the PI_ACP_CHECK_FOR_UPDATES environment variable to optionally skip Pi update checks during ACP session startup.

Setting the variable to false prevents buildUpdateNotice() from running. When unset or set to any other value, the existing update-check behavior is preserved.

Motivation

The update check executes pi --version and queries npm synchronously during session/new. In sandboxed or latency-sensitive environments, this adds unnecessary startup latency and may depend on network availability.

Changes

  • Skip buildUpdateNotice() when PI_ACP_CHECK_FOR_UPDATES=false.
  • Preserve the existing default behavior.
  • Document the environment variable in the README.
  • Update the startup test to run without external Pi or npm update checks.

Testing

Passed:

  • npm run typecheck
  • npm run lint
  • Targeted startup-info unit test
  • npm run build

The full test suite reports 86/88 passing on Windows. The two failures are existing path-separator assumptions in:

  • session-events.test.ts
  • session-list-and-load.test.ts

The smoke script also has an existing Windows-specific spawn npm/npm.cmd issue.

@codexvn
codexvn force-pushed the feat/disable-update-check branch from 10bb7c9 to ba209f8 Compare July 22, 2026 12:23
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.

1 participant