{"record":{"id":"84ca16ea10b06ecf","repo":"conductor-oss/conductor","slug":"agentconfig-is-required-when-framework-is-not-spec","errorCode":null,"errorMessage":"agentConfig is required when framework is not specified","messagePattern":"agentConfig is required when framework is not specified","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AgentService.java","lineNumber":1227,"sourceCode":"     * Resolve the AgentConfig from a AgentStartRequest. If {@code framework} is set, normalize the\n     * raw config via the appropriate normalizer. Otherwise, use the native {@code agentConfig}\n     * field directly.\n     */\n    private AgentConfig resolveConfig(AgentStartRequest request) {\n        if (request.getFramework() != null && !request.getFramework().isEmpty()) {\n            log.debug(\"Normalizing framework '{}' agent config\", request.getFramework());\n            if (\"skill\".equals(request.getFramework())\n                    && request.getRawConfig() == null\n                    && request.getSkillRef() != null) {\n                if (skillRegistryService == null) {\n                    throw new IllegalStateException(\"Skill registry is not available\");\n                }\n                request.setRawConfig(skillRegistryService.resolveRawConfig(request.getSkillRef()));\n            }\n            return normalizerRegistry.normalize(request.getFramework(), request.getRawConfig());\n        }\n        if (request.getAgentConfig() == null) {\n            throw new IllegalArgumentException(\n                    \"agentConfig is required when framework is not specified\");\n        }\n        return request.getAgentConfig();\n    }\n\n    // ── SSE Streaming ──────────────────────────────────────────────\n\n    /** Open an SSE stream for an agent execution. Replays missed events on reconnect. */\n    public SseEmitter openStream(String executionId, Long lastEventId) {\n        log.info(\"Opening SSE stream for execution {} (lastEventId={})\", executionId, lastEventId);\n        workflowService.getExecutionStatus(executionId, false);\n        return streamRegistry.register(executionId, lastEventId);\n    }\n\n    /** Respond to a pending HITL task in an agent execution. */\n    public void respond(String executionId, Map<String, Object> output) {\n        log.info(\"Responding to execution {}: {}\", executionId, output);\n","sourceCodeStart":1209,"sourceCodeEnd":1245,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AgentService.java#L1209-L1245","documentation":"Thrown by AgentService.resolveConfig when framework is not specified (null or empty) and agentConfig is also null. Without a framework, resolveConfig uses the native agentConfig field directly — if that is absent, there is no config to compile. IllegalArgumentException maps to HTTP 400. Note: validateStartSource checks for the presence of an inline source, but resolveConfig is reached later (e.g. via compile() or startInline) and provides this additional guard.","triggerScenarios":"Calling compile() with a request that has no framework and no agentConfig; calling start() in inline mode where the inline config was not actually populated; the rawConfig/skillRef path was not taken because framework was unset.","commonSituations":"SDK builds the request intending to use framework+rawConfig but forgets to set framework; agentConfig was conditionally nulled by upstream logic; the request was constructed for the name-based path but name was empty so it fell through to inline.","solutions":["Set either framework (with rawConfig or skillRef) or a non-null agentConfig on the request.","If using a framework normalizer path, ensure framework is non-empty.","Validate that agentConfig is populated before calling compile() or start()."],"exampleFix":"// before\nAgentStartRequest req = AgentStartRequest.builder()\n    .prompt(\"hello\")\n    // no framework, no agentConfig -> error\n    .build();\nservice.compile(req);\n\n// after\nAgentStartRequest req = AgentStartRequest.builder()\n    .agentConfig(AgentConfig.builder().name(\"a\").build())\n    .prompt(\"hello\")\n    .build();\nservice.compile(req);","handlingStrategy":"validation","validationCode":"if (StringUtils.isEmpty(request.getFramework())\n    && request.getAgentConfig() == null) {\n    return ResponseEntity.badRequest()\n        .body(\"Provide agentConfig or set a framework\");\n}\nservice.compile(request);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set agentConfig when framework is not specified.","Set framework when using rawConfig/skillRef.","Validate the config source before calling compile() or start()."],"tags":["validation","resolve-config","bad-request","agent-config"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}