Skip to content

fix(acp): provide valid request for auto-created sessions - #124

Open
dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:codex/fix/acp-unknown-session-120
Open

dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:codex/fix/acp-unknown-session-120

Conversation

@dvd233

@dvd233 dvd233 commented Sep 18, 2026

Copy link
Copy Markdown

Summary

  • Keep the ACP compatibility path that auto-creates a session when a client skips newSession.
  • Construct NewSessionRequest with the configured workspace and an empty MCP server list so the fallback satisfies the ACP schema.
  • Add a regression assertion for unknown-session prompts and the configured workspace.

Why

The auto-create path was added for clients such as Zed, but it currently calls NewSessionRequest(cwd=None). The ACP schema requires a string cwd and mcpServers, so every unknown-session prompt raises a validation error before the compatibility path can run.

This PR addresses only the unknown-session fallback from #120. It does not change the provider or tool-kind issues described in the same report.

Validation

  • uv run pytest tests/test_acp.py tests/test_session_integration.py -q — 7 passed
  • uv run python -m compileall -q mini_agent tests/test_acp.py
  • git diff --check
  • Constructed NewSessionRequest(cwd=..., mcpServers=[]) with agent-client-protocol==0.12.1
  • The full suite was also run on Windows; unrelated existing failures remain for missing local config fixtures, PowerShell/bash semantics, Windows file locks, and proxy setup.

AI assistance: Codex was used for diagnosis and test execution; the submitted diff was reviewed for scope and correctness.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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