Skip to content

[Bug]: service.log has no timestamps and no rotation #7045

Closed

Description

@flokosti96

Client or integration

Other

Area

Service lifecycle

Summary

The background service writes stdout/stderr to ~/.opencodex/service.log (src/service/state.ts:147; launchd StandardOutPath, systemd >> redirect). Lines carry no timestamp and the file is never rotated. On a busy hub this makes it impossible to correlate log lines with outages (e.g. watchdog restarts), and the file grows without bound.

Reproduction

  1. Run ocx as a service (ocx service install).
  2. tail ~/.opencodex/service.log:
[opencodex] OAuth credentials rotated and persisted provider=google-antigravity account=account-…7c23
[opencodex] OAuth refresh started provider=google-antigravity account=account-…3d82

No date/time, no size cap.

Version

@bitkyc08/opencodex 2.84.0

Operating system

macOS 27 (launchd) and Ubuntu 24.04 (systemd)

Provider and model

n/a

Logs or error output

See above.

Redacted configuration

Hub on macOS, clients on macOS and Linux.

Proposed fix

Prefix service log lines with an ISO timestamp (at least when OCX_SERVICE is set) and rotate service.log by size (copy-truncate is safe since both launchd and the systemd unit open it with O_APPEND). We currently rotate it externally at 20 MB.

Screenshots and supporting files

No response

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    account-pool
    platform
    service
    on Oct 13, 2026
  2. lidge-jun commented on Oct 13, 2026

    @lidge-jun
    Owner

    Fixed on dev by #7064 (0108cf8). Under a managed service (OCX_SERVICE), service.log lines now carry an ISO-8601 timestamp, and service.log is rotated by copy-truncate once it passes 20 MiB, keeping service.log.1 and service.log.2. The size is checked at startup and every 60 s. Ships in the next release after 2.84.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolbugplatformservice

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions