Skip to content

Agents and Dex Web: UTC session IDs, Claude example base URL, Save connection label - #1651

Merged
longquanzheng merged 3 commits into
mainfrom
agents-small-fixes
Nov 11, 2026
Merged

longquanzheng merged 3 commits into
mainfrom
agents-small-fixes

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

Three small fixes found by the agent CLI end-to-end runs, one commit each:

  • Agents CLI (Python): UTC session IDs. The Python CLI core formats the session ID timestamp in UTC, as the TypeScript core does; both cores' new-session tests check the shared shape <harness>-<UTC yyyymmdd-HHMMSS>-<6 hex>. Before, the same moment gave builtin-20261111-123014-3efeb4 from Python (local time) and builtin-20261111-203123-… from TypeScript.
  • Examples (TypeScript): ANTHROPIC_BASE_URL reaches the Claude Code CLI. buildClaudeCliEnvironment in the Claude Agent SDK order-support example keeps ANTHROPIC_BASE_URL when the Worker sets it, matching the Python example's KEPT_ANTHROPIC_SETTINGS; other Anthropic and Claude sign-in settings still never reach the CLI.
  • Dex Web: "Save connection" for a connector without credentials. The connector form's submit button reads "Save connection" when the auth type is none (for example Hacker News); OAuth keeps "Authorize", every other form keeps "Save local credentials".

Why

The end-to-end check of every command and framework example (#1647) showed the time-zone mismatch, could not point the TypeScript Claude example at a mock or proxy endpoint, and the Connectors page asked to "Save local credentials" for a connector that has none.

Testing

  • Python and TypeScript CLI core new-session tests with the UTC shape check pass (each suite also has one unrelated failure locally: the local dex-server-zd build predates GetFlowDefinitions; CI uses the current server).
  • examples/typescript: build, typecheck, and the four agent-harness integration tests (20/20) against a local dexcli dev; the Claude test asserts the CLI environment holds exactly ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL among Anthropic/Claude settings.
  • cd web && NODE_OPTIONS=--no-experimental-webstorage npm run check on Node 26: 808 tests; a new test covers auth type none, an omitted auth type, and an API-key connector.
  • Change-log fragments for agents-packages and web (Fixed). Overlaps Dex Web: adding a credential-free connection no longer blanks the Connectors page #1643 in web/app/connectors/ConnectorsPage.tsx (two lines).

buildClaudeCliEnvironment kept only ANTHROPIC_API_KEY and the runtime
variables, so a Worker that set ANTHROPIC_BASE_URL ran the Claude Code
CLI against the default endpoint. Keep the same Anthropic settings as
the Python example (KEPT_ANTHROPIC_SETTINGS).
…edentials

A connector whose auth type is none, such as Hacker News, has no
credentials to save, yet its form button said Save local credentials.
The Python CLI core formatted the session ID timestamp in local time,
while the TypeScript CLI core uses UTC. Use UTC in Python, and check
the shared shape <harness>-<UTC yyyymmdd-HHMMSS>-<6 hex> in both
cores' new-session tests.
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@longquanzheng
longquanzheng merged commit 43a2766 into main Nov 11, 2026
64 checks passed
@longquanzheng
longquanzheng deleted the agents-small-fixes branch November 11, 2026 21:45
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