{"record":{"id":"1cedef65302a16c8","repo":"affaan-m/ECC","slug":"context-graph-entity-not-found-entity-id","errorCode":null,"errorMessage":"Context graph entity not found: {entity_id}","messagePattern":"Context graph entity not found: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"ecc2/src/main.rs","lineNumber":2540,"sourceCode":"                    db.recall_context_entities(resolved_session_id.as_deref(), &query, limit)?;\n                if json {\n                    println!(\"{}\", serde_json::to_string_pretty(&entries)?);\n                } else {\n                    println!(\n                        \"{}\",\n                        format_graph_recall_human(&entries, resolved_session_id.as_deref(), &query)\n                    );\n                }\n            }\n            GraphCommands::Show {\n                entity_id,\n                limit,\n                json,\n            } => {\n                let detail = db\n                    .get_context_entity_detail(entity_id, limit)?\n                    .ok_or_else(|| {\n                        anyhow::anyhow!(\"Context graph entity not found: {entity_id}\")\n                    })?;\n                if json {\n                    println!(\"{}\", serde_json::to_string_pretty(&detail)?);\n                } else {\n                    println!(\"{}\", format_graph_entity_detail_human(&detail));\n                }\n            }\n            GraphCommands::Sync {\n                session_id,\n                all,\n                limit,\n                json,\n            } => {\n                if all && session_id.is_some() {\n                    return Err(anyhow::anyhow!(\n                        \"graph sync does not accept a session ID when --all is set\"\n                    ));\n                }","sourceCodeStart":2522,"sourceCodeEnd":2558,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/ecc2/src/main.rs#L2522-L2558","documentation":"Thrown by the context graph entity-detail command when `db.get_context_entity_detail(entity_id, limit)` returns `None`: no context graph entity matches the provided `entity_id`. Entities (files, symbols, topics, etc.) are created during graph indexing, so a missing ID means it was never indexed or has since been removed. The error aborts before printing any detail output.","triggerScenarios":"Running the entity detail subcommand with an ID that was mistyped, generated on a different machine/database, or belongs to an entity removed by graph pruning/compaction; also when the graph was never synced so the entity was never inserted.","commonSituations":"Copying an entity ID from a teammate's session or CI run; referencing an entity after a database reset; querying before the first graph sync populated entities; casing/format mismatch in the identifier.","solutions":["Search the graph for the entity (list/search entities command) to get its current exact ID.","Run graph sync (`ecc graph sync` or session metrics sync) so the entity gets indexed, then retry.","Confirm you're pointing at the right database/profile; IDs are not portable across state stores.","If the entity was pruned, regenerate it by re-syncing the originating session."],"exampleFix":"// before\n$ ecc context graph entity-detail --id src/main.rs\nerror: Context graph entity not found: src/main.rs\n// after\n$ ecc graph sync\n$ ecc context graph entities --search \"main.rs\"\n$ ecc context graph entity-detail --id <exact-id-from-listing>","handlingStrategy":"validation","validationCode":"# Confirm the entity exists before requesting detail\nENTITY_ID=$(ecc context graph entities --search \"main.rs\" --json | jq -r '.[0].id // empty')\n[ -n \"$ENTITY_ID\" ] && ecc context graph entity-detail --id \"$ENTITY_ID\"","typeGuard":null,"tryCatchPattern":"match db.get_context_entity_detail(id, limit)? {\n    Some(detail) => print_detail(&detail),\n    None => eprintln!(\"entity {id} not indexed; run graph sync first\"),\n}","preventionTips":["Run graph sync before querying entity details on a fresh or reset store.","Resolve entity IDs via search/list rather than constructing them by hand.","Don't reuse IDs across machines or profiles."],"tags":["cli","database","not-found","context-graph"],"backgroundTag":"entity-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}