jackwener/OpenCLI · error · CliError
CONFIG
CONFIG
Error message
task id required
What it means
The `opencli ones task` (single task detail) command requires a work item id, taken from kwargs.id. If the id is missing or empty after trimming it throws CONFIG before any request. The id is the task uuid from the ONES URL path …/task/<id>.
Source
Thrown at clis/ones/task.js:38
{
name: 'id',
type: 'str',
required: true,
positional: true,
help: 'Work item UUID (often 16 chars) from …/task/<id>',
},
{
name: 'team',
type: 'str',
required: false,
help: 'Team UUID (8 chars from …/team/<team>/…), or set ONES_TEAM_UUID',
},
],
columns: ['uuid', 'summary', 'number', 'status_uuid', 'assign', 'owner', 'project_uuid', 'updated'],
func: async (page, kwargs) => {
const id = String(kwargs.id ?? '').trim();
if (!id) {
throw new CliError('CONFIG', 'task id required', 'Pass the work item uuid from the URL path …/task/<id>');
}
const team = kwargs.team?.trim() ||
process.env.ONES_TEAM_UUID?.trim() ||
process.env.ONES_TEAM_ID?.trim();
if (!team) {
throw new CliError('CONFIG', 'team UUID required', 'Use --team <teamUUID> or set ONES_TEAM_UUID (from …/team/<team>/…).');
}
const path = `team/${team}/task/${encodeURIComponent(id)}/info`;
const data = (await onesFetchInPage(page, path, { method: 'GET' }));
if (typeof data.uuid !== 'string') {
const hint = typeof data.reason === 'string'
? data.reason
: 'Use -f json to inspect response; check id length (often 16) and team.';
throw new CliError('FETCH_ERROR', `ONES task info: ${hint}`, 'Confirm task uuid and team match the browser URL.');
}
return [
{
uuid: String(data.uuid),View on GitHub (pinned to 49907e53dc)
Solutions
- Pass the work item uuid: opencli ones task --id <uuid>, taken from …/task/<id> in the ONES URL.
- Ensure the value is non-empty and is the uuid, not the human-readable task number.
- If scripting, quote the id to avoid shell trimming/quoting issues.
Example fix
// before opencli ones task // after opencli ones task --id '9f8e7d6c' # from .../task/9f8e7d6c
Defensive patterns
Strategy: validation
Validate before calling
const id = (args.id ?? '').trim();
if (!id) {
throw new Error('Pass the task uuid from the ONES URL …/task/<id>, e.g. --id 9f8e7d6c.');
} Try / catch
try {
const task = await opencli.ones.task({ id });
} catch (e) {
if (e.code === 'CONFIG' && e.message === 'task id required') {
console.error('Provide --id <taskUuid> (the segment after /task/ in the ONES URL).');
} else throw e;
} Prevention
- Copy the uuid from the …/task/<id> URL path, not the display number (e.g. TT-123).
- In scripts, assert the id variable is non-empty before invoking the CLI.
- Quote the id to avoid shell stripping.
When it happens
Trigger: Running `opencli ones task` without --id, or with an empty/whitespace --id value.
Common situations: Copy-pasting the full ONES task URL instead of the uuid segment; forgetting the flag in a script; passing a task number (e.g. TT-123) rather than the uuid from the URL path.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/22d244dd82552fec.
Report an issue: GitHub.