How opfor delivers conversation context and session ids across turns.
How opfor delivers conversation context to an HTTP agent target across turns, and how it threads a session id. One model, shared by opfor run (config file, wizard, SDK), the MCP server tool, and opfor hunt.There are two independent decisions.
Does your target return a session id in its response (body field, header, or Set-Cookie)? That’s server-owned. Does it just expect you to supply an id it keys on? That’s client-owned. Raw LLM API with no session concept? That’s stateless.
"session": { "send": { "in": "body" | "header", "name": "…" }, // where opfor WRITES the id "receive": { "in": "body" | "header" | "set-cookie", "name": "…" } // where opfor READS a returned id}
Presence of receive selects server-owned mode; its absence is client-owned.
send is always required when session is set, and name on it is required.
send.in: "body" → name is a dot-path in the request body; "header" → an HTTP header name.
receive.in: "body" or "header" both require a non-empty name. "set-cookie" is the only receive location where name is optional — it captures the returned cookie pair, echoed back via a Cookie header (set send to { "in": "header", "name": "Cookie" }).
Legacy alias:sessionIdField: "x" (CLI) / sessionField: "x" (SDK) is shorthand for session: { send: { in: "body", name: "x" } } — client-owned, body. Still honored; prefer session for new configs.
Local-script (target.type: "local-script"): sessionId is always included in the stdin JSON on multi-turn attacks; your script owns the history. session / stateful do not apply.
Browser extension: drives a live chat UI in the DOM — there is no session id to configure.
For opfor hunt, each attack thread invents its own id for client-owned targets. For server-owned targets, each thread captures the target’s returned id independently — and because the session belongs to the target, forking a thread starts a new server session (opfor can’t fork a session it doesn’t own).
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Opfor","colors":{"primary":"#ff4d4f","light":"#ff7875","dark":"#d9363e"},"logo":{"light":"https://mintcdn.com/keyvaluesoftwaresystems/4m7L9sshK3C1tAuP/logo/Opfor_black.svg?fit=max\u0026auto=format\u0026n=4m7L9sshK3C1tAuP\u0026q=85\u0026s=832fbfe414f9908f90a90011fa48eb8e","dark":"https://mintcdn.com/keyvaluesoftwaresystems/4m7L9sshK3C1tAuP/logo/Opfor_white.svg?fit=max\u0026auto=format\u0026n=4m7L9sshK3C1tAuP\u0026q=85\u0026s=4072392cc08d6c6d1b93537518a6795f"},"favicon":"https://mintcdn.com/keyvaluesoftwaresystems/4m7L9sshK3C1tAuP/favicon.svg?fit=max\u0026auto=format\u0026n=4m7L9sshK3C1tAuP\u0026q=85\u0026s=389eef865e0935767cf807b65d9576ba","navbar":{"links":[{"href":"https://github.com/KeyValueSoftwareSystems/agent-opfor","label":"GitHub"}],"primary":{"type":"button","label":"Get Started","href":"/get-started/quickstart"}},"footer":{"socials":{"github":"https://github.com/KeyValueSoftwareSystems/agent-opfor"},"links":[{"header":"Package","items":[{"label":"CLI on npm","href":"https://www.npmjs.com/package/@keyvaluesystems/agent-opfor-cli"},{"label":"SDK on npm","href":"https://www.npmjs.com/package/@keyvaluesystems/agent-opfor-sdk"},{"label":"MCP on npm","href":"https://www.npmjs.com/package/@keyvaluesystems/agent-opfor-mcp"}]},{"header":"Links","items":[{"label":"Website","href":"https://agentopfor.ai"},{"label":"GitHub","href":"https://github.com/KeyValueSoftwareSystems/agent-opfor"}]}]},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/KeyValueSoftwareSystems/agent-opfor"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"keyvaluesoftwaresystems","hasAudioNarration":false,"actualSubdomain":"keyvaluesoftwaresystems","customDomains":["docs.agentopfor.ai"],"gitSource":{"type":"github","owner":"keyvaluesoftwaresystems","repo":"agent-opfor-docs","deployBranch":"master","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95acf46eff8e14e018684:success","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"Reference","count":4},{"language":"default","tag":"CLI","count":3},{"language":"default","tag":"Evaluators \u0026 Suites","count":3},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Browser Extension","count":1},{"language":"default","tag":"MCP Server","count":1},{"language":"default","tag":"SDK","count":1},{"language":"default","tag":"Skills","count":1},{"language":"default","tag":"Trace-aware Testing","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"reference/sessions","slug":"/reference/sessions","pageMetadata":{"title":"Target session handling","description":"How opfor delivers conversation context and session ids across turns.","href":"/reference/sessions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How opfor delivers conversation context and session ids across turns.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Table,Tabs,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`How opfor delivers conversation context to an HTTP agent target across turns, and how it threads a session id. One model, shared by `,_jsx(_components.code,{children:`opfor run`}),` (config file, wizard, SDK), the MCP server tool, and `,_jsx(_components.code,{children:`opfor hunt`}),`.`]}),`\n`,_jsx(_components.p,{children:`There are two independent decisions.`}),`\n`,_jsx(Heading,{level:`2`,id:`1-stateless-vs-stateful-—-who-holds-the-history`,children:`1. Stateless vs stateful — who holds the history`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`stateful`})}),_jsx(_components.th,{children:`The target…`}),_jsx(_components.th,{children:`opfor sends per turn`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`has no memory (raw LLM APIs — OpenAI, Groq, Anthropic-compat, LiteLLM, vLLM).`}),_jsxs(_components.td,{children:[`the full `,_jsx(_components.code,{children:`{role, content}`}),` history as a chat-completions `,_jsx(_components.code,{children:`messages`}),` array. No session id; forces OpenAI shape.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` (default)`]}),_jsx(_components.td,{children:`keeps conversation history server-side, keyed by a session id opfor passes.`}),_jsx(_components.td,{children:`only the current turn’s prompt + the session id.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`2-client-owned-vs-server-owned-—-who-mints-the-session-id-stateful-only`,children:`2. Client-owned vs server-owned — who mints the session id (stateful only)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Who mints the id`}),_jsx(_components.th,{children:`Turn 1`}),_jsx(_components.th,{children:`Examples`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`client-owned`})}),_jsx(_components.td,{children:`opfor`}),_jsx(_components.td,{children:`opfor sends its id from turn 1`}),_jsxs(_components.td,{children:[`LangGraph `,_jsx(_components.code,{children:`thread_id`}),`, Rasa `,_jsx(_components.code,{children:`sender_id`}),`, most custom agents`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`server-owned`})}),_jsx(_components.td,{children:`the target`}),_jsxs(_components.td,{children:[`opfor sends `,_jsx(_components.strong,{children:`no`}),` id, then echoes the one the target returns`]}),_jsxs(_components.td,{children:[`OpenAI Responses `,_jsx(_components.code,{children:`previous_response_id`}),`, MCP `,_jsx(_components.code,{children:`Mcp-Session-Id`}),`, cookie sessions`]})]})]})]}),`\n`,_jsxs(Tip,{children:[`Does your target return a session id in its response (body field, header, or `,_jsx(_components.code,{children:`Set-Cookie`}),`)? That’s `,_jsx(_components.strong,{children:`server-owned`}),`. Does it just expect you to supply an id it keys on? That’s `,_jsx(_components.strong,{children:`client-owned`}),`. Raw LLM API with no session concept? That’s `,_jsx(_components.strong,{children:`stateless`}),`.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`the-session-config`,children:[`The `,_jsx(_components.code,{children:`session`}),` config`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"header\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// where opfor WRITES the id`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"receive\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"header\"`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"set-cookie\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// where opfor READS a returned id`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Presence of `,_jsx(_components.code,{children:`receive`}),` selects server-owned mode`]}),`; its absence is client-owned.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`send`}),` is always required when `,_jsx(_components.code,{children:`session`}),` is set, and `,_jsx(_components.code,{children:`name`}),` on it is required.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`send.in: \"body\"`}),` → `,_jsx(_components.code,{children:`name`}),` is a dot-path in the request body; `,_jsx(_components.code,{children:`\"header\"`}),` → an HTTP header name.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`receive.in`}),`: `,_jsx(_components.code,{children:`\"body\"`}),` or `,_jsx(_components.code,{children:`\"header\"`}),` both require a non-empty `,_jsx(_components.code,{children:`name`}),`. `,_jsx(_components.code,{children:`\"set-cookie\"`}),` is the only receive location where `,_jsx(_components.code,{children:`name`}),` is optional — it captures the returned cookie pair, echoed back via a `,_jsx(_components.code,{children:`Cookie`}),` header (set `,_jsx(_components.code,{children:`send`}),` to `,_jsx(_components.code,{children:`{ \"in\": \"header\", \"name\": \"Cookie\" }`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Legacy alias:`}),` `,_jsx(_components.code,{children:`sessionIdField: \"x\"`}),` (CLI) / `,_jsx(_components.code,{children:`sessionField: \"x\"`}),` (SDK) is shorthand for `,_jsx(_components.code,{children:`session: { send: { in: \"body\", name: \"x\" } }`}),` — client-owned, body. Still honored; prefer `,_jsx(_components.code,{children:`session`}),` for new configs.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`server-owned-turn-1-flow`,children:`Server-owned turn-1 flow`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Turn 1 — the request goes out with `,_jsx(_components.strong,{children:`no`}),` session id.`]}),`\n`,_jsxs(_components.li,{children:[`opfor reads the returned id via `,_jsx(_components.code,{children:`receive`}),` and remembers it.`]}),`\n`,_jsxs(_components.li,{children:[`Turns 2+ — that id is echoed via `,_jsx(_components.code,{children:`send`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If a server-owned target returns no id, opfor falls back to a client-minted id and logs a warning.`}),`\n`,_jsx(Heading,{level:`2`,id:`per-surface-syntax`,children:`Per-surface syntax`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Surface`}),_jsx(_components.th,{children:`How to configure`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`opfor run`}),` / config file`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`target.stateful`}),` + `,_jsx(_components.code,{children:`target.session`}),` (or legacy `,_jsx(_components.code,{children:`target.sessionIdField`}),`) — see `,_jsx(_components.a,{href:`/reference/config`,children:`config reference`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`SDK`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`target.stateful`}),` + `,_jsx(_components.code,{children:`target.session`}),` (or legacy `,_jsx(_components.code,{children:`target.sessionField`}),`) — see `,_jsx(_components.a,{href:`/sdk/overview`,children:`SDK reference`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`MCP server tool`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`agent_session_send_in`}),` / `,_jsx(_components.code,{children:`agent_session_send_name`}),` / `,_jsx(_components.code,{children:`agent_session_receive_in`}),` / `,_jsx(_components.code,{children:`agent_session_receive_name`}),` — see `,_jsx(_components.a,{href:`/mcp-server/overview`,children:`MCP server`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`opfor hunt`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`--target-config \u003cfile>`}),` (a run-style `,_jsx(_components.code,{children:`target`}),` block); or `,_jsx(_components.code,{children:`--stateful --session-field \u003cname>`}),`; or the `,_jsx(_components.code,{children:`--ui`}),` setup form — see `,_jsx(_components.a,{href:`/cli/autonomous`,children:`autonomous mode`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Client-owned (body)`,id:`client-owned-body`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`]})})})}),_jsx(Tab,{title:`Server-owned (body)`,id:`server-owned-body`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"receive\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),_jsx(Tab,{title:`Server-owned (header, MCP-style)`,id:`server-owned-header%2C-mcp-style`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"header\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mcp-Session-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"receive\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"header\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mcp-Session-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`other-target-types`,children:`Other target types`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Local-script`}),` (`,_jsx(_components.code,{children:`target.type: \"local-script\"`}),`): `,_jsx(_components.code,{children:`sessionId`}),` is always included in the stdin JSON on multi-turn attacks; your script owns the history. `,_jsx(_components.code,{children:`session`}),` / `,_jsx(_components.code,{children:`stateful`}),` do not apply.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Browser extension`}),`: drives a live chat UI in the DOM — there is no session id to configure.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`opfor hunt`}),`, each attack thread invents its own id for client-owned targets. For `,_jsx(_components.strong,{children:`server-owned`}),` targets, each thread captures the target’s returned id independently — and because the session belongs to the target, `,_jsx(_components.strong,{children:`forking a thread starts a new server session`}),` (opfor can’t fork a session it doesn’t own).`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Target session handling","description":"How opfor delivers conversation context and session ids across turns.","href":"/reference/sessions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Stateless vs stateful — who holds the history","slug":"1-stateless-vs-stateful-—-who-holds-the-history","depth":2,"children":[]},{"title":"2. Client-owned vs server-owned — who mints the session id (stateful only)","slug":"2-client-owned-vs-server-owned-—-who-mints-the-session-id-stateful-only","depth":2,"children":[]},{"title":"The session config","slug":"the-session-config","depth":2,"children":[{"title":"Server-owned turn-1 flow","slug":"server-owned-turn-1-flow","depth":3,"children":[]}]},{"title":"Per-surface syntax","slug":"per-surface-syntax","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Other target types","slug":"other-target-types","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"keyvaluesoftwaresystems","siteName":"Opfor","title":"Target session handling - Opfor","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-07T04:28:30.154Z","originalFileLocation":"reference/sessions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How opfor delivers conversation context and session ids across turns.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Opfor\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Target session handling - Opfor\">\u003cmeta data-mint-head property=\"og:description\" content=\"How opfor delivers conversation context and session ids across turns.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Opfor\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.agentopfor.ai/reference/sessions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://keyvaluesoftwaresystems.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Target+session+handling\u0026amp;description=How+opfor+delivers+conversation+context+and+session+ids+across+turns.\u0026amp;theme=f7497a199a6a92d9ad598d7f\u0026amp;signature=e81347936c799800dafe1fea4c5685954a4bff19129c4281223461139fa9bdab\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Target session handling - Opfor\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How opfor delivers conversation context and session ids across turns.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://keyvaluesoftwaresystems.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Target+session+handling\u0026amp;description=How+opfor+delivers+conversation+context+and+session+ids+across+turns.\u0026amp;theme=f7497a199a6a92d9ad598d7f\u0026amp;signature=e81347936c799800dafe1fea4c5685954a4bff19129c4281223461139fa9bdab\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/keyvaluesoftwaresystems/gz7uzFSt9eT2sd9U/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Opfor\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff4d4f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.agentopfor.ai/reference/sessions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/sessions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.agentopfor.ai/#organization\",\"name\":\"Opfor\",\"url\":\"https://docs.agentopfor.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/keyvaluesoftwaresystems/4m7L9sshK3C1tAuP/logo/Opfor_black.svg?fit=max\u0026auto=format\u0026n=4m7L9sshK3C1tAuP\u0026q=85\u0026s=832fbfe414f9908f90a90011fa48eb8e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.agentopfor.ai#website\",\"name\":\"Opfor\",\"url\":\"https://docs.agentopfor.ai\",\"publisher\":{\"@id\":\"https://docs.agentopfor.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.agentopfor.ai/reference/sessions#webpage\",\"url\":\"https://docs.agentopfor.ai/reference/sessions\",\"name\":\"Target session handling\",\"description\":\"How opfor delivers conversation context and session ids across turns.\",\"dateModified\":\"2026-07-07T04:28:30.154Z\",\"isPartOf\":{\"@id\":\"https://docs.agentopfor.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.agentopfor.ai/reference/sessions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.agentopfor.ai/reference/sessions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.agentopfor.ai/reference/config\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Target session handling\",\"item\":\"https://docs.agentopfor.ai/reference/sessions\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.agentopfor.ai/reference/sessions#article\",\"headline\":\"Target session handling\",\"name\":\"Target session handling\",\"description\":\"How opfor delivers conversation context and session ids across turns.\",\"url\":\"https://docs.agentopfor.ai/reference/sessions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.agentopfor.ai/reference/sessions#webpage\"},\"dateModified\":\"2026-07-07T04:28:30.154Z\",\"publisher\":{\"@id\":\"https://docs.agentopfor.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.agentopfor.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Opfor\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Opfor\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/reference/sessions.md","siteName":"Opfor","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/KeyValueSoftwareSystems/agent-opfor"}]},"groups":[{"group":"Get Started","icon":"play","pages":[{"title":"Introduction","href":"/index"},{"title":"Quickstart","href":"/get-started/quickstart"},{"title":"Core concepts","href":"/get-started/concepts"}]},{"group":"CLI","icon":"terminal","pages":[{"title":"CLI overview","href":"/cli/overview"},{"title":"Running scans","href":"/cli/running-scans"},{"title":"Autonomous mode","href":"/cli/autonomous"}]},{"group":"Browser Extension","icon":"chrome","pages":[{"title":"Browser extension","href":"/browser-extension/overview"}]},{"group":"MCP Server","icon":"plug","pages":[{"title":"MCP server","href":"/mcp-server/overview"}]},{"group":"Skills","icon":"sparkles","pages":[{"title":"Skills","href":"/skills/overview"}]},{"group":"SDK","icon":"code","pages":[{"title":"SDK","href":"/sdk/overview"}]},{"group":"Evaluators \u0026 Suites","icon":"shield-halved","pages":[{"title":"Evaluators \u0026 suites","href":"/evaluators/overview"},{"title":"Evaluator reference","href":"/evaluators/reference"},{"title":"Authoring evaluators","href":"/evaluators/authoring"}]},{"group":"Trace-aware Testing","icon":"eye","pages":[{"title":"Trace-aware testing","href":"/telemetry/overview"}]},{"group":"Reference","icon":"book","pages":[{"title":"Config reference","href":"/reference/config"},{"title":"LLM providers","description":"Supported attacker/judge LLM providers and their env vars.","href":"/reference/providers"},{"title":"Target session handling","href":"/reference/sessions"},{"title":"CLI commands","description":"Every opfor command and flag.","href":"/reference/cli-commands"}]}]},"basePath":"","title":"Target session handling - Opfor","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":[],"chunks":[]}