Skip to content

Session management not working - sessionId parameter has no effect #92

@ShengJ96

Description

@ShengJ96

Environment

  • codex-mcp-server version: 1.2.2 (via npx)
  • Installation method: claude mcp add codex-cli -s user -- npx -y codex-mcp-server
  • Client: Claude Code CLI
  • OS: macOS Darwin 24.6.0

Description

The sessionId parameter does not preserve conversation context between calls. Each call to the codex tool starts a fresh conversation, regardless of using the same sessionId. Additionally, listSessions always returns "No active sessions".

Steps to Reproduce

  1. Call codex tool with a sessionId:
{
  "prompt": "Remember the keyword ALPHA-BRAVO",
  "sessionId": "test-session-001",
  "sandbox": "read-only",
  "workingDirectory": "/path/to/project"
}

Response: "Got it. I've remembered the keyword ALPHA-BRAVO."

  1. Immediately call codex again with the same sessionId:
{
  "prompt": "What keyword did I ask you to remember?",
  "sessionId": "test-session-001",
  "sandbox": "read-only",
  "workingDirectory": "/path/to/project"
}

Response: "I don't have any previous conversation context..."

  1. Call listSessions:
{}

Response: "No active sessions"

Expected Behavior

According to session-management.md:

  • Using the same sessionId should preserve conversation context
  • listSessions should return session metadata including id, createdAt, lastAccessedAt, turnCount

Actual Behavior

  • Each call starts a new conversation with no context
  • listSessions always returns "No active sessions"
  • Session data appears to not be stored or retrieved

Additional Context

Tested multiple times with different sessionId values. The issue is 100% reproducible. Basic codex and review tools work correctly for single-turn interactions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions