- Update isHeadlessMode in packages/core to check both stdin.isTTY and stdout.isTTY.
- Synchronize isHeadlessMode mock in packages/cli tests and add global TTY stubs to ensure consistent test environments.
- Add isMounted guard to useFolderTrust hook to prevent state updates on unmounted components in headless mode.
- Expand unit tests in packages/core to cover new TTY check combinations and edge cases.
- Stabilize flaky MCP initialization test in packages/core/src/config/config.test.ts by using a deterministic promise.
- Address review findings regarding environment detection consistency and CI indicator checks.