Skip to content llms.txt

context_injection

Whether hooks can inject messages, system prompts, or conversation context into the agent’s active session.

Type: bool Content type: hooks

ProviderSupportedMechanism
claude-codeHooks return systemMessage field in JSON output to inject context into agent's active session
clinecontext_modification_output: Cline hooks can inject additional context into the agent's session via hook output
codexhook_system_message: Codex hooks can inject a system message into the agent's active session context
crushThe hook JSON response may include an optional context field; this content is injected into the agent context for the current turn.
cursorHooks can inject context at session initialization via the sessionStart event, enabling custom context to be added to the agent's active session at startup.
factory-droidadditionalContext field in PostToolUse, UserPromptSubmit, and SessionStart hook output injects information into the agent session; systemMessage field in JSON output provides session-level injection
pibefore_agent_start handlers return { message: { customType, content, display } } to inject a persistent message stored in session and sent to LLM; context handlers return { messages } to modify the message array before each LLM call
ampAmp hooks cannot inject context into the agent session beyond the pre-execute 'send-user-message' action that cancels the tool call
copilot-cliCopilot CLI hooks cannot inject context into the agent session
gemini-cliGemini CLI hooks cannot inject context into the agent session
kiroKiro hooks cannot inject context into the agent session
opencodenot documented
roo-codenot documented
windsurfWindsurf hooks cannot inject context into the agent's active session
zednot documented