Skip to content

fix(coding-agent): stabilize macOS process identity - #908

Closed
chai1any wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
chai1any:fix/879-stable-process-start-id
Closed

chai1any wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
chai1any:fix/879-stable-process-start-id

Conversation

@chai1any

@chai1any chai1any commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • run the portable ps -o lstart= process identity query with TZ=UTC and LC_ALL=C
  • preserve the caller environment while making daemon start IDs stable across macOS timezone and locale changes
  • add regression coverage for the fixed query environment

Verification

  • npx tsx ../../node_modules/vitest/dist/cli.js --run test/daemon-ps.test.ts (24 tests passed)
  • npm run check
  • manually queried the current PID after switching process.env.TZ between America/Los_Angeles and Asia/Kolkata; both IDs were identical

Fixes #879

Note

Fix macOS process identity invalidation caused by timezone changes

  • On macOS, getProcessStartId in session-lease.ts uses ps to derive a stable process start identifier, but the output varies with system timezone or locale, causing the running daemon's identity to change.
  • Extracts the ps call into a new getPsProcessStartId helper that forces TZ=UTC and LC_ALL=C in the subprocess environment, ensuring a consistent output regardless of system settings.
  • Extends runProcessQuery to accept an optional env override so callers can supply a custom environment without affecting the default behavior.

Macroscope summarized 7053d4f.

Run the portable ps start-time query under a fixed timezone and locale so a system timezone change does not invalidate daemon ownership metadata.\n\nFixes #879

Copy link
Copy Markdown
Member

Hi, thanks for taking the time to contribute to Prime Agent! Since open sourcing the project, we’ve received far more pull requests than we can responsibly review and validate. Prime Agent runs directly on users’ machines, so we need to be deliberate about which changes we accept and how they are reviewed. Rather than leave a large backlog that we cannot meaningfully work through, we’re closing the current PR queue and moving to a discussion-first contribution process.

We have established new contribution guidelines to help us continue iterating on Prime Agent and better manage contributions from the community. Going forward, we won’t review unsolicited pull requests. Instead, please start with a GitHub Discussion. We’ll identify recurring bugs and feature requests, create Issues for work we want to pursue, and invite pull requests from maintainers or vouched contributors when implementation is ready. Please read the full process documented in our contribution guidelines.

While we’re closing this backlog, we’re still reviewing it at a high level to identify recurring bugs, useful ideas, and important problems that we should address ourselves. Thanks again for the time you put into this!

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.

Changing macOS timezone invalidates the running daemon

2 participants