Arcane OS Docs Development only

Reference

Arcane.terminal.list()

Lists the current app-owned sessions; it returns a wrapper object, not a bare array. Requires terminal.execute, app id terminal, and a Core or Android host.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.terminal.list()

Parameters

None

Return value

Promise<{sessions: Array<{id,shell,cwd,columns,rows,createdAt,state}>}>

Description

Lists the current app-owned sessions; it returns a wrapper object, not a bare array. Requires terminal.execute, app id terminal, and a Core or Android host.

Overview

Arcane.terminal.list() returns the current terminal sessions owned by the bound application. It is a repeatable read, takes no parameters, and does not list sessions owned by another application or user boundary.

The resolved value is a wrapper object, not the session array itself:

const {sessions} = await Arcane.terminal.list();

At most eight entries are returned. A host may remove an exited or closed session promptly, so use terminal events for lifecycle observation rather than using repeated list calls as a substitute for event delivery.

Session inventory

The exact resolved shape is:

const result = {
    sessions: [
        {
            id: 'term-example',
            shell: 'powershell',
            cwd: '<resolved working directory>',
            columns: 120,
            rows: 32,
            createdAt: '2026-08-15T12:00:00.000Z',
            state: 'running'
        }
    ]
};
Property Type Description
id string Opaque app-owned session id.
shell string Resolved shell name.
cwd string Resolved working directory.
columns number Current bounded column count.
rows number Current bounded row count.
createdAt string Host creation timestamp.
state string Current host-reported state while the session remains in the inventory: starting, running, exited, or closed.

list() deliberately does not return the title property included in the start() result.

Errors and recovery

METHOD_NOT_ALLOWED means the application is not admitted for terminal.execute. ARCANE_TRANSPORT_UNAVAILABLE means no callable host is connected. A host result that violates the exact wrapper or session shape is rejected as METHOD_CONTRACT_OUTPUT_INVALID; treat that as a host/package integrity failure rather than trying to reinterpret the result.

Example

const terminal = globalThis.Arcane?.terminal;

if (!terminal?.list) {
    throw new Error('Terminal session inventory is unavailable.');
}

try {
    const {sessions} = await terminal.list();

    for (const session of sessions) {
        console.log(
            session.id,
            session.shell,
            session.state,
            `${session.columns}x${session.rows}`,
            session.cwd
        );
    }
} catch (error) {
    if (error instanceof Arcane.Error) {
        console.error(error.code, error.message, error.resolution);
    } else {
        throw error;
    }
}

Reference group

Applications, terminal, and capabilities

Repository and reviewed source access