Use sessions for related work
Status: Ready
Article ID: 036
Truth label: Current
Audience: Agency operator
Reader outcome: Group tasks for one project and carry completed-task context forward without confusing a Forge session with a CLI resume session.
Related articles: 030, 037, 079
Target week: 15
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Use a Forge session as a work group
A Forge session gives related tasks a shared project-level identity. Create the session with a name and project id, then attach tasks using its session id. Central rejects a task that tries to attach to a session from another project.
Use this for a bounded initiative such as a feature, audit, migration, or campaign batch. It makes the task list, history, and follow-up relationships easier to inspect.
Carry completed context forward
The session context route gathers completed tasks in completion order. For each task it exposes id, title, result, a bounded plan preview, and the stored verification result. Workers can use this as prior-work context when preparing a later task.
Only completed tasks enter that context. Pending, active, failed, cancelled, and checkpoint-held work is not silently presented as settled knowledge. Still, a completed result can be wrong. Treat session context as evidence and verify important claims against the repository and current sources.
Keep two session concepts separate
A Forge session groups tasks. A CLI session id belongs to an execution engine that supports resuming its own conversation state. They have different ids and different purposes.
A follow-up task can share the Forge session and, when an engine reported a
resumable CLI id, ask that engine to resume. A task can also share only the
Forge session and start fresh. Do not put a Forge session id into the
resume_session_id field.
Name and close the work
Choose a session name that describes one outcome, not a permanent department. Inspect its tasks and context as work progresses. When the initiative is done, mark the session completed so active and historical work remain distinguishable.
Deleting a session clears the session id from its tasks. It does not delete the tasks themselves. Preserve the task and run records when the session is part of delivery or incident evidence.
Keep scope narrow
Sessions are created for one project, and pipeline sessions are single-project by construction. Do not mix client scopes inside a session or use a session as an authorization boundary.
Before attaching a new task, confirm the project, client scope, expected prior context, and whether the task really belongs to the same outcome.
Current limits
Session context can contain full task results and verification text. It is bounded in prompt assembly but remains sensitive. Sessions organize and carry context; they do not enforce confidentiality, task order, or correctness. Use a parent dependency when completion order must block execution.
Next lesson
Continue with Use parent tasks for dependencies.
Derivative map
- Weekly package: WEEK-15
- Long video: VIDEO-W15-LONG
- Shorts: SHORT-W15-PROBLEM, SHORT-W15-MECHANISM, SHORT-W15-WARNING
- Email: EMAIL-W15
- LinkedIn: LI-W15-A, LI-W15-B
- X: X-W15-A, X-W15-B
- Visual: VISUAL-W15
Review record
- Session creation, project validation, completed context, completion, deletion, and follow-up behavior checked against current source.
- Confidentiality, correctness, sensitive-result, and ordering limits reviewed.
- Lesson distinguishes Forge grouping from CLI session resume.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13