All guides

    Guide

    How do I let a teammate watch my coding agent session without letting them run commands?

    Updated

    Short answer

    Use a viewing mechanism whose effective permissions exclude remote control and command input, or share a reviewed recording or redacted replay. Verify the viewer role using a harmless test account before sharing a sensitive session. Terminal collaboration, screen viewing and repository access are different permissions, and the hosting agent retains its own authority.

    Choose the kind of viewing you actually need#

    For a walkthrough, a reviewed recording or redacted transcript can avoid granting live interaction. For live observation, choose an approved screen-sharing or session-viewing mechanism and verify that remote control, shared keyboard input and command execution are disabled for the viewer. Product interfaces and permissions vary, so inspect the exact platform and version.

    Do not assume that a shared terminal is read only because the invitation says viewer. Confirm the effective role and any way it can be changed. Avoid distributing SSH credentials or a shared shell account merely to let someone observe. Those mechanisms can grant authority unrelated to the viewing task.

    Documented example: an existing VS Code Live Share setup#

    For a team already using VS Code Live Share, Microsoft's session guide documents a read-only collaboration mode, and its security guide distinguishes terminal viewing from terminal input. Check the installed extension and rehearse the effective role before sharing a real agent session.

    1. Start the collaboration session in the non-sensitive workspace and set it to read-only before inviting the observer. Verify the read-only state on both host and guest interfaces. 2. In the host settings, set liveshare.autoShareTerminals to false if you need to avoid automatically exposing unrelated terminals. Share only the intended terminal and choose read-only access, not read/write. Microsoft documents that a read-only shared terminal lets the guest see output without terminal input. 3. Keep debugging, forwarded services and other command-capable collaboration paths outside this observation setup. Rehearse with an authorized guest: verify that terminal input, code editing and unrelated execution routes are unavailable. If you cannot verify the required boundary, use a reviewed recording instead. 4. End the collaboration session when viewing is finished. Manage retained screenshots or transcripts separately; ending a live session does not retract information the viewer already saw.

    Microsoft's current session page also says the VS Code extension is in maintenance mode, with no new features planned, and distinguishes it from the deprecated Visual Studio integration. This is a documented example for an existing installation, not a recommendation to adopt it without reviewing current support and organizational requirements. A read-only terminal constrains terminal input; it does not hide displayed secrets or constrain the host agent's own authority.

    Separate viewer access from agent authority#

    A teammate who cannot type may still see everything displayed. The host's agent may retain repository, database and deployment credentials. Restricting the viewer does not constrain the agent or make a consequential host operation safe. Keep the underlying task, identity and tool boundaries in place.

    Review whether chat messages, annotations, uploaded files or other collaboration inputs become instructions for the agent. A viewer's suggestion should remain a suggestion until the authorized task owner accepts the change in scope. Seeing a session is not permission to redirect its external transfers or production operations.

    Minimize what the session reveals#

    Prefer synthetic examples for demonstrations. Close unrelated terminals, disable unnecessary notifications, and review visible environment variables, prompts, tool arguments, logs and files for sensitive material. A recording can preserve a value long after it disappears from the live screen.

    Decide who can access recordings, transcripts, downloads and shared links, and how long they remain available. Use the organization's approved sharing and retention process. Read-only access prevents certain changes; it does not prevent a viewer from learning or copying visible information.

    Verify the role with a harmless rehearsal#

    Use a non-sensitive workspace and an authorized test viewer. Check whether the viewer can type into the terminal, request or enable remote control, upload content, change the session role, access hidden files or obtain a downloadable transcript. Test only capabilities within the approved rehearsal.

    Record the platform, role, relevant settings and observed behavior. Inspect the effect on the host side as well as the viewer's interface. A disabled-looking control is weaker evidence than a verified role boundary, and a host confirmation can change what the viewer is allowed to do.

    If the chosen platform cannot enforce the required boundary, use a reviewed recording or another approved viewing method. Keep command collaboration as a separate, explicit access decision. Do not weaken the production session's permissions to make a demonstration easier.

    End the viewing session deliberately#

    Revoke or close the invitation through the normal sharing controls and review any retained recordings or transcripts. Confirm that temporary viewing access did not create an unrelated account, credential or persistent shell session. Preserve only the evidence needed for the collaboration or review.

    For the agent's own authority, use our access-control guide. Harden evaluates supported pending agent calls using task context and policy; it does not establish the permissions of an arbitrary screen-sharing product. A scoped Control evaluation concerns that supported action boundary, while the collaboration platform remains responsible for viewer access.

    FAQ

    Related questions

    Is screen viewing the same as terminal sharing?

    No. A terminal-sharing mechanism can expose command input or shell authority, while a viewing mechanism may expose only displayed information. Verify the exact platform, role and effective permissions rather than relying on the invitation's wording.

    Can a read-only viewer still see secrets?

    Yes. Read-only describes modification authority, not confidentiality. Review the visible screen and retained artifacts, use synthetic examples where possible, and restrict access and retention according to the information being shown.

    Should I share SSH access for a demonstration?

    Do not grant command or system access merely to satisfy a viewing need. Choose an approved observation mechanism or reviewed recording. Treat any genuine command collaboration as a separate access decision with an owner and appropriate scope.

    How do I verify a viewer cannot run commands?

    Rehearse with harmless content and an authorized viewer account. Inspect input, remote-control, role-change and related capabilities on the actual platform. Record the effective settings and observed host-side result before sharing sensitive work.

    Does Harden enforce the teammate's viewer role?

    Do not infer that. Harden's supported checks concern proposed agent actions. The collaboration platform enforces its own viewer permissions, and the host must separately constrain the agent's credentials, tools and task authority.

    Sources

    1. Microsoft Live Share read-only sessions and current maintenance status
    2. Microsoft Live Share terminal security
    3. Harden AIF research and evidence

    Start free at harden.run

    Full Enterprise access, free for 60 days: unlimited developers, custom policies, centralized visibility, no commitment.