agentleFS
trac3r00trac3r00/core-skills/skills/apps-handoff/SKILL.md

apps-handoff

Skill0 starsChanged 9 days agoMITView on GitHub

Resume an OmO desktop thread in a CLI terminal with its full history. Use for $apps-handoff <id>. Not for CLI session resume (project-sessions).

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the read-only resolver:

    line 21
  2. Very specific:

    Read threadId, sessionPath, selection, cwd, cwdExists, messageCount, entryCount, lastActivity, goal, live, strategy, command, blocked, …

    line 27
  3. Distinctive:

    Do not print conversation/tool contents or read lease files: leases contain tokens.

    line 32
  4. Very specific:

    If strategy is already-open, stop: report the existing terminal's PID/socket from live, cwd, counts and goal.

    line 34
  5. Very specific:

    Always show the returned exact command as the manual alternative.

    line 48
  6. Distinctive:

    Do not copy or rewrite desktop data, replay messages, or recreate its goal.

    line 53
  7. Distinctive:

    After dispatch, native refusal/CLI exit is visible in the new terminal, not the helper's exit status.

    line 113
  8. Very specific:

    Only .jsonl files directly under install directories are candidates.

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Apps Handoff

$apps-handoff <thread-id-or-prefix> continues the existing desktop conversation in a new terminal surface. It reuses the exact Senpi v3 JSONL, not a summary, fork or imported copy. Resolve script paths relative to this skill directory. Requires Node.js, omo, and either Herdr or macOS Terminal. No packages or network access are needed; the live-state query talks to local OmO endpoints.

Resolve, open, verify

  1. Run the read-only resolver:

    node scripts/apps-handoff.mjs resolve <id-or-prefix> --json

    Read threadId, sessionPath, selection, cwd, cwdExists, messageCount, entryCount, lastActivity, goal, live, strategy, command, blocked, requiresForce, and permissionPreset. Counts describe all valid records in the current file (entries exclude its header); they are not a count of only the active conversation branch. Do not print conversation/tool contents or read lease files: leases contain tokens.

  2. If strategy is already-open, stop: report the existing terminal's PID/socket from live, cwd, counts and goal. A TUI wins even if a desktop host also lists the thread. Never duplicate it, including when --force is supplied.
  3. Otherwise run open with the resolved full ID:

    node scripts/apps-handoff.mjs open <full-id>

    It resolves again, then creates a focused Herdr tab in HERDR_WORKSPACE_ID when HERDR_ENV=1, or a new macOS Terminal window otherwise. It parses Herdr's .result.root_pane.pane_id and runs the command in that pane. Do not run adoption in the agent's own terminal; that would replace its process. Always show the returned exact command as the manual alternative.

    adopt uses native omo daemon adopt, letting the host flush and release the session before interactive resume. resume runs cd <cwd> && omo --session <exact-file> --session-dir <parent> --permission-preset full-access. Do not copy or rewrite desktop data, replay messages, or recreate its goal.

  4. dispatched: true means a command was sent, not proof that the CLI opened. Subscribe instead of sleeping: from eval, tool.monitor({ command: "herdr agent wait <pane> --timeout 120000 && echo READY", filter: "^READY$" }). Then read the new Herdr pane (or ask the user to check the Terminal window) and query omo thread list --all-scope --json to confirm a TUI for this full ID. Confirm to the user: thread ID, surface/pane, cwd, message count, and goal objective/status (or no goal). Continue work in that new session; do not send another task prompt from this one. If startup is not observable, say "dispatched; startup unverified" rather than claiming success.

Refusals and recovery

ResultAction
ambiguous_prefixShow candidate IDs and ask for a longer prefix.
unknown_idAsk for the desktop thread ID; do not substitute a similar chat.
missing_cwdShow the recorded cwd and offer native omo --rebind to a user-chosen directory. Do not silently change cwd or edit the header.
attached / requiresForceAsk before retrying open <id> --force; it disconnects an attached desktop/client.
Native turn_activeAsk before retrying open <id> --interrupt; it stops the active turn. Preserve queued-message notices shown by native adoption.
Native already_terminalResolve again and report where it is; do not duplicate.
Native not_running / unknown_sessionResolve again. Only use the returned direct resume command after fresh state says resume.
Native session_busy, draining/closing hostReport the refusal; resolve again when the user retries. Do not add force/interrupt automatically.
live_state_unavailable, conflicting paths, invalid metadataStop and report the error. Never infer "not running" from a failed query.

Native adoption has no permission-preset flag: it inherits native global/project settings. The resolver reports the global preset; check project settings before claiming full access. If an override restricts tools, explain it and have the user choose the full-access preset in the new CLI; never silently edit settings.

Goal store and compatibility

Verified against OmO 5.1.51 / Senpi 2026.10.27-1: SessionManager.open(path) derives getSessionDir() from dirname(path) unless explicitly overridden. goal/store-ref.js uses that directory plus extensions/goal/<header-id>.json. Desktop's install directory is the transcript parent, so the goal carries over without copying. Direct resume pins --session-dir to that parent to defeat inherited environment/settings overrides. Native adoption relaunches with --session only, so its command sets OMO_CODING_AGENT_SESSION_DIR to the same parent for that process. OmO's launcher preserves this environment variable, which takes precedence over settings. The goal file has a version-1 envelope: {"version":1,"goal":{...}} (or goal:null). Recheck these contracts on engine upgrades.

Helper interface

Both subcommands emit JSON, including errors; resolve --json makes the contract explicit. open supports --interrupt, --force, --dry-run, and --surface herdr|terminal|print. Dry-run and print never open a surface or release a session. An already-open result has command: null deliberately.

node scripts/apps-handoff.mjs open <id> --dry-run --surface print
node --test test/

Exit codes: 0 resolved/dispatched/printed/already-open; 2 bad arguments; 3 unknown or ambiguous ID; 4 missing cwd, required force or missing Herdr workspace; 5 unavailable live state, invalid data or surface/IO failure. Missing-cwd resolve still includes its metadata and exits 4. After dispatch, native refusal/CLI exit is visible in the new terminal, not the helper's exit status. If surface creation fails, use the resolve command as the manual fallback; do not claim the session opened.

Discovery reads ~/Library/Application Support/omo-desktop/omo-data-home.json, then falls back to ~/.omo/desktop when absent. OMO_DESKTOP_HOME overrides it. Only .jsonl files directly under install directories are candidates; live sessionPath wins, otherwise newest mtime with a stable path tie-break. OMO_HANDOFF_THREAD_LIST=<json-file> substitutes a fixture array for the live query. Unset it for real use. Imported helpers also accept an execute(file, argv) function for isolated surface tests. Neither path reads lease contents.

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.