Skip to content

Run the Pi extension and the OpenCode plugin once in their harnesses with a launch #3684

Closed

Description

@malibio

Overview

The Pi extension and the OpenCode plugin's launched-session behaviour was merged and tested only over a fake CLI and the harnesses' published types. Neither harness was installed where it was built, so neither plugin has run in its real harness. This issue closes that.

Problem Statement

Three behaviours rest on harness APIs that could only be read, not exercised:

  • Pi: its own bash tool is registered again with a spawnHook (createBashToolDefinition) to set NODESPACE_WRITE_JOURNAL and drop the launch variables. It is unconfirmed that registering a tool under the built-in name replaces Pi's bash tool, and that the hook's environment reaches the command.
  • OpenCode: the shell.env hook blanks NODESPACE_SESSION and NODESPACE_LAUNCHED_FOR and sets the journal variable. It is unconfirmed whether output.env is merged over the process environment or replaces it, and whether a blank launch variable is read by the CLI as no launch (clap may keep an empty NODESPACE_SESSION as a value).
  • Both harnesses' session ids, reported with nodespace session report-harness-session, are unconfirmed against a real launched session.

Proposed Solution

Run each plugin once in its harness, following packages/skill/README.md ("The Pi extension and the OpenCode plugin", step 4), with NODESPACE_SESSION and NODESPACE_LAUNCHED_FOR set. Fix what the run shows, in this issue.

Acceptance Criteria

  • In Pi, the agent knows the launched task without running a command, the session's ai-chat-pty node holds Pi's session id, and a write from a script (bash -c 'nodespace node update <id> ...') does not stop the session
  • In Pi, a command the agent runs has no NODESPACE_SESSION or NODESPACE_LAUNCHED_FOR in its environment, and has NODESPACE_WRITE_JOURNAL set
  • The same three checks for OpenCode
  • For OpenCode, state whether shell.env merges or replaces, and what a harness started from the agent's shell reports with the blanked variables; fix the plugin or the CLI if it reports an empty session id
  • The README says what was seen, and any limit it states that the run disproves is corrected

Related Issues

Non-Goals

  • Pi's shellPath and shellCommandPrefix settings being dropped by the re-registered bash tool, and OpenCode's journal cleanup: both documented limits, not part of this check

Activity

  1. malibio commented on Oct 7, 2026

    @malibio
    CollaboratorAuthor

    Frontend: 5863 passed (323 files)

  2. self-assigned this
    on Oct 7, 2026
  3. added 2 commits that reference this issue on Oct 7, 2026
    0c270cb
    02c709d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions