Skip to content

[Bug]: encoded trajectory export request can erase an explicit session key #83282

@giodl73-repo

Description

@giodl73-repo

Summary

A local code audit found that merging an encoded export-trajectory request can overwrite an explicitly supplied session key with an empty placeholder when the encoded request omits sessionKey.

Affected area

  • src/commands/export-trajectory.ts
  • decodeExportTrajectoryRequest
  • resolveExportTrajectoryOptions

Repro

Call the trajectory export command with a direct sessionKey and a base64url request that only supplies another option such as output. The resolved options can lose the direct session key and fail with the --session-key is required path.

Expected

Decoded request values should not overwrite already-defined CLI options with empty placeholders.

Suggested fix

Only include sessionKey in decoded partial options when the encoded request contains a non-empty string, or merge decoded values without replacing defined direct options with empty values.

Source: local code audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions