Before submitting
Problem
The #1064 launch seam reads the parent session id with ctx.sessionManager.getSessionId() in extensions/gentle-agents.ts, while every other binding reader guards the access (ctx.sessionManager?.getSessionId?.() in extensions/gentle-ai.ts). The optional-chaining pattern elsewhere treats sessionManager as possibly absent, but the launch path makes it load-bearing: a host context that provides no sessionManager throws on the unguarded dereference before the launch queues.
Raised as advisory R3-unguarded-session-id-read (suggestion) by the review-reliability lens during the native review of PR #1558.
Steps to reproduce
- Construct the writer launch path (task-request creation) with an extension context that omits
sessionManager, as test harnesses do.
- Queue a subagent launch.
- The unguarded
ctx.sessionManager.getSessionId() read fails instead of treating the session as unbound.
Expected and actual behavior
Expected: the launch seam guards the read like the panel, status, and usage seams, and a missing sessionManager resolves to an unbound session.
Actual: the direct call makes sessionManager a hard requirement for every launch.
gentle-pi version
Unreleased: feat/1064-session-effective-routing at 4ffe4f9 (PR #1558).
Pi version
1.0.0
Operating system
Linux
Relevant logs or error output (optional)
No response
Before submitting
Problem
The #1064 launch seam reads the parent session id with
ctx.sessionManager.getSessionId()inextensions/gentle-agents.ts, while every other binding reader guards the access (ctx.sessionManager?.getSessionId?.()inextensions/gentle-ai.ts). The optional-chaining pattern elsewhere treatssessionManageras possibly absent, but the launch path makes it load-bearing: a host context that provides nosessionManagerthrows on the unguarded dereference before the launch queues.Raised as advisory
R3-unguarded-session-id-read(suggestion) by the review-reliability lens during the native review of PR #1558.Steps to reproduce
sessionManager, as test harnesses do.ctx.sessionManager.getSessionId()read fails instead of treating the session as unbound.Expected and actual behavior
Expected: the launch seam guards the read like the panel, status, and usage seams, and a missing
sessionManagerresolves to an unbound session.Actual: the direct call makes
sessionManagera hard requirement for every launch.gentle-pi version
Unreleased:
feat/1064-session-effective-routingat 4ffe4f9 (PR #1558).Pi version
1.0.0
Operating system
Linux
Relevant logs or error output (optional)
No response