Fission-AI/OpenSpec · error · Error
buildLaunchCommand requires an absolute workspace-file path
Error message
buildLaunchCommand requires an absolute workspace-file path (got '${input.codeWorkspacePath}'). What it means
Pure-argv precondition in buildLaunchCommand: the workspace-file path must be absolute (it is spliced into argv and also defuses the cursor shim's agent first-arg hijack). A relative path would be resolved against the child process's cwd, so it is rejected.
Solutions
- Pass an absolute path for codeWorkspacePath (e.g. via path.resolve)
- Ensure the workspace file was generated with an absolute path upstream
- Fix the caller that produced the relative path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/openers.ts:345 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/24a0a771d46509b8.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/openers.ts:345
* absolute path (which also defuses the cursor shim's `agent`
* first-arg hijack). attach-dirs: pre-args + one attach flag + path
* pair per surviving member, the primary included (the locked "one
* attach flag per member"); never a trailing positional - both agent
* CLIs would read one as a starter prompt, which 7.1 locks out.
*/
export function buildLaunchCommand(
opener: OpenerDefinition,
input: { members: WorksetMember[]; codeWorkspacePath: string }
): LaunchCommand {
if (input.members.length === 0) {
throw new Error('buildLaunchCommand requires at least one member.');
}
// The no-hijack and no-positional guarantees lean on absolute paths
// (the child resolves relative argv against its own cwd) - keep the
// invariant local instead of three modules away.
if (!path.isAbsolute(input.codeWorkspacePath)) {
throw new Error(
`buildLaunchCommand requires an absolute workspace-file path (got '${input.codeWorkspacePath}').`
);
}
const cwd = input.members[0].path;
if (opener.style === 'workspace-file') {
return {
executable: opener.command,
args: [...opener.args, input.codeWorkspacePath],
cwd,
label: opener.label,
style: opener.style,
};
}
return {
executable: opener.command,View on GitHub (pinned to 6926ccb18a)