Skip to content

feat(device): keep agents to their own device sessions - #340

Merged
finalerock44 merged 2 commits into
devfrom
feat/live-session-ownership
Nov 19, 2026
Merged

finalerock44 merged 2 commits into
devfrom
feat/live-session-ownership

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

When several agents in one organization each drive a device session, one could not tell its session from another's: a call without a session id took the org's only open session, and dcd device stop --all stopped every one.

  • A command that names no session takes yours (the API's started_by.you), never someone else's; with none of yours it lists who started each. An API that does not say whose a session is is read as before.
  • --force on the commands that change a session (stop, install, launch, run, tap, type, swipe, press-key, open-link, set-location, request-human): the API refuses an agent changing a session someone else started (LIVE_NOT_YOURS, exit 2) unless it is given.
  • stop --all stops your sessions and leaves the others, naming them; with --force, everyone's.
  • dcd mcp names its process on its connection to the hosted tools (x-dcd-client-instance), so the sessions it starts read as its own and a call without a session id takes one of them.
  • The session fields show who started it.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

When several agents in one organization each drive a device session, one
could not tell its session from another's: a call without a session id took
the org's only open session, and `dcd device stop --all` stopped every one.

- A command that names no session takes yours (the API's
  `started_by.you`), never someone else's; with none of yours it lists who
  started each. An API that does not say whose a session is is read as
  before.
- `--force` on the commands that change a session (stop, install, launch,
  run, tap, type, swipe, press-key, open-link, set-location,
  request-human): the API refuses an agent changing a session someone else
  started (LIVE_NOT_YOURS, exit 2) unless it is given.
- `stop --all` stops your sessions and leaves the others, naming them;
  with `--force`, everyone's.
- `dcd mcp` names its process on its connection to the hosted tools
  (x-dcd-client-instance), so the sessions it starts read as its own and a
  call without a session id takes one of them.
- The session fields show who started it.
@finalerock44 finalerock44 self-assigned this Nov 19, 2026
@finalerock44
finalerock44 added this pull request to stack #342 November 19, 2026 00:37
@claude

claude Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

started_by.api_key_name is renamed key_name, here and in the API. It is
a key's label, such as "CI", never the key itself, but the old name
read as a secret to code scanning, which flagged printing it. Nothing
released sends or reads the old name.
@finalerock44
finalerock44 merged commit 74e951f into dev Nov 19, 2026
9 checks passed
@finalerock44
finalerock44 deleted the feat/live-session-ownership branch November 19, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant