Skip to content

docs(acp): document resumeSessionId for session resume#42280

Merged
onutc merged 2 commits intoopenclaw:mainfrom
pejmanjohn:docs/acp-resume-session
Mar 10, 2026
Merged

docs(acp): document resumeSessionId for session resume#42280
onutc merged 2 commits intoopenclaw:mainfrom
pejmanjohn:docs/acp-resume-session

Conversation

@pejmanjohn
Copy link
Copy Markdown
Contributor

Summary

  • Problem: The new resumeSessionId parameter (landed in feat(acp): add resumeSessionId to sessions_spawn for ACP session resume #41847) has no documentation, so users may not discover it.
  • Why it matters: Session resume is a key UX improvement — hand off sessions between devices, continue interrupted work, bridge interactive and headless workflows.
  • What changed: Added resumeSessionId to the sessions_spawn interface details list and a new "Resume an existing session" subsection with example, use cases, and notes.
  • What did NOT change (scope boundary): No changes to troubleshooting, command cookbook, or comparison tables — this is purely a sessions_spawn parameter addition.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

None — docs only.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • Docs change only — verified markdown renders correctly.

Steps

  1. Visit https://docs.openclaw.ai/tools/acp-agents#acp-agents
  2. Note resumeSessionId is not documented.
  3. After this PR, the parameter appears in interface details and has its own subsection.

Expected

  • Users can discover and understand session resume from the docs.

Actual

  • Parameter is undocumented.

Evidence

  • Screenshot/recording

Diff is 26 lines of markdown — visual review in the PR files tab.

Human Verification (required)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • Revert this single commit.

Risks and Mitigations

None — docs-only change.

🤖 AI-assisted (Ada drafted the docs section, Pej reviewed and iterated on content before opening)

  • Lightly tested (markdown review, no live preview)
  • I understand what the code does

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation size: XS labels Mar 10, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This is a docs-only PR that adds the resumeSessionId parameter (introduced in #41847) to the sessions_spawn interface documentation in docs/tools/acp-agents.md. The change is a focused 26-line addition: one new interface-detail bullet and a new "Resume an existing session" subsection containing a JSON example, use-case list, and notes on runtime requirements, supported agents, and error behaviour.

Key observations:

  • The new content is accurate and consistent with the surrounding interface-detail style.
  • The notes correctly document the runtime: "acp" requirement, the session/load agent support scope (Codex and Claude Code), and the no-silent-fallback error behaviour.
  • The one gap is that the interaction between resumeSessionId and the thread/mode parameters is never addressed — the interface-detail section already warns that mode: "session" requires thread: true, but readers are left to guess whether those fields are applicable, ignored, or invalid when resumeSessionId is present. A single clarifying sentence in the notes would close this.

Confidence Score: 4/5

  • Safe to merge — docs-only change with no runtime impact.
  • The change is purely documentation. The new content is accurate, well-structured, and consistent with the rest of the file. The only gap is a missing clarification on the thread/mode interaction with resumeSessionId, which is a style improvement rather than a correctness issue.
  • No files require special attention beyond the one style note on docs/tools/acp-agents.md.

Last reviewed commit: 8932dab

@onutc onutc self-assigned this Mar 10, 2026
@aisle-research-bot
Copy link
Copy Markdown

aisle-research-bot bot commented Mar 10, 2026

🔒 Aisle Security Analysis

We found 1 potential security issue(s) in this PR:

# Severity Title
1 🟠 High Broken access control/IDOR: ACP session resumption via resumeSessionId without authorization binding

1. 🟠 Broken access control/IDOR: ACP session resumption via resumeSessionId without authorization binding

Property Value
Severity High
CWE CWE-639
Location src/agents/tools/sessions-spawn-tool.ts:96-164

Description

The ACP spawn tool accepts a caller-supplied resumeSessionId and forwards it to the ACP runtime, which runs acpx sessions new --resume-session <id> to replay/load prior conversation history.

There is no authorization check that the supplied resumeSessionId belongs to (or was created by) the requesting user/session/account/tenant:

  • Input: resumeSessionId is read directly from tool parameters (sessions_spawn) without validation beyond being a string.
  • Sensitive action: it is passed into ACP initialization and then into the acpx CLI as --resume-session, which resumes an existing upstream ACP/Codex session and replays history.
  • Missing authz: there is no check that the requester is allowed to access that upstream session ID.
  • Impact: in a multi-user gateway environment (multiple chat users sharing the same gateway host/runtime), any user able to invoke sessions_spawn can potentially resume another user's ACP/Codex session by knowing/leaking its ID, gaining access to prior conversation contents (secrets, code, credentials) and continuing the session.

Additionally, ACP "agent session id" values are rendered into thread intro/details messages, increasing the chance that these IDs leak to other participants and effectively become bearer tokens for resumption:

  • resolveAcpSessionIdentifierLinesFromIdentity formats agent session id: ... for display.

Vulnerable code (accepting and forwarding resumeSessionId):

const resumeSessionId = readStringParam(params, "resumeSessionId");
...
const result = await spawnAcpDirect({
  ...
  resumeSessionId,
  ...
});

Sink in the ACPX runtime (resume without any auth binding):

const resumeSessionId = asTrimmedString(input.resumeSessionId);
const ensureSubcommand = resumeSessionId
  ? ["sessions", "new", "--name", sessionName, "--resume-session", resumeSessionId]
  : ["sessions", "ensure", "--name", sessionName];

Example leakage surface (session identifier rendered to user-visible text):

if (agentSessionId) {
  lines.push(`agent session id: ${agentSessionId}`);
}

Recommendation

Bind resumption to an authenticated/authorized principal; do not treat resumeSessionId as a bearer token.

Concrete options:

  1. Store and enforce ownership
  • When an ACP session is created/resolved, persist a mapping of {agentSessionId/acpxSessionId -> ownerPrincipal} (principal could be accountId, requesterInternalKey, org/tenant id, etc.).
  • On sessions_spawn with resumeSessionId, look up the mapping and reject if it does not match the requester.
  1. Use scoped state directories
  • Run ACP backends with a per-user/per-account state dir (separate ~/.codex/sessions equivalents) so one user cannot access another user’s session material on disk.
  1. Reduce identifier leakage
  • Do not emit full resumable session identifiers into shared thread intro text; gate it behind an owner-only policy or return it only in a private/admin surface.

Illustrative enforcement sketch:

// Pseudocode inside spawnAcpDirect or acpManager.initializeSession wrapper
if (params.resumeSessionId) {
  const owner = await resumeRegistry.lookupOwner(params.resumeSessionId);
  if (!owner || owner.accountId !== ctx.agentAccountId) {
    return { status: "forbidden", error: "Not authorized to resume this session." };
  }
}

Analyzed PR: #42280 at commit 1a48586

Last updated on: 2026-03-10T16:17:43Z

@onutc onutc merged commit 466cc81 into openclaw:main Mar 10, 2026
20 checks passed
@onutc
Copy link
Copy Markdown
Contributor

onutc commented Mar 10, 2026

Merged without landpr because it's a simple doc change

frankekn pushed a commit to MoerAI/openclaw that referenced this pull request Mar 11, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
frankekn pushed a commit to Effet/openclaw that referenced this pull request Mar 11, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
frankekn pushed a commit to ImLukeF/openclaw that referenced this pull request Mar 11, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
Treedy2020 pushed a commit to Treedy2020/openclaw that referenced this pull request Mar 11, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
dhoman pushed a commit to dhoman/chrono-claw that referenced this pull request Mar 11, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
ahelpercn pushed a commit to ahelpercn/openclaw that referenced this pull request Mar 12, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
Ruijie-Ysp pushed a commit to Ruijie-Ysp/clawdbot that referenced this pull request Mar 12, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
leozhengliu-pixel pushed a commit to leozhengliu-pixel/openclaw that referenced this pull request Mar 13, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
senw-developers pushed a commit to senw-developers/va-openclaw that referenced this pull request Mar 17, 2026
* docs(acp): document resumeSessionId for session resume

* docs: clarify ACP resumeSessionId thread/mode behavior (openclaw#42280) (thanks @pejmanjohn)

---------

Co-authored-by: Onur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants