Skip to content

[Bug] Remote Link: Child preflight fails when ocx config show --json exceeds the 64 KiB SSH output cap #8356

Closed

Description

@lidge-jun

Summary

ocx link add fails with Remote Link failed during Child preflight whenever the Child's ocx config show --json output is larger than 64 KiB. The preflight reads the whole effective config over SSH, but the SSH runner's default output cap is DEFAULT_OUTPUT_BYTES = 64 * 1024 (src/link/ssh-runner.ts), so readOutput throws output_limit and the outer catch reports a generic child_preflight_failed.

Observed (Home 2.99.0, Child 2.99.0, macOS)

  • A long-lived former-standalone Mac had a 168,548-byte ocx config show --json (largest keys: disabledModels 1,249 entries ≈ 44 KB, modelDiscovery ≈ 38 KB, providers ≈ 31 KB).
  • ocx link add <alias> --expect-fingerprint … failed in ~3.5 s with Remote Link failed during Child preflight, repeatedly.
  • Removing disabledModels + modelDiscovery got the file to ~63 KB, but after a service restart modelDiscovery repopulated and config show was 74,904 bytes, so it still failed.
  • Only after cutting providers down to openai (config show ≈ 11 KB) did link add succeed (state: connected, childRole: client).

So a user with a normal, well-used standalone config cannot become a Child without deleting their provider config.

Where

src/server/management/link-enrollment.ts, phase child_preflight:

const configured = await run(ocx(["config", "show", "--json"]));   // default 64 KiB cap

The preflight only needs port and runtimeRole.

Suggested fix

  • Ask the Child for only the fields the preflight needs (e.g. a config get port runtimeRole --json style call, or a small dedicated preflight command), or
  • pass an explicit larger maxOutputBytes for this call (the runner already allows up to 4 MiB), and
  • map SshRunnerError("output_limit") to a specific reason/hint instead of the generic phase failure.

Acceptance

  • ocx link add succeeds against a Child whose full effective config is > 64 KiB.
  • If an output cap is ever hit, the CLI says so (not just "failed during Child preflight").

Activity

  1. added
    cli
    on Nov 8, 2026
  2. added a commit that references this issue on Nov 8, 2026
    77d97d2
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

    cli

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions