affaan-m/ECC · error · Error
Missing work item id.
Error message
Missing work item id.
What it means
The 'show' subcommand of work-items.js needs an item identifier: resolveWorkItemId(options) returned null because neither a positional id nor --id was passed to the CLI.
Solutions
- Provide the id positionally or via --id when running the show command
- Run item list to discover valid work item ids
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/work-items.js:438 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/1f2b52597bb2b94b.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/work-items.js:438
store = await createStateStore({
dbPath: options.dbPath,
homeDir: process.env.HOME || os.homedir()
});
if (options.command === 'list') {
const payload = store.listWorkItems({ limit: normalizeLimit(options.limit) });
if (options.json) {
console.log(JSON.stringify(payload, null, 2));
} else {
printWorkItemList(payload);
}
return;
}
if (options.command === 'show') {
const id = resolveWorkItemId(options);
if (!id) {
throw new Error('Missing work item id.');
}
const item = store.getWorkItemById(id);
if (!item) {
throw new Error(`Work item not found: ${id}`);
}
if (options.json) {
console.log(JSON.stringify(item, null, 2));
} else {
printWorkItem(item);
}
return;
}
if (options.command === 'upsert') {
const id = resolveWorkItemId(options);
const existing = id ? store.getWorkItemById(id) : null;
const item = store.upsertWorkItem(buildUpsertPayload(options, existing));
if (options.json) {View on GitHub (pinned to 8321021c54)