Skip to main content
A session log is a record of what an agent does during a session. For each HTTP request, it holds the method, host, path, status code, whether the proxy attached a credential, and for an MCP server, the tool the agent called. For a database or SSH service, it holds each statement, command, and file transfer. The proxy adds every request it receives to the session log, including requests to hosts that no access bundle covers. The proxy encrypts the records before they leave your network, and Infisical stores them for you. If you self-host Infisical, session logs need an enterprise license, and your server administrator sets up where Infisical stores them. To keep session logs longer than 30 days, or in your own AWS account, store them in an Amazon S3 bucket you own.

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).
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.
The Session Logs sheet for the Review PR #1486 session, listing each request's time, method, host, path, upstream status, and outcome: brokered requests to GitHub, Anthropic, and Slack, a DELETE blocked by the service's method rules, and requests to registry.npmjs.org and pastebin.com blocked by the proxy's traffic policy

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 initialize or tools/list
The proxy never records a tool’s arguments or results. If the agent sent several calls in one request, the row shows the first one. If the proxy can’t read the calls, such as from a compressed body, the row shows the request path.

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 42 when 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 scp or sftp file operation
  • SSH shells: What the shell printed, in rows of up to 64 KB or one minute
Each statement and command is recorded up to 8 KB, its result or output up to 64 KB, and an SSH command’s piped input up to 8 KB. A row that was cut short says so. If an agent forwards a port through an SSH service, a row says so, but the forwarded traffic isn’t recorded.

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 to sudo -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:
The Session Logs settings page showing session logs enabled in external storage, with the acme-session-logs connection, us-east-1 region, acme-agent-vault bucket, and agent-vault key prefix

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)
If you use external storage, don’t modify or add files in the folder that session logs use. Restrict who in your AWS account can delete or overwrite these files.

Troubleshooting

If you use default storage and session logs can’t be read, contact Infisical support, or your server administrator if you self-host.