Skip to content

Default Agent Sessions to off#2039

Merged
steipete merged 1 commit into
mainfrom
codex/agent-sessions-default-off
Jul 10, 2026
Merged

Default Agent Sessions to off#2039
steipete merged 1 commit into
mainfrom
codex/agent-sessions-default-off

Conversation

@steipete

Copy link
Copy Markdown
Owner

Summary

  • default Agent Sessions to off when the preference has not been set
  • preserve explicit opt-in through the existing General setting
  • cover fresh-state persistence and menu-section gating with focused tests
  • document the behavior change in the changelog

Verification

  • make check
  • make test (598 selections, 50 groups, 0 failures or retries)
  • swift test --no-parallel --filter 'SettingsStoreCoverageTests|AgentSessionMenuDescriptorTests' after rebasing onto latest main
  • automated and independent pre-land review: no actionable findings
  • Developer ID package launched and relaunched with agentSessionsEnabled = false; bundled sessions --help remains available

UI accessibility automation could launch CodexBar and open its settings/menu, but those controls did not expose usable accessibility elements, so visual menu extraction was inconclusive. The headless menu-descriptor regression test covers section suppression and explicit enablement.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 293f26589b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

forKey: "providersSortedAlphabetically") as? Bool ?? false
let appLanguageRaw = userDefaults.string(forKey: "appLanguage")
let agentSessionsEnabled = userDefaults.object(forKey: "agentSessionsEnabled") as? Bool ?? true
let agentSessionsEnabled = userDefaults.object(forKey: "agentSessionsEnabled") as? Bool ?? false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve manually configured session hosts

For existing installs that saved agentSessionsManualHosts while the old default kept Agent Sessions enabled, the agentSessionsEnabled key can still be absent because editing the host field does not write this Boolean. After this change, that same state loads as disabled, and AgentSessionsStore ignores the configured hosts until the user rediscovers and re-enables the toggle, so manual remote session discovery silently regresses for those users. Consider treating non-empty manual hosts as an opt-in during this default migration or writing a one-time migrated value.

Useful? React with 👍 / 👎.

@steipete steipete merged commit 8489002 into main Jul 10, 2026
8 checks passed
@steipete steipete deleted the codex/agent-sessions-default-off branch July 10, 2026 16:32
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