Title: bug: CLI deploy hangs (100% CPU) in non-TTY CI — truncateMessage() is O(n²) · Issue #3826 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: bug: CLI deploy hangs (100% CPU) in non-TTY CI — truncateMessage() is O(n²) · Issue #3826 · triggerdotdev/trigger.dev
X Title: bug: CLI deploy hangs (100% CPU) in non-TTY CI — truncateMessage() is O(n²) · Issue #3826 · triggerdotdev/trigger.dev
Description: Provide environment information Bug reproduces in CI (not on the dev machine above): CircleCI machine executor: Ubuntu 24.04, x86_64, Node 22.16.0 trigger.dev / @trigger.dev/sdk: 4.4.6 Deploy build image: node:21.7.3-bookworm-slim Descri...
Open Graph Description: Provide environment information Bug reproduces in CI (not on the dev machine above): CircleCI machine executor: Ubuntu 24.04, x86_64, Node 22.16.0 trigger.dev / @trigger.dev/sdk: 4.4.6 Deploy build...
X Description: Provide environment information Bug reproduces in CI (not on the dev machine above): CircleCI machine executor: Ubuntu 24.04, x86_64, Node 22.16.0 trigger.dev / @trigger.dev/sdk: 4.4.6 Deploy build...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/3826
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: CLI deploy hangs (100% CPU) in non-TTY CI — truncateMessage() is O(n²)","articleBody":"### Provide environment information\n\nBug reproduces in CI (not on the dev machine above):\n - CircleCI machine executor: Ubuntu 24.04, x86_64, Node 22.16.0\n - trigger.dev / @trigger.dev/sdk: 4.4.6\n - Deploy build image: node:21.7.3-bookworm-slim\n\n\n### Describe the bug\n\nTrigger deploy hangs on \"Deploying project\" for ~30 min (CI timeout) on a non-TTY runner. `node --prof` shows ~92% CPU usage on `RegExpReplace` / `StringPrototypeReplace` / `truncateMessage` (packages/cli-v3/src/utilities/windows.ts). On a non-TTY, `process.stdout.columns` is undefined → `truncateMessage` assumes 80 and truncates large spinner messages character by character by rescanning the entire string with two ANSI regex on each iteration → O(n²). A fast laptop finishes it in ~1 min; a slow CI core does not. Expected: no truncation when there is no TTY, and O(n) truncation.\n\n### Reproduction repo\n\nNo standalone repro repo; root cause is in windows.ts (analysis above) and a fix PR follows.\n\n### To reproduce\n\n1. A project with a large task graph (tasks importing a big module graph).\n2. Run `trigger deploy` (CLI 4.4.6) in a non-TTY CI runner (e.g. CircleCI).\n3. It hangs at \"Deploying project\" with one CPU core at ~100% until timeout.\nForcing a plain/ballmer spinner (no truncateMessage) or widening process.stdout.columns confirms it.\n\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/yonaplast","@type":"Person","name":"yonaplast"},"datePublished":"2026-06-03T19:04:09Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/3826"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8b45e357-1222-d2ef-243d-c729f8378ba4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5A0:155E2E:34E3AED:4BA5C99:6AFB0840 |
| html-safe-nonce | 33ca6e8f2571e538841eb2029b39d86244201e2ab41fd86fe1e1c7c1fbf9975d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUEwOjE1NUUyRTozNEUzQUVEOjRCQTVDOTk6NkFGQjA4NDAiLCJ2aXNpdG9yX2lkIjoiNDU2ODYzNjE5NzIxNDgxNjMyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d06bee4185ad28c4374416020d9a3146d7905b5da189d02ed6b4edc7bbad9a9 |
| hovercard-subject-tag | issue:4582825084 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/3826/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0073c3eba375b6fa052acada45b8b61791b93ea2483fa48f70abb0b374378c42/triggerdotdev/trigger.dev/issues/3826 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0073c3eba375b6fa052acada45b8b61791b93ea2483fa48f70abb0b374378c42/triggerdotdev/trigger.dev/issues/3826 |
| og:image:alt | Provide environment information Bug reproduces in CI (not on the dev machine above): CircleCI machine executor: Ubuntu 24.04, x86_64, Node 22.16.0 trigger.dev / @trigger.dev/sdk: 4.4.6 Deploy build... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yonaplast |
| hostname | github.com |
| expected-hostname | github.com |
| None | 76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | afc998826cdd963c8f91a96ae5372809ab5e296b |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width