Viewing session logs
You can view a session’s logs if you created the session or you’re an admin of its Agent Vault project, for up to 30 days after they’re recorded if Infisical stores them (see Retention).- In Infisical
- Through the API
Go to Sessions and select View Session Logs on the session’s row. You can filter the rows by outcome and search them by host, path, method, tool, or service, or by the text of a database or SSH row, such as a statement or a command’s output. While the session is active, new rows appear as the proxy uploads them.

Log contents
Each HTTP request produces one record with:
The outcome is one of four:
For HTTP requests, the proxy doesn’t record bodies, headers, or query strings. For a request to an MCP server, the proxy reads only the method and tool name of each call from the request body.
If the session log fills up before the proxy uploads it, the proxy drops rows, then adds a row that says how many it dropped.
MCP tool calls
If a request matched an MCP service, its row shows an MCP badge and the call the agent made, in place of the path:- For a tool call, the tool’s name, such as
create_issue - For any other call, the method, such as
initializeortools/list
Database and SSH connections
For a database or SSH service, each row is one thing the connection did, shown with the service type, such as PostgreSQL, in place of the method. Select a row to see everything it recorded and copy it.- PostgreSQL and MySQL: A statement and its result, such as
SELECT 42when PostgreSQL returns 42 rows, but never the rows themselves - SSH commands: A row with the command when it starts, then rows with the input the agent piped into it and its output, written every minute while it runs
- SSH file transfers: One
scporsftpfile operation - SSH shells: What the shell printed, in rows of up to 64 KB or one minute
Sensitive values in the log
The proxy records statements, commands, and piped input as the agent wrote them, without hiding anything:- If the agent puts a password in a statement or command, such as in
ALTER USER,IDENTIFIED BY, or input piped tosudo -S, the log holds the password - In an SSH shell, the log holds typed input only if the shell didn’t echo it, so a password typed at a prompt is recorded
- For PostgreSQL, the values bound to a prepared statement are recorded with the statement, so the log can hold values from your database (MySQL records the statement without them)
Managing session logs
The Session Logs card on the Settings page shows the current settings:
Turning session logs off
Session logs are on unless an admin turns them off. To stop recording, turn off Enable in the Session Logs dialog and select Save. Turning session logs off also hides the logs already recorded:- With default storage, turning session logs back on shows those logs again, as long as they’re less than 30 days old
- With external storage, Infisical forgets the bucket and its AWS connection (to see the logs again, set up the same bucket and key prefix)
Changing the storage location
Infisical doesn’t copy existing records when you switch storage or change the bucket or key prefix. Records written before the change don’t show in Infisical until you switch back. If you switch away from default storage, logs already in default storage still expire after 30 days.Retention
How long session logs are kept depends on where they’re stored:- Default storage: you can look back at the last 30 days of session logs, unless your plan sets a different period
- External storage: Infisical never deletes session logs from your bucket (to delete older logs automatically, add an S3 Lifecycle rule to the bucket)