[codex] configurable Agent API port#209
Merged
Merged
Conversation
What was built/changed: - Added persistent general.apiPort configuration with strict TCP port validation. - Added Agent API endpoint helpers and bootstrap artifacts for api-port and api-endpoints.json. - Updated Tandem API startup, local MCP/API clients, shell helpers, and smoke tests to use the configured loopback endpoint. - Added Settings UI controls and previews for local and remote/private-network Agent API endpoints. - Added paired-agent startup enforcement so new binding tokens must read /skill, /agent/manifest, and /agent/bootstrap before normal API/MCP routes unlock. - Updated README, PROJECT, docs, skill, TODO, CHANGELOG, and version metadata for v1.11.0. Why this approach: - Keeps apiListenHost separate from apiPort, preserves local api-token compatibility, and keeps remote agent instructions Tailscale/private-network oriented without public-WAN support claims. - Treats port changes as restart-required while keeping endpoint discovery backward compatible for local clients. Tested: - npm run verify: passed. - npx tsc: passed. - npx vitest run: passed. - actionlint .github/workflows/verify.yml: passed. - Manual: default/custom port startup, port conflict behavior, settings persistence, stale settings URL normalization, and paired-agent startup gating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable Tandem Agent API endpoint settings so users can change the Agent API port from the default
8765while preserving local MCP/HTTP clients and remote agents on trusted Tailscale/private networks.What changed
general.apiPortconfig with strict TCP port validation.apiListenHostseparate fromapiPortand preserved supported remote listen behavior for private overlay networks.api-portandapi-endpoints.json, without replacingapi-token./skill,/agent/manifest, and/agent/bootstrapbefore normal API/MCP routes unlock.v1.11.0.Behavior notes
http://127.0.0.1:<configured-port>.http://<tailscale-or-private-ip>:<configured-port>when remote access is enabled.~/.tandem/api-tokenremains a compatibility contract.Validation
npm run verify: passed, including compile, lint, Vitest, and consistency check.npx tsc: passed.npx vitest run: passed, 2968 tests passed, 39 skipped.actionlint .github/workflows/verify.yml: passed.http://127.0.0.1:8765/statusreachable and process exits cleanly.9876,http://127.0.0.1:9876/statusreachable and default8765inactive for that instance.8765->8766->8765survives restart and internal settings URLs normalize stale port params.127.0.0.1for remote agents.0,-1,65536, and decimals are rejected without corrupting config.428 agent_startup_requireduntil/skill,/agent/manifest, and/agent/bootstrapare read with the Bearer token, then/chatreturns200.Platform notes