Skip to content

commandcode: one x-session-id for every conversation the plugin serves #1313

Open

Description

@yetone

factory 0.1.48 changes x-session-id from one id per plugin process to one per conversation, plus one per subagent, the way droid makes them. Before, every conversation, model and subagent shared one Factory session. That is the suspected cause of Factory's intermittent 400 "Invalid model ID in request body" on Gemini 4 models (marovole on X).

packages/commandcode/index.mjs does what factory did before. It has const session = randomUUID() // one x-session-id for as long as this runs, as one CLI session has. Through magpie, one plugin process serves every conversation and every agent at once, which one Command Code CLI session never does.

To do:

  • Check how the Command Code CLI makes its session id: per process, or per conversation.
  • If it is per conversation, name it from the conversation the way factory now does. That means a chat.headers hook, else x-magpie-session or x-opencode-session, and x-magpie-subagent.

No failure has been reported for Command Code. This issue records the sibling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions