Repository navigation
Description
Priority: P3 opt-in usability/design follow-up.
Problem and existing protection
At v0.4.5 / a7f7e873b25cfe9785f1878e0721070cea424815, defaultOptions, CLI options, and listThreads select one Codex home. Users with multiple account homes must already know each path to list its sessions.
Closed #10 already protects unlock by discovering a candidate PID's native lock descriptors across homes. lockFilesOpenedByProcess examines the owner's FD set; it does not enumerate homes or provide an aggregate session list. Do not describe this proposal as a missing cross-home termination safety check.
Proposed scope and acceptance criteria
- Design opt-in bounded home discovery/listing, not an automatic default change. Preserve existing
CODEX_HOME, default home, and explicit--codex-homeprecedence; document discovery/explicit-option combinations. - Consider default/environment homes, explicit candidate paths, and an optional Orca account-home adapter. Treat Orca's layout as a third-party convention, not an upstream Codex contract. Do not recursively scan arbitrary user directories or copy credentials.
- Establish candidate/depth/concurrency/time limits. Validate directory identity/ownership, define alias deduplication and symlink policy, and detect replacement, permission failures, and incomplete inventories.
- Keep identical thread UUIDs in different homes separate using home identity plus thread ID. Never select or unlock one solely by UUID, activity guess, or
safeToUnlock. - Preserve JSON v1 single-home output. Define a compatible opt-in command or versioned aggregate envelope with explicit per-home results and discovery errors; partial discovery must never be presented as a complete inventory.
- Treat discovered account paths as sensitive. Do not add transcript bodies, environment secrets, or account credentials to diagnostics.
- Add fixtures for default/custom/Orca-shaped homes, duplicate UUIDs, aliases, foreign ownership, dangling/non-directory paths, permission failures, bounded large inventories/low-FD environments, and native-file invariance. No process signals, automatic home switching, or native file creation/deletion.
This is separate from #100's actual lock-holder attribution research and #102's per-home scaling measurement. The initial scope does not add automatic multi-home unlock or silently widen normal diagnostic discovery.
Activity