{"record":{"id":"80f8fc19097e6b1e","repo":"can1357/oh-my-pi","slug":"start-requires-application","errorCode":null,"errorMessage":"start requires application","messagePattern":"start requires application","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/hub/launch.ts","lineNumber":184,"sourceCode":"\t/** wait: output line that satisfied the pattern. */\n\tmatched?: string;\n\t/** describe: immutable launch spec backing the command/cwd detail lines. */\n\tspec?: DaemonSpec;\n}\n\nfunction requiredName(params: LaunchParams): string {\n\tif (!params.name) throw new ToolError(`${params.op} requires name`);\n\treturn params.name;\n}\n\nfunction timeoutMs(value: number | undefined, fallbackSeconds: number): number {\n\tconst seconds = Math.max(0.05, Math.min(3_600, value ?? fallbackSeconds));\n\treturn Math.round(seconds * 1_000);\n}\n\nfunction commandSpec(params: LaunchParams, session: ToolSession): DaemonSpec {\n\tconst name = requiredName(params);\n\tif (!params.application) throw new ToolError(\"start requires application\");\n\tconst ready = params.ready;\n\tconst detached = params.detached ?? false;\n\tif (ready?.port !== undefined && (!Number.isInteger(ready.port) || ready.port < 1 || ready.port > 65_535)) {\n\t\tthrow new ToolError(\"ready.port must be an integer from 1 to 65535\");\n\t}\n\tif (ready && !ready.log && ready.port === undefined) throw new ToolError(\"ready requires log or port\");\n\treturn {\n\t\tname,\n\t\tapplication: params.application,\n\t\targs: params.args ?? [],\n\t\tenv: params.env ?? {},\n\t\tcwd: resolveToCwd(params.cwd ?? session.cwd, session.cwd),\n\t\tpty: detached ? false : (params.pty ?? true),\n\t\tready: ready\n\t\t\t? {\n\t\t\t\t\tlog: ready.log,\n\t\t\t\t\tport: ready.port,\n\t\t\t\t\thost: ready.host,","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/hub/launch.ts#L166-L202","documentation":"commandSpec() builds the daemon spec for the 'start' operation. After resolving the name it requires `params.application` — the executable/command to launch. If absent it throws ToolError 'start requires application'; a start without an application has nothing to run.","triggerScenarios":"Calling launch with op 'start' (or an op routed to commandSpec) and omitting `application`, or passing an empty string.","commonSituations":"Model filled in name/cwd but forgot the application command; automation reuses a params object where application was stripped; confusing the tool with a generic 'process' tool that uses a different key (e.g. cmd/command) instead of `application`.","solutions":["Set the `application` parameter to the executable path or command to launch (e.g. \"bun\", \"/usr/bin/node\", \"./server\").","Confirm the parameter key is `application`, not `command` or `cmd`.","Ensure the value is a non-empty string."],"exampleFix":"// before\nlaunch({ op: \"start\", name: \"api\", args: [\"run\", \"dev\"] })\n// throws: start requires application\n\n// after\nlaunch({ op: \"start\", name: \"api\", application: \"bun\", args: [\"run\", \"dev\"] })","handlingStrategy":"validation","validationCode":"if (!params.application?.trim()) throw new Error(\"start requires application\");","typeGuard":null,"tryCatchPattern":"try {\n  await launchTool.run({ op: \"start\", name, application });\n} catch (err) {\n  if (err instanceof ToolError && err.message === \"start requires application\") {\n    // add the application command and retry\n  } else throw err;\n}","preventionTips":["Always set application (executable/command) on start ops.","Don't confuse key names with other process tools (cmd/command).","Validate launch params with the tool schema before calling."],"tags":["validation","missing-parameter","tool-args"],"backgroundTag":"missing-required-parameter","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}