Skip to content

fix(harness): title emission + codex capability block + MCP exposure#2

Merged
OmGuptaIND merged 4 commits intomainfrom
OmGuptaIND/fix-title-mcp
Apr 21, 2026
Merged

fix(harness): title emission + codex capability block + MCP exposure#2
OmGuptaIND merged 4 commits intomainfrom
OmGuptaIND/fix-title-mcp

Conversation

@OmGuptaIND
Copy link
Copy Markdown
Contributor

Summary

Three related fixes to the harness / session stack:

  • Session title — emit the truncated-user-question title as soon as the first turn starts, then upgrade to the AI-generated title at the end only when it differs. Previously the sidebar showed "New conversation" for the entire first turn.
  • Codex capability block — bake an "Active Anton Connectors" block into thread/start.developerInstructions once per codex session so the model answers "do you have access to X?" from ground truth (live connectors + enabled MCP servers) instead of training priors. Immutable for the thread → no per-turn token cost.
  • Harness MCP exposure — wire McpManager into AntonToolRegistry so external MCP server tools reach harness CLIs. Previously harness sessions received zero tools from user-added MCP connectors even when they were connected.

Supporting changes:

  • Connectors declare capabilitySummary + capabilityExample (17 built-in connectors updated).
  • New optional surfaces?: string[] on McpServerConfig (default = all surfaces) so dev-machine MCP servers don't leak into Slack / Telegram sessions. Filter applied in both McpManager.getAllTools(surface) and collectLiveConnectorsForPrompt.
  • Observability: log tools/list served to harness on every IPC response; log capability-block install after thread/start resolves.

Commits

  1. fix(session): emit truncated title on first turn, upgrade on AI title
  2. feat(connectors): declare capability metadata per connector
  3. feat(harness): thread-start capability block, MCP exposure, surface filter

Test plan

  • Open a fresh codex session with ≥1 direct connector connected → server logs built harness tool map with coreToolCount, connectorToolCount, mcpToolCount
  • Same session → logs capability block installed via thread/start with liveConnectorIds
  • Codex issues tools/list → logs tools/list served to harness with the full toolNames array
  • Ask the model "do you have Gmail?" with Gmail connected → it answers yes, not "no access"
  • Send a first message → sidebar shows the truncated question immediately, not "New conversation"
  • AI title generation finishes → sidebar upgrades only if the AI title differs
  • Add an MCP server config with surfaces: ['desktop'] → tools show in desktop sessions, absent in Slack / Telegram sessions

🤖 Generated with Claude Code

OmGuptaIND and others added 4 commits April 21, 2026 11:20
The prior flow delayed the initial title until the first turn finished,
which meant the sidebar showed "New conversation" for the entire turn.
Now emit the truncated user-question title as soon as the turn starts,
and upgrade to the AI-generated title at the end only when it differs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add capabilitySummary and capabilityExample fields to DirectConnector
and populate them across all 17 built-in connectors. These feed the
harness-side capability block so codex sees ground truth about which
services are live instead of relying on its training priors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ilter

Teach the codex app-server harness about the connectors and external MCP
servers live in the current Anton session so the model answers "do you
have access to X?" from ground truth instead of training priors.

- Expose Anton's ConnectorManager AND McpManager tools to harness
  sessions via AntonToolRegistry. Previously external MCP tools never
  reached harness CLIs, even when the server was connected.
- Bake an "Active Anton Connectors" block into developerInstructions
  once at thread/start under the `anton:` MCP namespace. Immutable for
  the thread, so no per-turn token cost.
- Add an optional `surfaces?: string[]` allowlist to McpServerConfig so
  developer-machine MCP servers don't leak their tools into Slack /
  Telegram sessions. Undefined = all surfaces (default).
- Log tools/list responses served over the harness IPC bridge and log
  the capability block install after thread/start resolves.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add HarnessSetupModal for CLI install/login flow per provider
- Add local-only accountStore (display name + avatar color, localStorage)
- Wire Sidebar avatar/name to accountStore, open Settings on click
- Route ModelSelector "manage" to Settings > models via custom event
- Portal popovers/previews (project menu, image hover) to document.body
- Randomized greeting tail on home screen
- Routines "New" opens a draft conversation instead of inline create
- Settings modal redesign and expanded index.css styles

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@OmGuptaIND OmGuptaIND merged commit d86bd88 into main Apr 21, 2026
@OmGuptaIND OmGuptaIND deleted the OmGuptaIND/fix-title-mcp branch April 21, 2026 06:19
OmGuptaIND added a commit that referenced this pull request Apr 21, 2026
### Other
- fix(harness): title emission + codex capability block + MCP exposure (#2)
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