Skip to content

iOS device: logs start relaunches the app and logs stop ends it, without saying so #4688

Closed

Description

@xiatiandeairen

Purpose

On a physical iPhone, logs start relaunches the session app, and logs stop leaves it not running. help logs and the logs start result do not mention either effect. help debugging only says this for logs clear --restart. An agent that collects logs as evidence resets the state of the app it is testing without knowing.

Observed on 0.21.37, physical iPhone (not yet re-run on 0.21.39):

13:55:39 $ agent-device logs start --session phone1
started=true …app.log
# first line of app.log: "Launched application with <bundle id> bundle identifier." (new pid)
13:55:59 $ agent-device logs stop --session phone1
stopped=true
13:56:04 $ agent-device appstate --session phone1
State: notRunning

Capture uses devicectl device process launch --device <id> --console --terminate-existing <bundle> (buildIosDeviceConsoleLaunchArgs in platform-apple/src/logs/log-predicate.ts). The relaunch follows from how console capture works.

Required behavior

  • On physical iOS devices, help logs says that logs start relaunches the session app and that logs stop ends it.
  • The logs start result reports the relaunch, for example relaunched: true, so an agent can see it without reading the help.

Completion conditions

  • help logs contains both statements.
  • On a physical iOS device, logs start --json reports the relaunch. On simulators and Android, the result does not report it.

Environment: agent-device 0.21.37, macOS 27.2, Xcode 27.2, physical iPhone (iOS 27).

Activity

  1. added
    documentation
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions