Skip to content

Bug: Hardcoded path /Users/oliver/.codex/sessions prevents use on other machines #1

@Nano1337

Description

@Nano1337

Description

The sessions path is hardcoded in two files:

  1. Sources/CodexCore/SessionLoader.swift:
public static let sessionsRoot = URL(fileURLWithPath: "/Users/oliver/.codex/sessions")
  1. Sources/CodexMonitorCLI/Codex.swift:
static let sessionsRoot = URL(fileURLWithPath: "/Users/oliver/.codex/sessions")

This causes the tool to fail on any machine where the username is not oliver.

Error

Error: Invalid sessions path: /Users/oliver/.codex/sessions/2026/01/19

Suggested Fix

Replace the hardcoded path with a dynamic one using the current user's home directory:

static let sessionsRoot = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".codex/sessions")

This allows the tool to work on any macOS machine regardless of username.

Environment

  • macOS (arm64)
  • Installed via Homebrew: brew install cocoanetics/tap/codexmonitor
  • Version: 0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions