Skip to content

feat: multi-person fleets with optional personal ChatGPT - #3

Merged
anianroid merged 1 commit into
stagingfrom
growth/multiplayer
Oct 7, 2026
Merged

anianroid merged 1 commit into
stagingfrom
growth/multiplayer

Conversation

@anianroid

Copy link
Copy Markdown
Contributor

What

  • people: in fleet.yaml. Everyone listed can talk to the agents and shares the fleet's subscriptions.
  • With TS_AUTHKEY set, the fleet joins a tailnet and serves the dashboard over Tailscale Serve, which identifies each browser. A person then connects their own ChatGPT under Settings → Profile → Connected accounts, and their new chats bill that account.
  • Claude stays on the fleet's subscription. OpenClaw's personal accounts only accept a ChatGPT login or an API key for a person.

Tested

  • Boot with two people: both IDs land on the Discord allowlist, auth.order points both providers at the shared :fleet profile, Tailscale stays off without a key.
  • Gateway healthy after the entrypoint change.

Not tested

  • A real tailnet join and a real per-person ChatGPT login. Needs a human with a Tailscale account.

Made with Cursor

People listed in fleet.yaml share the fleet's subscriptions. With a Tailscale
auth key the dashboard identifies each person, so they can connect their own
ChatGPT and have their new chats billed to it.

Co-authored-by: Cursor <[email protected]>

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

Copy link
Copy Markdown

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: 0ddaf45976

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +6 to +8
user: root
cap_add: ["NET_ADMIN"]
ports: !reset []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass the TUN device into the Tailscale container

When TS_AUTHKEY is enabled on a normal Docker host, this override grants NET_ADMIN but never exposes /dev/net/tun or starts tailscaled in userspace-networking mode, so the daemon cannot create its network interface. Tailscale documents that kernel networking requires both the TUN device and capabilities (container parameters); because this override also removes every published port and the gateway is switched to loopback, the Control UI becomes unreachable rather than falling back to localhost.

Useful? React with 👍 / 👎.

Comment on lines +53 to +54
exec setpriv --reuid=node --regid=node --init-groups --inh-caps=-all \
/usr/local/bin/fleet-entrypoint gateway

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Authenticate Tailscale before dropping root privileges

In Tailscale mode this re-executes the entrypoint as node, after which line 57 runs tailscale up; on Linux only root can manage tailscaled unless a non-root operator has first been configured (Tailscale operator-permission documentation). Thus, even after providing a TUN device, the login fails with prefs write access denied, while the script continues to a loopback-only gateway with no published port.

Useful? React with 👍 / 👎.

Comment on lines +50 to +54
if [ "$(id -u)" = 0 ]; then
mkdir -p /var/lib/tailscale
tailscaled --state=/var/lib/tailscale/tailscaled.state >/var/log/tailscaled.log 2>&1 &
exec setpriv --reuid=node --regid=node --init-groups --inh-caps=-all \
/usr/local/bin/fleet-entrypoint gateway

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Drop privileges before starting background helpers

When TS_AUTHKEY is set, the root invocation has already started the warden and board supervisors on lines 41–46 before this exec; those child processes survive the re-exec, and the new node invocation starts a second copy of each. Consequently every warden cron entry can run twice, while the second board server repeatedly fails to bind and restarts, so the privilege transition needs to happen before launching either helper.

Useful? React with 👍 / 👎.

Comment thread fleet
Comment on lines +287 to +288
compose exec -it openclaw openclaw models accounts login openai \
--method device-code --person "$pid"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Run personal account login with an identified connection

The packaged OpenClaw CLI does not accept a person ID for models accounts login; its reference explicitly says account commands target the person identified by the Gateway connection and do not accept an owner-id flag (OpenClaw models CLI). Therefore ./fleet user <person> fails on the unsupported --person argument, and merely removing it would still leave this local CLI connection without the required identity-bearing endpoint; the login must instead run through the person's Tailscale identity or be completed in their Control UI.

Useful? React with 👍 / 👎.

Comment on lines +153 to +156
ids = [str(p.get(chan) or "").lstrip("+") for p in people]
ids = [i for i in ids if i]
if not ids and len(people) == 1:
ids = [i for i in [os.environ.get(env_var, "").lstrip("+")] if i]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the owner's environment IDs in multi-person fleets

For the advertised setup flow where teammates are added, fleet.yaml contains multiple people but the owner's chat IDs are still collected only into OWNER_* variables. This condition then disables the environment fallback solely because len(people) > 1; after teammate IDs are filled in, the generated OpenClaw and Hermes allowlists contain those teammates but omit the owner, preventing the person who configured the fleet from DMing its agents.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T07:03:15.036340Z 0ddaf45 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@anianroid
anianroid merged commit d0e2956 into staging Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant