agentleFS
happier-devhappier-dev/happier/.agents/skills/happier-session-control/SKILL.md

happier-session-control

Skill1.9k starsChanged 2 months agoMITView on GitHub

Manage Happier sessions and execution runs through the CLI JSON contract, and create independent Happier diagnosis sessions with explicit ownership, safe options, and fire-and-forget presentation semantics.

Trending

Quiet since October.thin dataabout the whole repository

Jan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 3 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 2 mentionsSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the happier-dev/happier repository that our weekly crawl found: only 14 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about happier-dev/happier

The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 14

Talked about on GitHub and Bluesky (14 times).

On GitHub · 12

7 more on GitHub

On Bluesky · 2

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If using multiple servers/profiles, pass server selection flags before session (prefix-only):

    line 14
  2. Distinctive:

    All JSON outputs are a pure-stdout envelope:

    line 20
  3. Very specific:

    Use an independent Happier session only when the user asks for new sessions or when an invoking workflow explicitly selects that topology.

    line 41
  4. Distinctive:

    When an independent session owns a complete work bundle:

    line 43
  5. Very specific:

    create it with a self-contained initialMessage, descriptive title and tag, the intended repository path, and only user-selected or safely …

    line 45
  6. Very specific:

    use canonical read-only permission mode for diagnosis when the selected backend supports it, plus an explicit no-write constraint in the …

    line 46
  7. Distinctive:

    treat a successful accepted spawn as the triage lane's completion for that bundle.

    line 47
  8. Distinctive:

    do not wait for idle or pull its transcript merely to re-present the same result.

    line 50
  9. Distinctive:

    do not instruct the spawned session to create further independent sessions unless the user explicitly requested recursive orchestration.

    line 51
  10. Very specific:

    Use monitoring only when the user asks the parent to supervise, consolidate, or continue after the child.

    line 53
  11. Distinctive:

    Check auth status without scraping human output:

    line 66
  12. Distinctive:

    Create/load a session by tag:

    line 92
  13. Distinctive:

    Wait for a session to become idle:

    line 110
  14. Distinctive:

    Read session history (compact is recommended for prompt stuffing):

    line 122
  15. Distinctive:

    Start an execution run:

    line 130
  16. Distinctive:

    Wait for a run to finish:

    line 166
  17. Distinctive:

    Add a server profile non-interactively:

    line 194
  18. Distinctive:

    Remove a server profile:

    line 206

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Happier Session Control (CLI JSON)

This skill enables an agent framework (for example OpenClaw) to control Happier sessions using the existing happier CLI in --json mode.

Prerequisites

  • The happier CLI is installed and authenticated.
  • If using multiple servers/profiles, pass server selection flags before session (prefix-only):
    • happier --server <profile-id-or-name> session list --json
    • happier --server-url <url> --webapp-url <url> session list --json

Contract

All JSON outputs are a pure-stdout envelope:

{ "v": 1, "ok": true, "kind": "...", "data": {} }

or:

{ "v": 1, "ok": false, "kind": "...", "error": { "code": "..." } }

Common error codes to handle:

  • not_authenticated: run happier auth login on the host (or mount/provide a valid HAPPIER_HOME_DIR).
  • session_id_ambiguous: pick deterministically from error.candidates (prefer exact id; otherwise ask the user).
  • session_not_found: call happier session list --json and retry.
  • unsupported: feature disabled by server policy or backend doesn’t support the requested intent.

Independent session delegation

Use an independent Happier session only when the user asks for new sessions or when an invoking workflow explicitly selects that topology. Native subagents remain the owner for in-session delegation.

When an independent session owns a complete work bundle:

  • create it with a self-contained initialMessage, descriptive title and tag, the intended repository path, and only user-selected or safely resolved machine/profile/backend/model options;
  • use canonical read-only permission mode for diagnosis when the selected backend supports it, plus an explicit no-write constraint in the brief. Permission modes are backend-applied policy, not a universal security sandbox; do not overclaim enforcement;
  • treat a successful accepted spawn as the triage lane's completion for that bundle;
  • return the new session id/title and allocation to the user, then stop by default;
  • let the spawned session present its diagnosis directly to the user;
  • do not wait for idle or pull its transcript merely to re-present the same result;
  • do not instruct the spawned session to create further independent sessions unless the user explicitly requested recursive orchestration.

Use monitoring only when the user asks the parent to supervise, consolidate, or continue after the child. In that case, session.wait.idle, session.transcript.get, and session.message.send are optional follow-up tools, not part of the default spawn flow.

The Happier MCP action ids are:

  • session.spawn_new — accepts initialMessage, title, tag, path, machineId, profileId, backend/model selection, and permissionMode;
  • session.wait.idle — optional monitoring;
  • session.transcript.get — optional transcript retrieval;
  • session.message.send — optional follow-up or correction.

The MCP binding names are session_spawn_new, session_wait_idle, session_transcript_get, and session_message_send. When actions are unavailable, use the corresponding CLI JSON commands below where the needed options are supported, or report the missing capability instead of silently changing topology.

Auth Commands (JSON)

Check auth status without scraping human output:

happier auth status --json

Session Commands

List sessions:

happier session list --json

Inspect session status (server snapshot):

happier session status <session-id-or-prefix> --json

Inspect session status with a best-effort live refresh:

happier session status <session-id-or-prefix> --live --json

Create/load a session by tag:

happier session create --tag <tag> --json

Send a message to a session:

happier session send <session-id-or-prefix> "<message>" --json

Send a message and wait until the session is idle:

happier session send <session-id-or-prefix> "<message>" --wait --timeout 300 --json

Wait for a session to become idle:

happier session wait <session-id-or-prefix> --timeout 300 --json

Stop a session:

happier session stop <session-id-or-prefix> --json

Read session history (compact is recommended for prompt stuffing):

happier session history <session-id-or-prefix> --limit 50 --format compact --json

Execution Run Commands

Start an execution run:

happier session run start <session-id-or-prefix> --intent review --backend claude --json

List runs for a session:

happier session run list <session-id-or-prefix> --json

Get a run:

happier session run get <session-id-or-prefix> <run-id> --include-structured --json

Send input to a run:

happier session run send <session-id-or-prefix> <run-id> "<message>" --json

Stop a run:

happier session run stop <session-id-or-prefix> <run-id> --json

Execute an action on a run:

happier session run action <session-id-or-prefix> <run-id> <action-id> --input-json '<json>' --json

Wait for a run to finish:

happier session run wait <session-id-or-prefix> <run-id> --timeout 300 --json

Stream turn IO for a streaming run (e.g. intent=voice_agent):

happier session run stream-start <session-id-or-prefix> <run-id> "<message>" --json
happier session run stream-read <session-id-or-prefix> <run-id> <stream-id> --cursor 0 --json
happier session run stream-cancel <session-id-or-prefix> <run-id> <stream-id> --json

Server Commands (JSON)

List server profiles:

happier server list --json

Current active server:

happier server current --json

Add a server profile non-interactively:

happier server add --name "My Server" --server-url https://example.com --webapp-url https://example.com --use --json

Switch active server:

happier server use <id-or-name> --json

Remove a server profile:

happier server remove <id-or-name> --force --json

Probe server reachability/version:

happier server test [<id-or-name>] --json

Set a one-off custom server as active:

happier server set --server-url https://example.com --webapp-url https://example.com --json

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.