Skip to content

fix(tui): honor active Gateway runtime port in TUI connection#42496

Closed
fuleinist wants to merge 4 commits into
openclaw:mainfrom
fuleinist:fix/issue-42461
Closed

fix(tui): honor active Gateway runtime port in TUI connection#42496
fuleinist wants to merge 4 commits into
openclaw:mainfrom
fuleinist:fix/issue-42461

Conversation

@fuleinist

Copy link
Copy Markdown

Summary

Fixes #42461

The TUI connection path now applies the active Gateway runtime port override before resolving the connection target. This ensures that when the Gateway is running on a custom port (e.g., 48789), the TUI automatically connects to that port instead of defaulting to 18789.

Changes

  • Added port field to the gateway lock payload in src/infra/gateway-lock.ts
  • Gateway now writes its port to the lock file when acquiring the lock
  • Added applyGatewayRuntimePortEnvOverride() function in src/config/paths.ts to read the lock file and set OPENCLAW_GATEWAY_PORT env var
  • Called applyGatewayRuntimePortEnvOverride() at the start of resolveGatewayConnection() in src/tui/gateway-chat.ts

Testing

  • Verified the code change applies the port override correctly
  • Existing tests should continue to pass

Fixes #42461

Fixes openclaw#42461

- Apply applyGatewayRuntimePortEnvOverride() before resolving TUI Gateway URL
- Ensures TUI connects to the correct port when Gateway runs on custom port
- Added port field to gateway lock payload for runtime port discovery
@greptile-apps

greptile-apps Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the TUI connecting to the wrong port when the Gateway is started with a custom --port flag. It achieves this by persisting the Gateway's active port in the lock file at startup, then reading that port in a new applyGatewayRuntimePortEnvOverride() helper before the TUI resolves its connection target. The approach is clean and well-placed within the existing config/lock infrastructure.

Key changes:

  • src/infra/gateway-lock.ts: port added to LockPayload; written to the lock file in acquireGatewayLock; new readGatewayLockPayload export for out-of-process consumers.
  • src/config/paths.ts: New applyGatewayRuntimePortEnvOverride() sets OPENCLAW_GATEWAY_PORT from the lock file, skipping if the env var is already set. Uses a dynamic import to avoid a circular dependency.
  • src/tui/gateway-chat.ts: applyGatewayRuntimePortEnvOverride() is called at the very start of resolveGatewayConnection(), before port resolution, which is the correct placement.

Issues found:

  • The port-based liveness check in acquireGatewayLock still uses opts.port (the new gateway's port) when calling resolveGatewayOwnerStatus, rather than lastPayload?.port (the existing lock holder's port). With port now stored in the payload, passing the wrong port can produce a false "dead" verdict and prematurely remove a live gateway's lock when two gateways target different ports.
  • applyGatewayRuntimePortEnvOverride applies the port from the lock file without verifying the recorded PID is still alive. A stale lock from a crashed gateway will misdirect the TUI to a dead port rather than falling back to the configured default.

Confidence Score: 3/5

  • Mostly safe for the happy path, but the lock liveness check can misidentify a live gateway as dead when two gateways use different ports.
  • The TUI connection fix is correctly placed and the env-var guard prevents double-application. However, the liveness check in acquireGatewayLock still uses opts.port (the new gateway's port) instead of lastPayload?.port (the existing gateway's recorded port), which can cause a live lock to be stolen when ports differ. The missing PID liveness check in applyGatewayRuntimePortEnvOverride is a secondary robustness concern around stale locks.
  • Pay close attention to src/infra/gateway-lock.ts — specifically the port argument passed to resolveGatewayOwnerStatus inside the lock acquisition retry loop.

Comments Outside Diff (1)

  1. src/infra/gateway-lock.ts, line 229-233 (link)

    Port liveness check uses new gateway's port, not the existing lock holder's port

    Now that port is written to the lock payload, the port-based liveness check in resolveGatewayOwnerStatus should use lastPayload?.port (the existing gateway's port) rather than port (the new gateway's intended port).

    Currently, if opts.port (new gateway) differs from lastPayload.port (existing gateway), checkPortFree(opts.port) will return true (the new port is free since the old gateway never used it), and resolveGatewayOwnerStatus will declare the lock holder as "dead" — even though the old gateway is still running on its own port. This can cause the existing gateway's lock to be prematurely removed and both gateways to coexist.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/infra/gateway-lock.ts
    Line: 229-233
    
    Comment:
    **Port liveness check uses new gateway's port, not the existing lock holder's port**
    
    Now that `port` is written to the lock payload, the port-based liveness check in `resolveGatewayOwnerStatus` should use `lastPayload?.port` (the existing gateway's port) rather than `port` (the new gateway's intended port).
    
    Currently, if `opts.port` (new gateway) differs from `lastPayload.port` (existing gateway), `checkPortFree(opts.port)` will return `true` (the new port is free since the old gateway never used it), and `resolveGatewayOwnerStatus` will declare the lock holder as `"dead"` — even though the old gateway is still running on its own port. This can cause the existing gateway's lock to be prematurely removed and both gateways to coexist.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 5520a6c

Comment thread src/config/paths.ts
Comment on lines +298 to +313
export async function applyGatewayRuntimePortEnvOverride(
env: NodeJS.ProcessEnv = process.env,
): Promise<void> {
// Skip if already set
if (env.OPENCLAW_GATEWAY_PORT?.trim()) {
return;
}

// Dynamic import to avoid circular dependency
const { readGatewayLockPayload } = await import("../infra/gateway-lock.js");
const payload = await readGatewayLockPayload(env);

if (payload?.port && Number.isFinite(payload.port) && payload.port > 0) {
env.OPENCLAW_GATEWAY_PORT = String(payload.port);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No liveness validation before applying the port override

applyGatewayRuntimePortEnvOverride reads the port from the lock file without verifying the process recorded in the lock (payload.pid) is actually still alive. If the gateway process crashes without releasing the lock (e.g., SIGKILL), this function will set OPENCLAW_GATEWAY_PORT to the stale port, causing the TUI to try connecting to a port where nothing is listening, instead of falling back to the configured/default port where a freshly started gateway might be running.

Consider checking isPidAlive(payload.pid) (already exported from ../shared/pid-alive.js) before applying the port override:

import { isPidAlive } from "../shared/pid-alive.js";

// inside applyGatewayRuntimePortEnvOverride, after reading payload:
if (
  payload?.port &&
  Number.isFinite(payload.port) &&
  payload.port > 0 &&
  typeof payload.pid === "number" &&
  isPidAlive(payload.pid)
) {
  env.OPENCLAW_GATEWAY_PORT = String(payload.port);
}

Note: this would require re-exporting or exposing LockPayload.pid from readGatewayLockPayload, which is already returned in the current implementation.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/config/paths.ts
Line: 298-313

Comment:
**No liveness validation before applying the port override**

`applyGatewayRuntimePortEnvOverride` reads the port from the lock file without verifying the process recorded in the lock (`payload.pid`) is actually still alive. If the gateway process crashes without releasing the lock (e.g., `SIGKILL`), this function will set `OPENCLAW_GATEWAY_PORT` to the stale port, causing the TUI to try connecting to a port where nothing is listening, instead of falling back to the configured/default port where a freshly started gateway might be running.

Consider checking `isPidAlive(payload.pid)` (already exported from `../shared/pid-alive.js`) before applying the port override:

```ts
import { isPidAlive } from "../shared/pid-alive.js";

// inside applyGatewayRuntimePortEnvOverride, after reading payload:
if (
  payload?.port &&
  Number.isFinite(payload.port) &&
  payload.port > 0 &&
  typeof payload.pid === "number" &&
  isPidAlive(payload.pid)
) {
  env.OPENCLAW_GATEWAY_PORT = String(payload.port);
}
```

Note: this would require re-exporting or exposing `LockPayload.pid` from `readGatewayLockPayload`, which is already returned in the current implementation.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This has been addressed. The current code in applyGatewayRuntimePortEnvOverride now checks isPidAlive(payload.pid) before applying the port, and additionally verifies that payload.startTime matches the current process start time (via readLinuxStartTime) to guard against PID reuse. This was added in commit ea8d038.

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

Copy link
Copy Markdown
Contributor

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: 5520a6c553

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/paths.ts Outdated
Comment on lines +302 to +303
if (env.OPENCLAW_GATEWAY_PORT?.trim()) {
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Preserve legacy port env override before applying lock fallback

applyGatewayRuntimePortEnvOverride only treats OPENCLAW_GATEWAY_PORT as an existing override, so when a user sets the still-supported legacy CLAWDBOT_GATEWAY_PORT, this function will still read the lock file and write OPENCLAW_GATEWAY_PORT, which then takes precedence in resolveGatewayPort. In that environment, TUI can connect to the lock-file port instead of the explicitly configured legacy env port, which is a regression from prior behavior where CLAWDBOT_GATEWAY_PORT was respected.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This has been addressed. The check now includes CLAWDBOT_GATEWAY_PORT alongside OPENCLAW_GATEWAY_PORT so that legacy env var users are not overridden by the lock file port. Added in commit ea8d038.

…PID in TUI port override

- In acquireGatewayLock, pass lastPayload?.port (existing gateway's port)
  to resolveGatewayOwnerStatus instead of opts.port (new gateway's port).
  This prevents incorrectly declaring a live gateway as dead when two
  gateways target different ports.

- In applyGatewayRuntimePortEnvOverride, verify the PID is still alive
  before applying the port from the lock file. This prevents using a
  stale lock from a crashed gateway.

- Update tests to reflect correct behavior: lock files now include port
  field, and liveness checks use the lock holder's port.

Fixes review feedback from PR openclaw#42496.

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

Copy link
Copy Markdown
Contributor

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: f7b538fa25

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/infra/gateway-lock.ts Outdated
return null;
}
const startTime = typeof parsed.startTime === "number" ? parsed.startTime : undefined;
const port = typeof parsed.port === "number" ? parsed.port : undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Reject invalid lock-file ports before owner liveness probe

readLockPayload now accepts any numeric port from disk, and acquireGatewayLock passes that value into resolveGatewayOwnerStatus, which probes it via net.createConnection. If a stale/corrupted lock contains an out-of-range port (for example 70000 or -1), Node throws ERR_SOCKET_BAD_PORT, and that exception bubbles out of lock acquisition instead of falling back to normal stale-lock handling. This can block gateway startup until the lock file is manually deleted, so the parsed port should be range-validated (1-65535) or ignored when invalid.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This has been addressed. readLockPayload now validates port range: the port must be a finite number, an integer, greater than 0, and <= 65535 before it is stored in the parsed payload. Out-of-range ports (e.g., 70000, -1) are treated as missing. Added in commit ea8d038.

@fuleinist

Copy link
Copy Markdown
Author

Review Feedback Addressed ✅

The initial Greptile review comments have been addressed in commit f7b538fa:

  • ✅ Port liveness check now uses lastPayload?.port (existing gateway's port) instead of opts.port
  • ✅ PID liveness check added in applyGatewayRuntimePortEnvOverride

Additional Suggestions from Codex Review

There are two remaining issues from the Codex review that could be addressed:

1. Preserve legacy CLAWDBOT_GATEWAY_PORT env override

Issue: applyGatewayRuntimePortEnvOverride only checks OPENCLAW_GATEWAY_PORT, not the legacy CLAWDBOT_GATEWAY_PORT. If a user has the legacy env var set, the lock file port would override it.

Fix: Update the check to include the legacy env var:

-  if (env.OPENCLAW_GATEWAY_PORT?.trim()) {
+  if (env.OPENCLAW_GATEWAY_PORT?.trim() || env.CLAWDBOT_GATEWAY_PORT?.trim()) {
     return;
   }

2. Validate port range in readLockPayload

Issue: The code doesn't validate that port is within valid range (1-65535). A corrupted lock file with an out-of-range port (e.g., 70000 or -1) could cause ERR_SOCKET_BAD_PORT to bubble up and block gateway startup.

Fix: Add range validation:

-    const port = typeof parsed.port === "number" ? parsed.port : undefined;
+    const rawPort = typeof parsed.port === "number" ? parsed.port : undefined;
+    const port =
+      rawPort !== undefined && rawPort > 0 && rawPort <= 65535 ? rawPort : undefined;

Would you like me to prepare these fixes, or are they out of scope for this PR?

@0xsline

0xsline commented Mar 11, 2026

Copy link
Copy Markdown

I can implement these two follow-up tweaks, but I can't push to your fork (0xsline doesn't have permission to fuleinist/clawdbot).

If you want, you can cherry-pick this commit onto your branch:

  • f2395dc76 — preserve legacy CLAWDBOT_GATEWAY_PORT in applyGatewayRuntimePortEnvOverride, and validate lock-file port range (1-65535)

Diff touches:

  • src/config/paths.ts
  • src/infra/gateway-lock.ts

If you'd like me to push it, enable “Allow edits from maintainers” (or push from the PR author account).

Two review fixes for PR openclaw#42496:

1. readLockPayload: validate port range (1-65535) before returning.
   Prevents ERR_SOCKET_BAD_PORT when a stale/corrupted lock contains
   an out-of-range port.

2. applyGatewayRuntimePortEnvOverride: also check legacy
   CLAWDBOT_GATEWAY_PORT env var when deciding whether to apply
   the lock file port override, preserving backward compatibility.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

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

Copy link
Copy Markdown
Contributor

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: ea8d038128

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/paths.ts
Comment on lines +315 to +316
if (isPidAlive(payload.pid)) {
env.OPENCLAW_GATEWAY_PORT = String(payload.port);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Verify lock owner identity before applying port override

applyGatewayRuntimePortEnvOverride treats a lock as current if isPidAlive(payload.pid) is true, but that does not protect against PID reuse. If a stale lock remains and the PID has been recycled by an unrelated process, this code still writes OPENCLAW_GATEWAY_PORT from stale data and resolveGatewayConnection can target the wrong port. The lock payload already carries startTime for anti-reuse checks in src/infra/gateway-lock.ts, so this path should validate owner identity (start time/cmdline) before trusting the runtime-port override.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This has been addressed. The current code in applyGatewayRuntimePortEnvOverride now reads the lock payload and verifies that payload.startTime matches the current process start time via readLinuxStartTime before applying the port. If the PID has been recycled (startTime mismatch), the function returns early without setting the stale port. Added in commit 8ed5e99.

Comment thread src/infra/gateway-lock.ts
Comment on lines +158 to +161
typeof parsed.port === "number" &&
Number.isFinite(parsed.port) &&
parsed.port > 0 &&
parsed.port <= 65535

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Require integer lock-file ports before probing sockets

The new lock payload parser accepts any finite number in range, so a malformed lock with "port": 18789.5 is treated as valid. Later, resolveGatewayOwnerStatus passes that value to net.createConnection, which throws ERR_SOCKET_BAD_PORT for non-integer ports and aborts lock acquisition instead of falling back to stale-lock handling. Treat non-integer port values as invalid (for example with Number.isInteger) when parsing the lock payload.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This has been addressed. The port validation in readLockPayload now includes Number.isInteger(parsed.port) — a port value like 18789.5 is now treated as invalid and discarded, preventing ERR_SOCKET_BAD_PORT exceptions during lock acquisition. Added in commit 8ed5e99.

…non-integer ports

- Guard applyGatewayRuntimePortEnvOverride against PID reuse: when a lock
  carries startTime, compare it against the current process start time
  read from /proc/{pid}/stat before trusting the runtime-port override.
  If the times differ the lock is stale (PID recycled) and is ignored.
- Add Number.isInteger check in readLockPayload so malformed locks with
  fractional ports (e.g. 18789.5) are treated as missing, preventing
  ERR_SOCKET_BAD_PORT from net.createConnection during owner probes.
- Export readLinuxStartTime so it can be used by paths.ts for the
  startTime verification above.

Addresses chatgpt-codex-connector[bot] P2 comments on openclaw#42496.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

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

Copy link
Copy Markdown
Contributor

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: 8ed5e99fb1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/paths.ts
Comment on lines +319 to +323
if (payload.startTime !== undefined) {
const currentStartTime = readLinuxStartTime(payload.pid);
if (currentStartTime !== payload.startTime) {
return; // Stale lock — PID was recycled
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Validate lock owner on non-Linux before applying port

applyGatewayRuntimePortEnvOverride still trusts any live PID when payload.startTime is absent, and then sets OPENCLAW_GATEWAY_PORT from the lock; this can misroute TUI connections on macOS/Windows if a stale lock's PID has been recycled by an unrelated process. Fresh evidence: acquireGatewayLock only records startTime on Linux (src/infra/gateway-lock.ts, platform check around lock payload creation), so the new PID-reuse guard is skipped on non-Linux and stale lock ports can still be applied.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Acknowledged. On Linux this is fully addressed via the startTime verification (commit 8ed5e99). On macOS/Windows where startTime is not recorded in the lock, I proposed an additional guard using readLinuxCmdline + isGatewayArgv to verify the recycled PID still points to a gateway process — this would eliminate the remaining window where a stale lock could misroute a TUI connection on non-Linux platforms. However, I do not have push access to this repository, so I cannot commit this fix directly. Please consider applying it manually or granting push access.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@clawsweeper

clawsweeper Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Codex automated review: keeping this open.

Keep this PR open. Current main still does not let openclaw tui discover the active Gateway runtime port from the lock file, and the linked bug remains open. The PR is a focused implementation candidate, but it still needs maintainer review on the remaining non-Linux stale-lock/PID-reuse concern before merge.

Best possible solution:

Review and finish this PR rather than close it. The likely path is to keep the lock-file runtime-port design, persist a validated active port in the Gateway lock payload, apply it before TUI builds connection details, add the 48789 regression test, and share or extend the existing Gateway owner-identity checks so stale locks are not trusted on macOS/Windows.

What I checked:

  • Current TUI path has no runtime-port discovery hook: resolveGatewayConnection() loads config and immediately builds connection details; current main has no import or call to an applyGatewayRuntimePortEnvOverride() helper before resolving the Gateway URL. (src/tui/gateway-chat.ts:249, aac83e00cfe7)
  • Connection details still resolve from env/config/default only: buildGatewayConnectionDetailsWithResolvers() builds the local URL from resolveGatewayPort(), which on main reads OPENCLAW_GATEWAY_PORT, then gateway.port, then default 18789; there is no lock-file source in this path. (src/gateway/connection-details.ts:37, aac83e00cfe7)
  • Gateway port resolver has no active-lock fallback: resolveGatewayPort() currently parses only OPENCLAW_GATEWAY_PORT, config gateway.port, and the default. The requested cross-process runtime-port override is still absent on main. (src/config/paths.ts:285, aac83e00cfe7)
  • Gateway lock payload does not persist the listener port: The current LockPayload contains pid, createdAt, configPath, and optional startTime, but no port; the acquisition path writes that payload without the active listener port. (src/infra/gateway-lock.ts:18, aac83e00cfe7)
  • Current tests do not cover the custom-port TUI regression: The resolveGatewayConnection suite resets resolveGatewayPort to 18789 and covers auth/URL behavior, but there is no current-main assertion that an active Gateway on 48789 makes TUI resolve ws://127.0.0.1:48789. (src/tui/gateway-chat.test.ts:105, aac83e00cfe7)
  • PR and linked bug context support keeping this open: The PR body links the open regression report [Bug]: openclaw tui does not honor the active Gateway runtime port and still targets 18789 #42461 with closing syntax and the provided PR file list is focused on src/config/paths*, src/infra/gateway-lock*, and src/tui/gateway-chat.ts. Review discussion shows earlier liveness, legacy-env, invalid-port, and integer-port concerns were addressed, with a remaining non-Linux stale-lock/PID-reuse concern still called out. (8ed5e99fb129)

Remaining risk / open question:

  • The PR's lock-file discovery path can misroute TUI if a stale lock survives and the recorded PID is reused by an unrelated process on platforms where startTime is absent, unless a cross-platform owner-identity guard is added or the tradeoff is explicitly accepted.
  • The PR mutates process.env.OPENCLAW_GATEWAY_PORT as a discovery mechanism; this is narrow, but ordering and test isolation should be reviewed before landing.

Codex Review notes: model gpt-5.5, reasoning high; reviewed against aac83e00cfe7.

@fuleinist

Copy link
Copy Markdown
Author

staled

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

Labels

size: M stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw tui does not honor the active Gateway runtime port and still targets 18789

3 participants