Can my CoAgent read and edit files in our Drive?
Yes, in any Drive whose owner has given the CoAgent access. A CoAgent has its own identity in your Socra Account, and Drive checks it the same way it checks a person. Being on your team does not give a CoAgent access to every Drive.
Give the CoAgent access
Only the Drive owner can grant or remove access. Being an Account owner is not enough if another identity owns the Drive.
- Reader lets the CoAgent browse and download files.
- Writer also lets it create, update, move and trash files.
A grant covers every file and folder in that Drive and never reaches outside your Account. Sending a message or file link does not grant access. Repeating a grant for the same recipient replaces its role, so check any existing access before changing it.
Find the Drive and teammate IDs
Use the Socra CLI as the Drive owner. The standalone Drive web app does not manage grants. If the commands are not installed, add them:
socra install drive
socra install directory
For a personal CLI session, run socra account login if needed. Check socra account status; use socra account switch if it shows the wrong Account. The Drive and CoAgent must belong to that same Account.
List the Drives your signed-in identity can access:
socra drive list
Find the intended Drive by name and use its returned id as DRIVE_ID. If has_more is true, continue with socra drive list --after LAST_DRIVE_ID, using the last returned Drive ID. Confirm the intended Drive before granting:
socra drive get DRIVE_ID
Find the teammate in Directory:
socra directory user list
Match its known username against NAME and check its display name and type. If more results remain, use the printed cursor with socra directory user list --after LAST_USER_ID. Use the matching ID, beginning with user_, as DIRECTORY_USER_ID, then confirm that member:
socra directory user get DIRECTORY_USER_ID
Use the Account-local Directory ID, not an email address, username, CoAgent ID, personal Socra ID or Channels member ID. If you cannot identify the teammate or a page repeats, stop and obtain its verified Directory ID.
Grant and check access
Replace the placeholders with the IDs you confirmed. Start with reader access unless the authorized work needs changes:
socra drive permission list DRIVE_ID
socra drive permission grant DRIVE_ID DIRECTORY_USER_ID reader
socra drive permission list DRIVE_ID
Use writer instead of reader when the work needs Writer access. In Drive CLI 0.1.2 or later, match principal_user_id to DIRECTORY_USER_ID and check role. The raw UUID in principal_id represents that same recipient. If has_more is true, continue with socra drive permission list DRIVE_ID --after LAST_PERMISSION_ID, using the last returned permission ID.
Record the matching grant's id as PERMISSION_ID. Have the CoAgent run socra drive get DRIVE_ID in its own authenticated session before it starts file work. Your owner session and a saved grant alone do not prove that the CoAgent can access the Drive.
The Drive guide's access section provides the same CLI setup, identity and grant procedure.
How the CoAgent works with the files
The CoAgent uses Drive's API or CLI under its own identity. When it saves a change, Drive checks that it edited the latest version, so it cannot silently overwrite someone else's newer work. Every content change becomes a new version, and earlier versions stay in the file's history.
Remove access
As the Drive owner, confirm that PERMISSION_ID belongs to the intended CoAgent in the intended Drive, then revoke that grant:
socra drive permission revoke PERMISSION_ID
socra drive permission list DRIVE_ID
Check every returned page and confirm that the intended grant is gone. Revocation prevents further access through that grant. It does not delete copies the CoAgent already downloaded to its own computer, so ask it to remove them if that matters.